Codex Desktop routed a prompt into the wrong project task after context compaction

Open
#35,307 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
macos, rust
Domain
desktop

Research direction

Start with the submitted feedback session ID and the internal task history and logs. Compare the context-compaction turn with the unexpected persisted userMessage and the two task contexts to trace how routing crossed project boundaries. Done means identifying the routing or persistence failure and confirming that messages remain isolated across open tasks and compaction.

Written by the indexing model from the issue text.

Description

app bug context session

Summary

Codex Desktop appears to have routed and persisted a prompt intended for one task into a different task associated with another local project.

The unexpected prompt was stored in the affected task as a genuine userMessage, rather than as ambient browser context or assistant-generated content. Its wording and requested feature closely matched a separate task that was open in Codex at the time.

Product

  • Codex Desktop on macOS
  • Component: task/thread routing and message persistence
  • Approximate occurrence: 16 July 2026, 15:04 IST
  • Session ID submitted through feedback: 019f5fa3-0522-7f51-af8b-1fc82c956a2f

Observed behavior

  1. Two unrelated Codex tasks existed, each connected to a different local project.
  2. One task contained a questionnaire-style application with discipline-scoped random-prefill behavior.
  3. The other task was an unrelated website project.
  4. After a context-compaction event in the unrelated website task, a prompt requesting deployment plus discipline-scoped random filling appeared there and was persisted as a user-authored message.
  5. Codex then acted on that prompt in the wrong project context.

A read-only audit of the task history showed:

  • A context-compaction turn completed shortly before the unexpected message.
  • The unexpected text was persisted in the affected task as a real userMessage.
  • A separate task contained the matching terminology, feature history, and deployment request.
  • The message was not part of the compaction summary and was not ambient browser state.

Expected behavior

A message composed for one task should only be delivered to that selected task. Task focus, project directory, and message persistence should remain isolated across open tasks, including before and after context compaction or an application update.

If the active project and prompt context differ substantially, Codex Desktop should not silently route the message to another task.

Impact

The agent began operating on the wrong local project and could have made or deployed unrelated changes. This creates a meaningful data-integrity and project-isolation risk.

Reproduction

I do not have a deterministic reproduction yet. The event occurred while multiple project tasks existed in Codex Desktop and shortly after context compaction. An application update may have occurred around the same period, but that relationship is unconfirmed.

Privacy

Project names, personal content, file paths, and the verbatim private prompt have been omitted. The feedback session ID above should provide OpenAI maintainers with the internal task history and logs needed to investigate.

Dominant language
Rust
Stars
125k
Forks
19.5k
Avg merge
1m
Merged PRs (30d)
1k

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openai/codex

All issues in openai/codex

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.