Replies: 1 comment
|
Dito |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Before submitting
Area
apps/server
Problem or use case
When T3 Code creates a Git worktree, ignored local files from the source checkout are missing. Projects commonly need files such as
.env,.env.local, orconfig/secrets.jsonbefore setup commands, development servers, tests, or the agent can run correctly.Claude Code and Codex both support a checked-in
.worktreeincludefile at the repository root for this purpose:.worktreeincludefor the Git worktrees it creates, including CLI, subagent, and desktop worktrees..worktreeincludefor local Codex-managed worktrees.Both use Git ignore style patterns and copy matching ignored files from the source checkout into the new worktree. A repository can therefore define this requirement once for multiple agent tools, but T3 Code currently does not honor it.
The practical failure is that a T3 worktree can look valid while being unable to start the application or run its setup. The agent may then report missing configuration or spend time diagnosing a broken project when the required local file simply was not copied.
Proposed solution
When T3 Code creates a worktree:
.worktreeincludeat the source repository root.runOnWorktreeCreateaction or first agent turn starts..worktreeincludeis absent, keep the current behavior.For safe default behavior, T3 Code should not copy tracked files, should not follow source symlinks, should reject paths that escape either repository root, and should not overwrite a destination file that already exists. Copy failures should be surfaced clearly instead of silently starting with an incomplete worktree.
Example:
This should require no new settings screen. The repository file is the explicit, project-scoped allowlist.
Why this matters
Repositories that already work in Claude Code or Codex should produce an equally usable worktree in T3 Code without requiring a second setup mechanism.
Supporting the existing file would:
Smallest useful scope
Support a root-level
.worktreeincludewhen T3 Code creates a local Git worktree:Directory copying and additional policy controls could be considered separately if needed.
Alternatives considered
post-checkouthook: This can copy files, but every user must configure or import it, and the repository may need tool-specific scripts. It also makes a simple declarative allowlist imperative..env*files. That was closed as not planned. This request is narrower in product scope because it adds no UI or new configuration model and instead honors an existing cross-tool repository file..envrcand was closed as a duplicate of dotenv sync for new worktrees #764. Guessing filenames can copy the wrong local data, while.worktreeincludeis explicit.Risks or tradeoffs
.worktreeincludeand already present on the user's machine. File contents should never be logged.Examples or references
Contribution
All reactions