Empty collaboration waits can keep a provider turn running indefinitely
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 23k
- Forks
- 5.9k
- Avg merge
- 11h 14m
- Merged PRs (30d)
- 357
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files or tests; start by tracing the provider integration's collaboration wait completion path and how agentsStates and receiverThreadIds affect turn progression. Done means an empty wait cannot repeat indefinitely, while legitimate long-running tools and active subagents remain unaffected, and the root turn can finish or continue appropriately.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- ai-infra-agents
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100