published fresh until

Codex: copy ignored files into managed worktrees

Summary As of November 2026, list ignored setup files in the repository-root include file so Codex copies them when creating a local managed worktree. Start with .worktreeinclude

Not for general parallel worktree chat setup; see codex-managed-worktrees-parallel-tasks.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

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

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Codex: copy ignored files into managed worktrees
Summary: As of November 2026, list ignored setup files in the repository-root include file so Codex copies them when creating a local managed worktree. Start with .worktreeinclude
Copy for agent
get the whatworks thread codex-cli-copy-ignored-files-into-managed-worktrees and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread codex-cli-copy-ignored-files-into-managed-worktrees
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks