“Continue in worktree” creates a worktree, but Codex keeps working in the original checkout
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- git, rust
- Domain
- desktop, developer-experience
Research direction
Start by tracing the Continue in worktree transition and compare the thread’s worktree metadata with the agent shell, writable workspace root, Environment panel, Copy working directory, and Open in IntelliJ paths. Reproduce the steps and verify that the agent’s pwd, file changes, branches, terminal commands, and repository context all use the worktree and that the Environment panel identifies it as a worktree.
Written by the indexing model from the issue text.
Description
What version of the Codex App are you using (From “About Codex” dialog)?
26.715.52143
What subscription do you have?
Pro 200$
What platform is your computer?
Darwin 25.5.0 arm64 arm
What issue are you seeing?
Description
I started a thread in a normal local checkout and then selected Continue in worktree. The worktree was created, but the thread entered an inconsistent state where different features referred to different directories.
This has happened more than once.
Observed behavior
- The thread list item indicates that the thread is in a worktree.
- Open in IntelliJ opens the worktree directory.
- Copy working directory copies the path of the original, non-worktree checkout.
- The Environment panel still shows Local.
- The agent’s shell working directory and writable workspace root remain pointed at the original checkout.
- Consequently, the agent creates branches, edits files, runs tests, and starts builds in the original checkout.
This suggests that the thread’s worktree metadata and IDE integration are updated, while its runtime environment remains attached to the original directory.
Expected behavior
After selecting Continue in worktree, every part of the thread should consistently use the new worktree:
- Agent working directory
- Writable workspace root
- Terminal and command execution
- Copy working directory
- Open in IntelliJ
- Environment panel
- Thread list indicator
- Repository and Git context
The environment should identify itself as a worktree rather than continuing to display Local.
What steps can reproduce the bug?
Steps to reproduce
- Start a thread in a normal local repository checkout.
- Select Continue in worktree.
- Confirm that the thread list displays the worktree indicator.
- Compare the results of:
- Open in IntelliJ
- Copy working directory
pwdin the agent’s shell- The Environment panel
- Ask the agent to modify files or create a branch.
- Observe that the changes are made in the original checkout rather than the worktree.
What is the expected behavior?
No response
Additional information
No response
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
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.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
A-linter
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxc-project/oxc#26863 ·