Skip to content

Empty collaboration waits can keep a provider turn running indefinitely #5754

Description

@mikeyperes

Problem

A live Codex provider turn can enter a permanent loop that invokes the collaboration wait tool every 30 seconds even though each completed tool item reports both:

  • agentsStates: {}
  • receiverThreadIds: []

The provider process remains alive, so ordinary provider-process liveness checks correctly consider the session live. The projection therefore remains running indefinitely even though there is no agent left to wait for and no useful work occurs.

This is distinct from a provider process dying during restart.

Expected behavior

When collaboration wait completes with no live/receivable agents, the turn must not silently re-enter the same empty wait forever. The provider integration should surface a terminal/no-agents result that lets the root continue or finish, or apply a narrowly scoped guard against repeated empty waits.

Evidence

In the reproduced turn, consecutive collab_agent_tool_call items completed at 30-second intervals with empty agent state and empty receiver IDs while the orchestration turn remained running. Stopping through the supported thread.session.stop command immediately produced a clean interrupted turn, stopped session/runtime, and cleared activeTurnId.

Any fix should target this exact empty-wait condition and must not impose a generic timeout on legitimate long-running tools or active subagents.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions