[QUALITY-598] Exclude child agent initial prompt from history completions#10304
Conversation
|
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 |
There was a problem hiding this comment.
Overview
This PR adds a flat child-conversation index and uses it to filter child-agent conversation prompts out of AI prompt history across live, cleared, and persisted sources.
Concerns
- Manual testing is required for changes that can be manually tested. Please include screenshots or a screen recording that show the prompt completion history excluding child agent prompts while preserving regular user prompts, or justify why visual evidence is not possible.
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
38b5434 to
ae599e4
Compare
|
Hey Lili - realized previous approach was too broad. I really just want to skip first exchange of child conversations so that the initial child agent prompt is not included. |
ae599e4 to
cfe7375
Compare
Skip the synthetic orchestrator prompt in child agent conversations by using .skip(1) on root_task_exchanges() when the conversation is a child. This preserves user follow-up queries while requiring no persistence changes — is_child_agent_conversation() is derived from parent_conversation_id/parent_agent_id which are already persisted. Also clears children_by_parent in reset() for consistency. Closes QUALITY-598 Co-Authored-By: Oz <oz-agent@warp.dev>
cfe7375 to
2fccbd9
Compare
liliwilson
left a comment
There was a problem hiding this comment.
Nice, this makes sense to me!
…ions (warpdotdev#10304) ## Description Skip the synthetic orchestrator prompt in child agent conversations by using `.skip(1)` on `root_task_exchanges()` when the conversation is a child (`is_child_agent_conversation()`). User follow-up queries in the same child conversation are preserved. This approach requires no persistence changes — `is_child_agent_conversation()` is derived from `parent_conversation_id`/`parent_agent_id` which are already persisted in `AgentConversationData`. It works correctly across app restarts and server-restored conversations. Also clears `children_by_parent` in `reset()` for consistency (pre-existing omission). ## Linked Issue - [QUALITY-598](https://linear.app/warpdotdev/issue/QUALITY-598/exclude-child-agent-prompts-from-history-completions) ## Testing Manual: ran orchestration spawning child agents, verified the orchestrator's initial prompt no longer appears in agent input completions while user follow-up queries in revealed child panes still appear. ## Agent Mode - [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode --- [Conversation](https://staging.warp.dev/conversation/1cd70e6d-e2d8-44a1-86fd-33a12fdd585c) | [Plan](https://staging.warp.dev/drive/notebook/RatsJ03TieFO8Ax5hxso9b) CHANGELOG-BUG-FIX: Child agent initial prompts (from orchestrator) no longer appear in the agent input completion history. Co-authored-by: Oz <oz-agent@warp.dev>
…ions (warpdotdev#10304) ## Description Skip the synthetic orchestrator prompt in child agent conversations by using `.skip(1)` on `root_task_exchanges()` when the conversation is a child (`is_child_agent_conversation()`). User follow-up queries in the same child conversation are preserved. This approach requires no persistence changes — `is_child_agent_conversation()` is derived from `parent_conversation_id`/`parent_agent_id` which are already persisted in `AgentConversationData`. It works correctly across app restarts and server-restored conversations. Also clears `children_by_parent` in `reset()` for consistency (pre-existing omission). ## Linked Issue - [QUALITY-598](https://linear.app/warpdotdev/issue/QUALITY-598/exclude-child-agent-prompts-from-history-completions) ## Testing Manual: ran orchestration spawning child agents, verified the orchestrator's initial prompt no longer appears in agent input completions while user follow-up queries in revealed child panes still appear. ## Agent Mode - [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode --- [Conversation](https://staging.warp.dev/conversation/1cd70e6d-e2d8-44a1-86fd-33a12fdd585c) | [Plan](https://staging.warp.dev/drive/notebook/RatsJ03TieFO8Ax5hxso9b) CHANGELOG-BUG-FIX: Child agent initial prompts (from orchestrator) no longer appear in the agent input completion history. Co-authored-by: Oz <oz-agent@warp.dev>
Description
Skip the synthetic orchestrator prompt in child agent conversations by using
.skip(1)onroot_task_exchanges()when the conversation is a child (is_child_agent_conversation()). User follow-up queries in the same child conversation are preserved.This approach requires no persistence changes —
is_child_agent_conversation()is derived fromparent_conversation_id/parent_agent_idwhich are already persisted inAgentConversationData. It works correctly across app restarts and server-restored conversations.Also clears
children_by_parentinreset()for consistency (pre-existing omission).Linked Issue
Testing
Manual: ran orchestration spawning child agents, verified the orchestrator's initial prompt no longer appears in agent input completions while user follow-up queries in revealed child panes still appear.
Agent Mode
Conversation | Plan
CHANGELOG-BUG-FIX: Child agent initial prompts (from orchestrator) no longer appear in the agent input completion history.