Codex confuses cwd with target worktree

Resolved 💬 3 comments Opened Feb 19, 2026 by budivoogt Closed May 14, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

Model often trips over the wd in which the Codex CLI thread has been started, and any new worktree it may have created in which it begins shipping new code. Later, as context fills, it regularly regresses to using the origin wd in which the convo was started, despite having (received direction to) worked in a new worktree.

Guardrails in agents.md don't appear to solve the issue.

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 6 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #11718
  • #12008
  • #12128
  • #11757

Powered by Codex Action

etraut-openai contributor · 6 months ago

If you're able to repro this, please use the /feedback slash command to upload logs and session details, then post the thread ID here. Without this additional information, there's not much we can do to diagnose the problem.

etraut-openai contributor · 3 months ago

Closing because of no response.