[Codex app] Settings > Worktrees ignores custom git-worktree-root

Resolved 💬 0 comments Opened Jul 13, 2026 by iamgqb Closed Jul 13, 2026

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

26.707.62119 (build 5211)

What subscription do you have?

Pro

What platform is your computer?

Darwin 25.5.0 arm64 arm

What issue are you seeing?

Description

When git-worktree-root is configured to use a custom directory, Codex correctly creates and manages worktrees under that directory, but Settings > Worktrees does not display them.

Manually refreshing the list, restarting Codex, and updating to the latest version did not resolve the issue.

Configuration

git-worktree-root = "/Users/<user>/workspace/managed-worktrees"
worktree-keep-count = 5

What steps can reproduce the bug?

Steps to reproduce

  1. Configure git-worktree-root with a non-default directory.
  2. Start a Codex task in Worktree mode.
  3. Confirm that Codex creates the worktree at a path similar to:

``text
/Users/<user>/workspace/managed-worktrees/<4-hex-id>/<repository>
``

  1. Open Settings > Worktrees.
  2. Refresh the worktree list.

What is the expected behavior?

The Worktrees settings page should list managed worktrees from the effective configured git-worktree-root.

Additional information

Diagnostics

The missing worktree itself appears healthy:

  • git worktree list reports it as a valid detached worktree.
  • Its .git file points to the corresponding worktree entry in the main repository.
  • It contains a valid codex-thread.json with an ownerThreadId.
  • The owning task exists in Codex's local thread database, is not archived, and its cwd matches the worktree path.
  • The generated parent directory matches the expected four-character hexadecimal format.

I also inspected the behavior of the packaged client. Worktree creation and automatic cleanup appear to receive the effective custom worktree root, while the request used by Settings > Worktrees does not appear to include worktreesRoot. The worker consequently falls back to $CODEX_HOME/worktrees.

In summary:

  • Worktree creation: uses the configured custom root.
  • Automatic cleanup: uses the configured custom root.
  • Settings worktree listing: appears to omit the custom root and use the default directory.

In my environment, $CODEX_HOME/worktrees did not exist, while the Codex-managed worktree existed under the configured custom root.

View original on GitHub ↗