Skip to content

Add stop and kill actions for orchestration pills#10526

Open
advait-m wants to merge 7 commits intomasterfrom
advait/stop-kill-orchestration-pills-20260507
Open

Add stop and kill actions for orchestration pills#10526
advait-m wants to merge 7 commits intomasterfrom
advait/stop-kill-orchestration-pills-20260507

Conversation

@advait-m
Copy link
Copy Markdown
Member

@advait-m advait-m commented May 8, 2026

Loom: https://www.loom.com/share/a76dedd771264a1a9d04df7b00c8f34c
Resolves https://linear.app/warpdotdev/issue/QUALITY-604/stopkill-agents-ui-with-correct-behavior-for-orchestration

Description

Adds Stop and Kill actions to child-agent orchestration pill overflow menus. Stop is a non-destructive cancellation action that leaves the child transcript/pane available for inspection; Kill is a destructive local teardown action that removes the child from the user's workspace after cancelling it if needed.

Stop vs Kill

  • Local Stop: cancels local agent progress, interrupts an active child command with Ctrl-C when applicable, marks the conversation cancelled if no response stream is still active, and keeps the child conversation/pane around.
  • Local Kill: stops the child if it is still running, informs the parent with a final synthetic Cancelled lifecycle event, tombstones the child's run ID so late events are ignored, then discards the child pane/conversation locally.
  • Cloud Stop: cancels the backing ambient task via the server API, shows user feedback, and keeps the child conversation visible.
  • Cloud Kill: best-effort cancels the backing ambient task if it is still running, informs the parent when appropriate, tombstones the run ID locally, and removes the child from local history/UI.

Technical Design

Stop and Kill share the same high-level resolution path: look up the child conversation's owner/task state, then route to either local terminal cancellation or cloud ambient-task cancellation. Stop is intentionally gated to in-progress children and keeps all local UI state intact, while Kill is always available because its primary meaning is "remove this child from my local workspace"; cancellation is only attempted when the child is still running.

For orchestration v2, Kill emits a final local Cancelled lifecycle event before removing the child so the parent agent can observe that the child was killed. It also records killed run IDs as bounded tombstones and filters late SSE events/messages from those runs, preventing deleted children from being resurrected by buffered server events while keeping the tombstone memory footprint capped.

Testing

Added unit tests
Validation run on this branch:

  • cargo fmt
  • cargo test -p warp --lib orchestration_events -- --nocapture
  • cargo test -p warp --lib orchestration_event_streamer -- --nocapture
  • cargo check -p warp
  • git --no-pager diff --check

Co-Authored-By: Oz <oz-agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label May 8, 2026
advait-m and others added 3 commits May 8, 2026 17:02
Co-Authored-By: Oz <oz-agent@warp.dev>
Co-Authored-By: Oz <oz-agent@warp.dev>
Co-Authored-By: Oz <oz-agent@warp.dev>
@advait-m advait-m marked this pull request as ready for review May 10, 2026 06:28
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 10, 2026

@advait-m

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

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 Stop and Kill actions for orchestration child-agent pills, including local/cloud cancellation paths, synthetic cancellation lifecycle events, killed-run tombstones, pane teardown, and unit tests.

Concerns

  • The new emit_child_killed unit tests call start_new_child_conversation without the required orchestration_harness argument, so the test target will not compile.

Verdict

Found: 0 critical, 2 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

Comment thread app/src/ai/blocklist/orchestration_events_tests.rs
Comment thread app/src/ai/blocklist/orchestration_events_tests.rs
advait-m and others added 2 commits May 9, 2026 23:47
@advait-m advait-m requested a review from cephalonaut May 10, 2026 06:54
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