openai / openai/codex

Codex App: full-history subagent forks can lose workspace tools after compaction

Open
#40,890 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug context subagent tool-calls
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What version of the Codex App are you using (From “About Codex” dialog)?

26.818.61809 (build 7019)

What subscription do you have?

ChatGPT Pro

What platform is your computer?

Darwin 25.6.0 arm64 arm

What issue are you seeing?

In Multi-Agent V2, a subagent spawned with fork_turns="all" from a compacted parent thread can receive no workspace tools. The child cannot invoke exec, read files, or edit the workspace; only the codex_app dynamic namespace is present.

From the same parent thread, spawning the same agent type with fork_turns="none" immediately provides exec and normal workspace access.

What steps can reproduce the bug?
  1. Use a long-running Codex App thread that has undergone compaction.
  2. Spawn a subagent with fork_turns="all" and ask it to run a command or read a workspace file.
  3. Observe that the child has no callable workspace tools. A follow-up turn does not restore them.
  4. From the same parent, spawn the same agent type with fork_turns="none".
  5. Observe that the new child can invoke exec immediately.

Observed in the same parent thread:

  • Parent session: 01a03db5-5284-7352-8680-f149957387be
  • fork_turns="all" failures: 01a03e5f-18f5-7150-8538-344970d8ca80, 01a03e5f-e357-7d73-b22a-a8e422c5da72, 01a03e6c-9c2b-7811-b382-e0d1f745a257
  • fork_turns="none" success: 01a03e6d-0737-7131-8efa-374e5838d032

The result was 3/3 failures for full-history forks and 1/1 success for the context-free fork. Context-window usage was not displayed, but the parent had just undergone compaction.

What is the expected behavior?

History inheritance and compaction should not change the workspace tool set available to a subagent. A child spawned with fork_turns="all" should retain the same applicable workspace tools as one spawned with fork_turns="none".

Additional information
  • Embedded CLI recorded in session metadata: 0.149.0-alpha.4.3
  • Multi-agent version: v2
  • Workaround: use fork_turns="none"
  • Full rollout files contain private repository context and are not attached publicly. Sanitized excerpts can be provided if needed.

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.

Research direction

No source files or tests are named. Start in the Multi-Agent V2 handling for fork_turns and compaction, comparing full-history forks with context-free forks; done means a compacted parent does not remove applicable workspace tools from the child.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
ai-infra-agents, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.