Skip to content

Add 'continue' (in cloud) button to cloud agent conversation tombstone.#9315

Merged
zachbai merged 6 commits intomasterfrom
zb/continue-cloud-tombstone
May 4, 2026
Merged

Add 'continue' (in cloud) button to cloud agent conversation tombstone.#9315
zachbai merged 6 commits intomasterfrom
zb/continue-cloud-tombstone

Conversation

@zachbai
Copy link
Copy Markdown
Contributor

@zachbai zachbai commented Apr 28, 2026

Adds basic UI elements for cloud agent conversation continuation once the runner is dead:

  • 'continue' button in tombstone and details panel
  • dedupe the optimistically-added follow-up user query from the blocklist when follow-up session is started

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

zachbai commented Apr 28, 2026

@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented Apr 28, 2026

@zachbai

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

I completed the review and posted feedback on this pull request.

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

I completed the review and posted feedback on this pull request.

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

I completed the review and posted feedback on this pull request.

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

I completed the review and posted feedback on this pull request.

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

I completed the review and posted feedback on this pull request.

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

@harryalbert

I completed the review and posted feedback on this pull request.

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

You can view the conversation on Warp.

I completed the review and posted feedback on 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

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 adds cloud-to-cloud follow-up UI plumbing for ambient agent tasks: tombstone Continue actions, pending follow-up submission routing, optimistic prompt rendering, execution-ended status refreshes, and related tests/spec updates.

Concerns

  • A new test helper constructs AmbientAgentTask without all required fields, which will break compilation.
  • Owned ambient sessions can enter cloud-follow-up mode even when HandoffCloudCloud is disabled, bypassing the existing read-only viewer cleanup.
  • Follow-up submission leaves the input editable and the pending mode active while waiting for a new session, allowing duplicate follow-up submissions for the same run.
  • Optimistic follow-up rendering is triggered before the API accepts the follow-up, so immediate API rejection can leave a prompt permanently rendered for a run that never started.

Verdict

Found: 1 critical, 3 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

request_usage: None,
is_sandbox_running: false,
agent_config_snapshot: None,
artifacts: vec![],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚨 [CRITICAL] This AmbientAgentTask literal is missing the current last_event_sequence and children fields, so the test target will not compile.

Suggested change
artifacts: vec![],
artifacts: vec![],
last_event_sequence: None,
children: vec![],


// When the session is ended, the input should be uneditable iff this is a viewer.
if self.model.lock().shared_session_status().is_viewer() {
if let Some(task_id) = owned_ambient_task_id {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ [IMPORTANT] This owned-task branch is not gated by HandoffCloudCloud, so with the feature disabled an owned ambient viewer skips the normal read-only cleanup and enters cloud-follow-up mode that later just errors. Gate this branch, or fall through to the viewer cleanup, when the flag is off.

Comment thread app/src/terminal/view.rs
ambient_agent_view_model.update(ctx, |model, ctx| {
model.submit_cloud_followup(prompt, ctx);
});
self.input.update(ctx, |input, ctx| {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ [IMPORTANT] After a follow-up is submitted, this leaves pending_cloud_followup_task_id set and re-enables editable agent input, so a second Enter before FollowupSessionReady sends another follow-up for the same run. Freeze or disable input, or clear the pending mode, until success/failure.

None,
);

self.pending_followup_prompt = Some(prompt);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ [IMPORTANT] This marks the prompt as pending before submit_run_followup is accepted; because FollowupDispatched inserts the optimistic query immediately, an API rejection still leaves a prompt rendered for a follow-up that never started. Defer optimistic rendering until acceptance or remove it on pre-accept failure.

@zachbai zachbai force-pushed the zb/continue-cloud-tombstone branch from a18c6a2 to 1077445 Compare April 28, 2026 22:56
@zachbai zachbai force-pushed the zb/add-execution-support-ambient-agent-model branch from 04c8f6b to 0cf8a89 Compare April 28, 2026 22:56
@zachbai zachbai force-pushed the zb/continue-cloud-tombstone branch from 1077445 to a495742 Compare April 28, 2026 22:59
@zachbai zachbai force-pushed the zb/add-execution-support-ambient-agent-model branch from 0cf8a89 to 318f8b9 Compare April 28, 2026 22:59
@zachbai zachbai force-pushed the zb/continue-cloud-tombstone branch from a495742 to ecbc7f9 Compare April 28, 2026 23:08
@zachbai zachbai force-pushed the zb/add-execution-support-ambient-agent-model branch from 318f8b9 to 184e5a8 Compare April 28, 2026 23:08
@zachbai zachbai force-pushed the zb/continue-cloud-tombstone branch from ecbc7f9 to 6599846 Compare April 28, 2026 23:36
@zachbai zachbai force-pushed the zb/add-execution-support-ambient-agent-model branch from 184e5a8 to 0440a49 Compare April 28, 2026 23:36
@zachbai zachbai force-pushed the zb/continue-cloud-tombstone branch from 6599846 to 1f1ac58 Compare April 28, 2026 23:41
@zachbai zachbai force-pushed the zb/add-execution-support-ambient-agent-model branch from 0440a49 to 3d57414 Compare April 28, 2026 23:41
@zachbai zachbai force-pushed the zb/continue-cloud-tombstone branch from 1f1ac58 to 608bcc4 Compare April 28, 2026 23:46
@zachbai zachbai force-pushed the zb/add-execution-support-ambient-agent-model branch 2 times, most recently from 5fa260b to 7abe5b4 Compare April 29, 2026 18:45
@zachbai zachbai force-pushed the zb/continue-cloud-tombstone branch from 608bcc4 to 2dcf967 Compare April 29, 2026 18:45
@zachbai zachbai force-pushed the zb/add-execution-support-ambient-agent-model branch from 7abe5b4 to 36a1eac Compare April 29, 2026 19:25
@zachbai zachbai force-pushed the zb/continue-cloud-tombstone branch from 2dcf967 to 973da8c Compare April 29, 2026 19:25
@zachbai zachbai force-pushed the zb/add-execution-support-ambient-agent-model branch from 36a1eac to cb69d57 Compare April 29, 2026 21:32
@zachbai zachbai force-pushed the zb/continue-cloud-tombstone branch from 973da8c to b4a2e4a Compare April 29, 2026 21:32
@zachbai zachbai force-pushed the zb/add-execution-support-ambient-agent-model branch 2 times, most recently from a9e2039 to 3471287 Compare April 29, 2026 21:54
@zachbai zachbai force-pushed the zb/continue-cloud-tombstone branch from b4a2e4a to c5c0843 Compare April 29, 2026 21:54
@zachbai zachbai force-pushed the zb/add-execution-support-ambient-agent-model branch from 036037d to 7c1b05f Compare May 1, 2026 17:29
Base automatically changed from zb/add-execution-support-ambient-agent-model to master May 1, 2026 17:55
@zachbai zachbai force-pushed the zb/continue-cloud-tombstone branch 2 times, most recently from 9023daa to 2ccc70c Compare May 1, 2026 18:18
@harryalbert harryalbert force-pushed the zb/continue-cloud-tombstone branch from 2ccc70c to a44fdd6 Compare May 2, 2026 01:09
@zachbai zachbai force-pushed the zb/continue-cloud-tombstone branch from a44fdd6 to ef277a2 Compare May 2, 2026 02:13
@harryalbert harryalbert force-pushed the zb/continue-cloud-tombstone branch from dbbca79 to cbef010 Compare May 2, 2026 20:42
@zachbai zachbai force-pushed the zb/continue-cloud-tombstone branch from cbef010 to dbbca79 Compare May 3, 2026 00:00
@zachbai zachbai requested a review from harryalbert May 3, 2026 00:05
@zachbai zachbai force-pushed the zb/continue-cloud-tombstone branch 2 times, most recently from 5d24aa4 to 5c23320 Compare May 3, 2026 00:25
@zachbai zachbai changed the title Ensure cloud conversation status updates in response to execution completion Add 'continue' (in cloud) button to cloud agent conversation tombstone. May 3, 2026
@zachbai zachbai force-pushed the zb/continue-cloud-tombstone branch from 5c23320 to acbe573 Compare May 3, 2026 02:27
Comment thread specs/APP-4364/TECH.md
Terminal input submission still assumes an active shared-session network. `Input::submit_viewer_ai_query` freezes the input, collects context attachments, and emits `InputEvent::SendAgentPrompt` in `app/src/terminal/input.rs (12400-12545)`. `TerminalView::handle_input_event` forwards that as `TerminalViewEvent::SendAgentPrompt` in `app/src/terminal/view.rs (19655-19666)`, and the viewer manager sends it to the current `Network` in `app/src/terminal/shared_session/viewer/terminal_manager.rs (1389-1402)`. Between cloud executions there is intentionally no current network, so PR 3 needs a separate follow-up submission route.
Cloud Mode setup-v2 already has UI to show startup progress and errors from the ambient model. This PR extends `AmbientAgentViewModel` with `pending_followup_prompt`, `should_show_followup_progress`, and `optimistically_rendered_user_queries` so follow-up setup can show progress without duplicating prompts after replay in `app/src/terminal/view/ambient_agent/model.rs (137-179, 532-578)`. `CloudModeInitialUserQuery` is now paired with `CloudModeFollowupUserQuery`, both backed by the shared `render_user_query` styling in `app/src/terminal/view/ambient_agent/block/query.rs`.
## Goals
Show a cloud “Continue” entrypoint on eligible ambient Cloud Mode tombstones behind `HandoffCloudCloud`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

At a product level, I'm not sure I understand the point of this tombstone option (as opposed to just leaving the input open and letting the user follow-up there). Once we have query-less cloud mode startups, I think this makes sense, but is there a reason in the meantime to have this button as opposed to just letting the user send a query directly?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Right now this is here for viewing cloud agent conversations that you did not start yourself. I'm not sure the tombstone is here to stay, just want to get this PR in and keep iterating

@harryalbert harryalbert force-pushed the zb/continue-cloud-tombstone branch from acbe573 to b2d5235 Compare May 3, 2026 19:56
@zachbai zachbai force-pushed the zb/continue-cloud-tombstone branch from b2d5235 to 24869dd Compare May 4, 2026 04:43
@zachbai zachbai force-pushed the zb/continue-cloud-tombstone branch 2 times, most recently from 4351499 to 2646979 Compare May 4, 2026 05:51
@zachbai zachbai force-pushed the zb/continue-cloud-tombstone branch from 2646979 to b10f263 Compare May 4, 2026 06:28
@zachbai zachbai merged commit 23eedf4 into master May 4, 2026
25 checks passed
@zachbai zachbai deleted the zb/continue-cloud-tombstone branch May 4, 2026 06:50
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