Keep empty child agent pills visible after exiting agent view#10206
Merged
Keep empty child agent pills visible after exiting agent view#10206
Conversation
When a child agent failed to start (or simply hadn't received its first event yet), clicking its pill in the orchestration pill bar correctly opened an empty conversation — but navigating back to the parent or to another child caused the failed pill to disappear from the bar. Cause: the ExitedAgentView handler in TerminalView auto-removes any conversation that was 'new' (zero original exchanges) and 'unmodified' (zero added exchanges) on exit. That cleanup is meant to prune accidentally-opened empty *root* conversations, but it was also firing for child agents that legitimately had zero exchanges and that the orchestrator's pill bar still needs to render. Fix: skip the auto-remove when the conversation is part of an orchestration tree, detected via AIConversation:: is_child_agent_conversation() (true when parent_conversation_id or parent_agent_id is set). Empty *root* conversations still get pruned as before. Co-Authored-By: Oz <[email protected]>
Contributor
|
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 Powered by Oz |
cephalonaut
approved these changes
May 6, 2026
Contributor
There was a problem hiding this comment.
Overview
This PR updates the agent-view exit cleanup path so empty child-agent conversations remain in the orchestration tree instead of being removed by the empty-root-conversation cleanup.
Concerns
- No blocking correctness or security concerns found in the changed lines.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Loom: https://www.loom.com/share/1e0d5494fe99423eb7a3cd042d0eaf14
Fixes https://linear.app/warpdotdev/issue/QUALITY-602/fix-child-agents-disappearing-when-opening-via-pill
Description
When a child agent failed to start (or simply hadn't received its first event yet), clicking its pill in the orchestration pill bar correctly opened an empty conversation — but navigating back to the parent or switching to another child caused the failed pill to disappear from the bar.
Cause: the
ExitedAgentViewhandler inTerminalViewauto-removes any conversation that was "new" (zero original exchanges) and "unmodified" (zero added exchanges) on exit. That cleanup is meant to prune accidentally-opened empty root conversations, but it was also firing for child agents that legitimately had zero exchanges and that the orchestrator's pill bar still needs to render.Fix: skip the auto-remove when the conversation is part of an orchestration tree, detected via
AIConversation::is_child_agent_conversation()(true whenparent_conversation_idorparent_agent_idis set). Empty root conversations still get pruned as before.Screenshots / Videos
N/A — pill bar repro is identical before/after click; the behavioral fix is "the pill no longer vanishes".
Testing
Manual repro:
The check reuses an existing
AIConversation::is_child_agent_conversation()accessor; no new state introduced.