“Create permanent worktree” button doesn’t run env setup, doesn’t appear in Settings → Worktrees, and isn’t deleted when removed

Open 💬 3 comments Opened Feb 24, 2026 by thomaspmach

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

Version 26.217.1959 (669)

What subscription do you have?

Plus

What platform is your computer?

Darwin 24.5.0 arm64 arm

What issue are you seeing?

<img width="367" height="150" alt="Image" src="https://github.com/user-attachments/assets/3a7e6382-a326-4196-bb5a-3301643e91db" />

When I click “Create permanent worktree” on a project in the sidebar, Codex creates the permanent worktree, but it does not run the project’s environment “Run” script / setup command.

Additionally, the worktree created via this action does not show up in Settings → Worktrees (the worktrees list).

Also, after removing it from the sidebar, the worktree isn't automatically deleted, unlike worktrees created via other UI actions.

Why this matters

The Codex app is built around agent management. In practice, worktree management is essential to that experience.

If the environment setup doesn’t run and the worktree isn’t automatically deleted when removed from the sidebar, it adds repetitive manual steps and makes worktree management harder. It essentially breaks the experience the app is trying to create.

The “Create permanent worktree” action seems broken. It isn’t consistent with the other ways of creating a worktree in the Codex app.

What steps can reproduce the bug?

  1. Open the Codex app.
  2. Right-click a project in the sidebar.
  3. Click Create permanent worktree.
  4. Observe that the worktree is created, but the environment “Run” script/setup command does not run.
  5. Go to Settings → Worktrees and confirm the new worktree is not listed.
  6. Remove the project from the sidebar and notice that the worktree still appears in git worktree list.

What is the expected behavior?

It should work the same way as the other ways of creating a worktree in the UI:

  • Automatically run the configured environment command (the “Run” script / environment setup) for that worktree.
  • Add the new permanent worktree to the list in Settings → Worktrees.
  • Automatically delete the worktree after removing the project from the sidebar.

Additional information

The idea behind this button is excellent, kudos to the team. It improves worktree management significantly. Please don’t remove it; it just needs to behave as expected.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗