[Bug] Inter-agent message can cause Codex to resurrect and answer an old user prompt
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
Summary
In a long-running Codex conversation that uses other Codex agents/subagents to send updates back to the main thread, receiving a new inter-agent message can cause the main Codex to respond to a much older user message instead of the newly received agent update/current task state.
The old user message had already been handled earlier in the conversation. When this happens, the new response is visibly unrelated to the current point in the workflow.
This appears more specific than a general "responds to an older message" problem because the recurring trigger observed here is a message/update arriving from another Codex agent/subagent.
Reproduction pattern
- User sends message A to the main Codex thread.
- Codex handles message A normally.
- Many additional turns and task work happen afterward.
- Another Codex agent/subagent sends a new progress/update message to the main thread.
- The main Codex wakes up, but instead of processing that new inter-agent message/current context, it responds again to old message A.
- The same stale-message behavior can recur after later agent-to-agent updates.
Expected behavior
A newly received inter-agent message should be processed as the latest relevant event in the current thread state. Codex should continue from the current task/context and should not treat an already-completed historical user prompt as if it had just been received again.
Actual behavior
After an inter-agent update arrives, the main Codex can resurrect and answer an older user prompt that was already completed much earlier in the thread.
Impact
- Breaks multi-agent orchestration workflows.
- Produces duplicate or unrelated work.
- Wastes tokens/time.
- Can be risky if stale instructions cause old code changes or operations to be repeated.
- Makes it hard to trust agent-to-agent handoffs in long-running threads.
Suspected failure boundary
Not claiming a confirmed root cause, but the symptom looks consistent with a problem in one of these areas:
- ordering/injection of inter-agent messages versus historical user turns;
- active-turn/task pointer restoration;
- thread/context reconstruction after an agent update;
- stale task state being selected when the parent thread wakes.
The key observation is that agent-to-agent delivery appears to be the trigger, not simply a user sending another normal message.
Related issues
Possibly related, but not necessarily duplicates:
- #8648 — Codex replies to earlier messages instead of the latest one in conversations.
- #43632 — scheduled heartbeat in a long thread answers an older request.
- #45464 — context compaction can resurrect a stale task.
This report adds a narrower and repeatedly observed trigger: a new message from another Codex agent/subagent causes the parent/main thread to answer an old human user prompt instead of the new agent message.
Diagnostics
An in-app feedback report with diagnostic logs was submitted for the affected incident.
In-app Feedback ID: 01a093e9-fc95-7a51-8199-c56b25aef09e
A screenshot of the incident is available. In the visible conversation, Codex itself acknowledges that it mixed up the context and responded to an earlier problem after receiving new progress from another agent.
Environment
Exact Codex app version/model build was not captured in this report. The issue was observed in the Codex app during a long-running multi-agent workflow.
If useful, the diagnostic upload associated with the Feedback ID above should contain the exact thread/runtime information needed to inspect message ordering.
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
No source file, test, or entry point is named. Start by reproducing the long-running multi-agent workflow described in the issue and inspect diagnostic feedback 01a093e9-fc95-7a51-8199-c56b25aef09e for message ordering and task-state details. Done means the newest inter-agent update is handled without resurrecting a completed user prompt.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- ai-infra-agents
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100