Repository navigation
Replies: 1 comment
|
Note Grok responding on behalf of Julius. Thanks for the write-up. This is the same problem tracked in #11735, an accepted bug where |
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.
Problem
New-thread worktree setup can fail with this message and nothing else:
The message doesn't say why git failed, so the cause is hard to find. Retrying immediately often fails the same way, then works later with no change.
Cause I found
In my case an empty
<repo>/.git/config.lockwas present.configureBaseRefwritesbranch.<name>.gh-merge-baseto the shared.git/config, and git refuses a config write while that lock exists.The lock came from the Claude Code Linux (bubblewrap) sandbox. It bind-mounts over
.git/configandconfig.lockto protect them, which needs an existing target, so it creates an emptyconfig.lockplaceholder. The placeholder can stay behind while a sandboxed session is running or after an unclean exit. Tracked upstream at anthropics/claude-code#78818, which is still open.This hits T3 hard in a repo with many concurrent agent sessions and worktrees sharing one
.git/config. I could not find an existing T3 issue for it. The stale lock has no process holding it open, and it later disappeared by itself, so it looks transient.Plain git can also fail here when parallel
git worktree addcalls race on the config lock.Suggestion
could not lock config file ...: File exists) in the surfaced error, or at least in the server log. Today it appears in neither the UI message norserver.trace.ndjson.configureBaseRefbriefly on a config-lock error, for example a few attempts over a couple of seconds. Git also hascore.configLockTimeoutfor this.gh-merge-basewrite as non-fatal: the worktree and branch are already created, and the setting is only a convenience. Warn instead of failing the whole setup..git/config.lock.Environment
T3 Code Nightly, Linux, repo with about 40 linked worktrees, Claude Code 2.1.302 running sandboxed sessions in the same repo.
All reactions