Can worktree creation be supported for projects with multiple Git repositories?

Open 💬 2 comments Opened Jul 21, 2026 by yuyi5453
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What variant of Codex are you using?

App

What feature would you like to see?

我们一个项目通常涉及到多个仓库,需要多个仓库协同开发。
我现在做法是:给每一个仓库创建一个 worktree 然后将这些 worktree 放在同一个路径/文件夹下,然后通过 codex 打开。但是这样有个问题:我在开发并行的需求时,需要再次手动创建相同 worktree 然后用 codex 打开。
希望 codex 可以支持非 Git 仓库但是下面有多个 git 项目时,可以创建一个并行的目录,并指定项目名然后将项目下 git 仓库都切换到该分支下。

Additional information

_No response_

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 1 month ago

English translation:

What variant of Codex are you using?

App

What feature would you like to see?

Our projects usually involve multiple repositories that need to be developed together.
My current approach is to create a worktree for each repository, place these worktrees under the same path/folder, and then open that folder with Codex. However, there is a problem with this approach: when I work on requirements in parallel, I need to manually create the same set of worktrees again and then open them with Codex.
I hope Codex can support creating a parallel directory when the root directory is not a Git repository but contains multiple Git projects, allowing the user to specify a project name and then switch all Git repositories under the project to that branch.

Additional information

_No response_

<!-- codex-issue-translator -->

PClmnt · 1 month ago

I have the same use case in the Codex App: one non-Git workspace directory contains separate frontend and backend Git repositories that must be changed and tested together.

Currently, the New worktree UI exposes one project-level starting-branch picker. There is no repository selector or visible repository-to-branch mapping, so a managed worktree task cannot isolate both repositories together.

The ideal workflow would:

  • allow a Codex project to explicitly include multiple Git repositories;
  • create one managed worktree per repository under a single task workspace;
  • let the user select the starting branch or working-tree state independently for each repository;
  • show the repository-to-starting-state mapping before the task starts;
  • keep Handoff, branch creation, cleanup, and task lifecycle coordinated across the set;
  • handle repositories whose corresponding feature branches have different names or do not yet exist.

This would make cross-repository feature work compatible with Codex managed worktrees instead of requiring us to construct and maintain paired worktrees manually.