Hide child (orchestrated) agent conversations from the conversation list
Description
Fixes child (orchestrated) agent conversations showing up in the conversation list — often rendered as cloud agents.
Root cause: AgentConversationsModel::get_entries builds the list from three sources: ambient tasks, the live nav-data path, and a persisted/cloud-metadata fallback. The live nav path already excludes child agents via AIConversation::should_exclude_from_navigation → is_child_agent_conversation, but the task loop and the persisted-metadata fallback did not — so children leaked in (most visibly right after a restart, when only persisted/cloud metadata exists). They rendered as cloud because local children carry a server conversation token (CloudSyncedConversation).
What changed:
- Added a shared
is_child_agent(parent_conversation_id, parent_agent_id)predicate inconversation.rsas the single source of truth;AIConversation::is_child_agent_conversation/has_parent_agentdelegate to it. - Added
parent_conversation_id+parent_agent_idtoAIConversationMetadatawith a matchingis_child_agent_conversation(), so child status is known without loading the conversation. Populated from the loaded conversation / persisted data and preserved acrossmerge. get_entriesnow excludes child tasks (cloud children carryparent_run_id) and child conversations (via the metadata/loaded predicate), recording suppressed child conversation IDs so a child surfacing on multiple paths is removed consistently. Covers both local and cloud children.
Reported via the factory-client Slack triage thread: https://warpdev.slack.com/archives/C0BCE7AELJ2/p1782415775245709?thread_ts=1782415775.245709&cid=C0BCE7AELJ2
Linked Issue
N/A — reported through the factory-client Slack triage thread linked above.
Testing
cargo check -p warp --testspasses.cargo clippy -p warp --testsis clean.- Added regression tests (all passing):
test_get_entries_excludes_child_agent_task— a cloud child task (parent_run_idset) is excluded from the list.test_get_entries_excludes_child_agent_conversation— a child conversation (which would otherwise classify as cloud via its server token) is excluded, while a normal conversation still appears.test_conversation_metadata_child_predicate_matches_conversation— the metadata predicate matchesAIConversation's for the same parent linkage (guards against drift).
Screenshots / Videos
This change is user-visible (the conversation list), but I was not able to run the full hands-on computer_use UI verification of the restoration scenario in this runner. Building the test binaries already hit the environment's memory limit (the standard build was OOM-killed; tests only completed after disabling debuginfo and forcing a single build job, ~20 min), and reproducing the exact symptom additionally requires a logged-in server session running a local multi-agent orchestration plus an app restart. The behavior is covered by the unit tests above and mirrors the existing, proven should_exclude_from_navigation exclusion. Flagging for reviewer awareness.
- [ ] I have manually tested my changes locally with
./script/run(see note above)
Agent Mode
- [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode
CHANGELOG-BUG-FIX: Fixed local child agent conversations from orchestrated conversations sometimes appearing in the conversation list (including being shown as cloud agents).
Conversation: https://staging.warp.dev/conversation/fcd44e8e-c56a-4f14-ac08-19d172e97fa3 Run: https://oz.staging.warp.dev/runs/019f0042-5d99-7f0e-94dc-3ecb21555187
This PR was generated with Oz.
@warp-dev-github-integration[bot]
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
Addressed the review:
has_items()consistency — fixed in c411974; it now mirrors the child-agent visibility filter used byget_entries()(with a regression test). Replied inline.- Visual evidence — I was unable to capture screenshots/recording of the hidden-child scenario in this cloud runner: building the test binaries already hit the environment memory limit (the standard build was OOM-killed; tests only completed with debuginfo disabled and a single build job), and reproducing the exact behavior additionally requires a logged-in server session running a local multi-agent orchestration plus an app restart. The behavior is covered by unit tests (
test_get_entries_excludes_child_agent_task,test_get_entries_excludes_child_agent_conversation,test_has_items_excludes_child_only_model) and mirrors the existingshould_exclude_from_navigationexclusion. Flagging for a human reviewer to confirm visually if needed.
/oz-review
- #13059
👈 (View in Graphite) master
This stack of pull requests is managed by Graphite. Learn more about stacking.