Repository navigation
Replies: 8 comments 4 replies
|
Dito |
|
YES! We need this for effective worktree use! |
|
Maybe Theo never uses .env files? Anyway, what are you doing in the meantime to easily copy or symlink your important git-ignored files? |
|
I feel like this is standard now? Does t3 support any alternative? |
|
This feature is absolutely essential. |
|
+1, I need this too.
Already supported by: Also proposed via PR in opencode, pando, arc-framework, wtm and geniro-app. The earlier T3 Code implementation, #7956, was closed without merging. Honoring the existing file would make repos that already work in Claude Code/Codex work in T3 Code too. |
|
+1 it's pretty much the standard in other coding apps. |
|
I'd like maintainer approval for the direction and scope of this before opening a PR, since #7956 was closed for lacking it. Proposed scope (server only, no contract or client change): when the source checkout has a Performance, measured on this repo under Windows:
One deliberate difference from strict gitignore matching: a pattern without a slash ( A working implementation with a test is in my fork: devohmycode#1. Would you accept a PR with this scope? |
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