Skip to content

bug(orchestration): a child whose provider starts in >30 s is adopted without its bootstrap prompt #1370

Description

@Juliusolsson05

Problem

orchestration_create_agent waits at most 30 s for the renderer's create-agent answer (OrchestrationBridge.dispatchRendererRequest, TIMEOUT_MS = 30_000). The renderer answers only after the child's provider has started. createOrchestrationAgent awaits spawn, then window.api.spawnSession, then main's session.start().

A provider start that is slow but healthy therefore makes the create outcome unknown. The caller gets OrchestrationOutcomeUnknownError ("do not repeat"), and the MCP handler never delivers the bootstrap prompt. When the renderer answers later, adoptLateResponse files the child with bootstrapPromptDelivered: false. The parent ends up with an idle child that never received its brief.

Evidence

Not decided here

Whether to:

  • (a) deliver the bootstrap prompt when a timed-out create is adopted late (main holds the request, and armPromptWhenReady already waits for readiness); or
  • (b) give create-agent a deadline derived from the provider's start budget.

Option (b) conflicts with MCP clients' own tool-call timeouts: a Codex parent's defaults are shorter than 120 s.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    class:C3-silent-failureThe app knows it failed and does not saysev:P2Real bug with a workaroundtype:bugSomething works wrong

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions