Feature worktree edits land in the main worktree
Resolved 💬 2 comments Opened Oct 22, 2025 by shanev Closed Jan 10, 2026
What version of Codex is running?
codex-cli 0.47.0
What subscription do you have?
Pro
Which model were you using?
gpt-5-codex
What platform is your computer?
Darwin 25.0.0 arm64 arm
What issue are you seeing?
If a feature worktree is created while in a session on the main worktree, it often writes to the main worktree, leaving both in a bad state.
What steps can reproduce the bug?
- Launch Codex from the main git worktree.
- Ask it to create a new worktree (and branch) for a feature.
- It will often write to the main worktree accidentally, corrupting any ongoing work in that worktree.
What is the expected behavior?
- Launch Codex from the main git worktree.
- Ask it to create a new worktree (and branch) for a feature.
- It will make edits in the feature worktree / branch.
Additional information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗