Skip to content

Way to configure location of worktrees #10599

Description

@adnanjpg

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

Version 260203.1501 (523)

What subscription do you have?

ChatGPT Plus

What issue are you seeing?

In the Codex macOS app, when I use the UI flow to create a Git worktree, Codex always creates the worktree under a fixed default location:

/Users/{myuser}/.codex/worktrees/{worktreeid}/{MyProject}

There is no setting or UI option to choose/configure where the worktree should be created.

This is a major issue for workflows where the repo lives on an external/remote-mounted drive (e.g. SMB mounted volume). In my case, the repo lives here:

/Volumes/home/{MyProject}

Since the project is large and needs to run from the mounted volume, worktrees should ideally be created in the same volume (or at least a user-configurable directory). Instead, the worktree gets placed on the local machine under ~/.codex/worktrees/, which breaks the workflow.

What steps can reproduce the bug?

On macOS, open the Codex macOS app.

Open/import a Git repo located on a mounted volume, e.g.:

/Volumes/home/{MyProject}

In Codex, use the UI worktree creation flow to create a new worktree.

Observe that Codex creates the worktree in:

/Users/{myuser}/.codex/worktrees/{worktreeid}/{MyProject}

Confirm there is no setting to configure the worktree root/destination directory.

This occurs 100% of the time.

What is the expected behavior?

Codex should allow configuring the worktree destination directory / worktree root directory, e.g.:

Let the user choose a worktree root directory in Settings (global), and/or

Let the user choose the location during worktree creation (per-worktree)

For example, I should be able to configure worktrees to be created next to the repo on the mounted drive:

/Volumes/home/worktrees/...

Bonus:

  1. configure default paths per project
  2. default to placing worktrees near the repo if the repo is located on a mounted volume.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions