Skip to content

Fix orchestration viewer: defer child registration when parent conversation not yet available (REMOTE-2141)#13665

Draft
seemeroland wants to merge 1 commit into
masterfrom
oz-agent/REMOTE-2141-fix-orchestration-viewer
Draft

Fix orchestration viewer: defer child registration when parent conversation not yet available (REMOTE-2141)#13665
seemeroland wants to merge 1 commit into
masterfrom
oz-agent/REMOTE-2141-fix-orchestration-viewer

Conversation

@seemeroland

Copy link
Copy Markdown
Contributor

Description

Fixes a regression where orchestration agent chips (pill bar) were missing and child agents showed as "Unknown agent" when viewing a cloud Oz orchestrated run's session in the Warp client.

Root cause: A race condition in OrchestrationViewerModel::register_child. When the orchestration viewer first discovers child runs (via ancestor seed fetch or legacy polling), find_parent_conversation_id can return None because the parent conversation hasn't been established yet — the StreamInit event from the shared session hasn't been processed. Previously, child tasks were silently dropped with no retry, so chips and agent names never appeared.

Additionally, in the legacy polling path, when all child tasks failed to register (because the parent wasn't available), idle_due_to_no_children = true was set incorrectly. This stopped all future polling — even once the parent conversation became available — permanently preventing chips from appearing for completed/historical runs.

Fix:

  • Introduce a deferred_tasks queue: when register_child can't find the parent conversation, store the task instead of dropping it
  • Flush deferred tasks when the parent conversation becomes available:
    • On SetActiveConversation/ConversationServerTokenAssigned events (streaming path)
    • On orchestrator AppendedExchange when idle polling resumes (legacy path)
  • Fix the idle_due_to_no_children flag: only enter idle when the server truly returned no tasks, not when tasks were received but deferred

Linked Issue

Linear: REMOTE-2141

  • The linked issue is labeled ready-to-spec or ready-to-implement.

Testing

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

This fix addresses a race condition in the orchestration viewer model. Existing tests in orchestration_viewer_model_tests.rs continue to pass. The change adds the deferred_tasks field to the struct and updates the setup_model test helper accordingly.

Agent Mode

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

Conversation: https://staging.warp.dev/conversation/e62aba4c-20f8-4129-a8b9-adaadd08f4c8
Run: https://oz.staging.warp.dev/runs/019f5cde-2c2d-7ac3-b8b7-f0d0945220bf

This PR was generated with Oz.

…sation not yet available

When viewing a cloud Oz orchestrated run (via session link), child agent
placeholder conversations were not being created in the viewer model,
causing:
- Missing agent chips (orchestration pill bar) in the session view
- Child agents showing as 'Unknown agent' in the conversation transcript

Root cause: a race condition in .
When child tasks are fetched from the server (via ancestor seed fetch or
legacy polling),  may return None because the
parent conversation hasn't been set as active yet (StreamInit hasn't been
processed). Previously, this dropped the task with no retry, meaning chips
and agent names never appeared.

Fix:
- Store failed-to-register tasks in a new  queue instead
  of dropping them
- Flush the queue when the parent conversation becomes available
  (on  or  events
  for the viewer's terminal surface)
- Also flush deferred tasks when the legacy polling path resumes from idle
  (on an orchestrator-scoped )
- Fix the legacy polling path's  flag: only
  enter idle when the server truly returned no tasks, not when tasks were
  received but deferred due to a missing parent conversation

REMOTE-2141

Co-Authored-By: Oz <oz-agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label Jul 13, 2026
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