Skip to content

Canonicalize local conversation ID mapping to task ID for cloud agent tasks.#10801

Merged
zachbai merged 1 commit into
masterfrom
zb/fix-missing-transcript
May 13, 2026
Merged

Canonicalize local conversation ID mapping to task ID for cloud agent tasks.#10801
zachbai merged 1 commit into
masterfrom
zb/fix-missing-transcript

Conversation

@zachbai
Copy link
Copy Markdown
Contributor

@zachbai zachbai commented May 13, 2026

Description

Fixes APP-4460.

There are a host of issues arising from a lack of consistent mapping between conversation ID and task ID in the client. It is currently possible to have multiple local conversations map to the same ambient agent task. In many cases task ID is treated with conversation-like semantics, and we assume that task ID is unique for a given coverastion object.

This PR implements a much stronger 1:1 association between task and coversation ID, though does not go so far as to claim it is an invariant that always holds.

The history model maintains a map of canonical local conversation to server conversation id, which is used in each place where we need to resolve a server conversation id to a local id. Previously we did not consistently use this map, and in certain cases could end up minting new local conversations unnecessarily.

In cases where we end up with multiple local conversation ids mapping to the same ambient task, we could easily end up in a state where the cloud mode pane for a given ambient task assumes conversation ID A is the local conversation ID, while there also exists conversation B which maps to the same task. Then, since conversation ID drives AI block visibility in the agent view, we could end up with an empty looking agent view.

@cla-bot cla-bot Bot added the cla-signed label May 13, 2026
Copy link
Copy Markdown
Contributor Author

zachbai commented May 13, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@zachbai zachbai changed the title Use canonical local conversation ID for cloud agent tasks Canonicalize local conversation ID mapping to task ID for cloud agent tasks. May 13, 2026
@zachbai zachbai marked this pull request as ready for review May 13, 2026 07:58
@zachbai zachbai requested a review from liliwilson May 13, 2026 07:58
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 13, 2026

@zachbai

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@zachbai zachbai force-pushed the zb/fix-missing-transcript branch from b850b7e to c012060 Compare May 13, 2026 08:04
Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR strengthens canonical local conversation ID selection for cloud/ambient agent conversations, including server-token lookup, restored run IDs, and metadata deduplication.

Concerns

  • Manual testing is required for changes that can be manually tested. Please include screenshots or a screen recording that show the cloud/ambient conversation restoration flow working end to end, or justify why manual testing is not possible.

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@zachbai zachbai force-pushed the zb/fix-missing-transcript branch from c012060 to 5c86e23 Compare May 13, 2026 08:12
@zachbai zachbai enabled auto-merge (squash) May 13, 2026 08:12
@zachbai zachbai merged commit 53d47d1 into master May 13, 2026
25 of 26 checks passed
@zachbai zachbai deleted the zb/fix-missing-transcript branch May 13, 2026 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants