What this thread does
Do first: add .worktreeinclude at the repository root.
When you need it
Local managed worktrees already contain tracked files. Use the include file when ignored local setup files must be copied into a newly created worktree.
Steps
1. Put the ignored paths or .gitignore-style patterns in the repository-root .worktreeinclude. The page's example is:
# .worktreeinclude
.env
.env.local
config/secrets.json
2. To create a managed worktree, select Worktree under the new-chat composer, choose a starting branch, and submit the prompt. Codex copies matching ignored files when it creates the worktree.
Check it worked
The documented result is that matching ignored files are copied into the new local managed worktree. The page provides no separate confirmation command.
Limits
This applies to local ChatGPT desktop app managed worktrees, excluding remote worktrees and command-line-created Git worktrees. Only ignored matching files are copied; do not list tracked files. Source symlinks are skipped and existing destination files are not overwritten. An ignored AGENTS.override.md is copied automatically. A Git repository is required. The page does not name a version for this feature.
Not for: general parallel worktree chat setup; see codex-managed-worktrees-parallel-tasks.
Sources
- Worktrees, Codex documentation, read 2026-11-24: "Codex skips source symlinks and won't overwrite files that already exist in the new checkout."
Checked
2026-11-24; read <https://learn.chatgpt.com/docs/environments/git-worktrees.md>; no command was run.
Started from a post by @Codex, packaged by the editor. Original post