Skip to content

Fix remote-control session end removing local input box (APP-4604)#11660

Open
vorporeal wants to merge 2 commits into
masterfrom
david/app-4604-remote-control-input-box
Open

Fix remote-control session end removing local input box (APP-4604)#11660
vorporeal wants to merge 2 commits into
masterfrom
david/app-4604-remote-control-input-box

Conversation

@vorporeal

Copy link
Copy Markdown
Contributor

Description

Fixes APP-4604: after a /remote-control session with a local orchestrator hit the 100MB session-sharing limit, the local Warp app rendered the conversation as completed and removed the input box, blocking further input.

The 100MB error itself is expected — it's the per-session max_session_bytes_size sharing limit enforced client-side, which terminates the shared session. The bug is in how the client reacts to the session ending.

QUALITY-726 (#11465) changed /remote-control to start a User share that carries a sidecar orchestrator source_task_id. TerminalModel::ambient_agent_task_id() now returns that id, so when the shared session ends, on_session_share_ended runs the cloud-handoff continuation logic (cloud_conversation_continuation_ui_state) and can insert a "conversation ended" tombstone — removing the input box — even though the local conversation is still running. The same path also triggers on a normal stop of remote control, not just the 100MB error.

This change gates the continuation logic so it only applies to genuine cloud (ambient agent) conversations: it bails out when the session source is set to a non-ambient (User) kind. Sessions with no source (e.g. restored cloud-mode panes, finished viewers) are unaffected, preserving the cloud-handoff and restored-tombstone flows. This matches QUALITY-726's stated invariant that a User share carrying source_task_id must not activate cloud UI.

Linked Issue

APP-4604 (Linear)

Testing

  • Added regression test test_on_session_share_ended_keeps_input_for_user_share_with_source_task_id covering a User share with a source_task_id whose task would otherwise resolve to a tombstone — asserting no tombstone is inserted and the input box stays editable.

  • Ran the shared-session continuation/tombstone test suite (11 tests) — all pass, including existing cloud-handoff, finished-viewer, and restored-tombstone cases.

  • cargo fmt (no changes) and cargo clippy -p warp --lib --tests -- -D warnings (clean).

  • I have manually tested my changes locally with ./script/run

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Conversation: https://staging.warp.dev/conversation/08db43ce-12cb-42f7-ae6a-cda89706c3da
Run: https://oz.staging.warp.dev/runs/019e6012-9dfa-79e0-a2df-ba140bd4ab2a

This PR was generated with Oz.

After QUALITY-726, a `/remote-control` share of a local conversation is a
`User` share that carries a sidecar orchestrator `source_task_id`. When that
share ended (for example when the session hit the 100MB sharing limit),
`cloud_conversation_continuation_ui_state` resolved a task and ran the
cloud-handoff continuation logic, which could insert a "conversation ended"
tombstone and remove the input box for a still-running local conversation.

Gate the continuation logic so it only applies to genuine cloud (ambient
agent) sessions: bail out when the session source is set to a non-ambient
kind. Sessions with no source (restored cloud-mode panes, finished viewers)
are unaffected.

Co-Authored-By: Oz <oz-agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label May 25, 2026
@vorporeal vorporeal requested a review from zachbai May 25, 2026 17:53
@vorporeal vorporeal marked this pull request as ready for review May 25, 2026 17:53
@oz-for-oss

oz-for-oss Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

@vorporeal

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

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

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.

Overview

This PR gates cloud handoff continuation handling so non-ambient /remote-control user shares with a sidecar source_task_id do not render the conversation-ended tombstone, and it adds a regression test for that path.

Concerns

  • ⚠️ [IMPORTANT] For this user-facing change, please include screenshots or a screen recording demonstrating the remote-control session-end path keeping the local input box available end to end.

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

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.

1 participant