[Bug]: Partial .git directory makes checkpoint reactor attempt VCS operations for a non-repository project #8873
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/server
Steps to reproduce#
Create a directory that is not a Git repository but contains an incomplete
.gitpath:mkdir -p /tmp/t3-nonrepo/.git git -C /tmp/t3-nonrepo rev-parse --is-inside-work-tree # fatal: not a git repository (or any of the parent directories): .gitAdd
/tmp/t3-nonrepoas a T3 Code project.Start a local thread and send a prompt.
Inspect the server log.
This also occurs with a polyrepo parent directory that is intentionally not a repository when another tool has created .git/hooks or .git/info beneath the parent.
Expected behavior#
T3 Code should treat the project root as a non-repository workspace and skip Git-backed checkpoint operations, as it does when no .git path exists. The thread should run without checkpoint-reactor warnings.
Actual behavior#
Every turn produces repeated warnings such as:
WARN: checkpoint reactor failed to process input
source: domain
eventType: thread.turn-start-requested
cause: VcsUnsupportedOperationError: VCS operation is unsupported for unknown in VcsDriverRegistry.resolve: No supported VCS repository was detected at /tmp/t3-nonrepo.
The warning is also emitted for thread.message-sent and runtime turn.started events. Git-backed checkpoints and revert are unavailable for the thread.
Root cause#
apps/server/src/git/Utils.ts:isGitRepository returns true whenever <cwd>/.git merely exists. CheckpointReactor uses that synchronous check to admit the workspace into checkpoint processing.
CheckpointStore and VcsDriverRegistry use authoritative driver detection (git rev-parse --is-inside-work-tree), which correctly rejects the same directory. The pre-check therefore returns true and the checkpoint operation immediately fails.
CheckpointStore.isGitRepository already exposes the authoritative detection needed by the reactor. ProviderRuntimeIngestion also uses the path-existence helper and may merit the same audit for placeholder checkpoints.
Impact#
Minor bug or occasional failure
The agent turn generally continues because the reactor catches the error, but logs are flooded and checkpoint/revert behavior is unavailable or inconsistent.
Version or commit#
T3 Code 0.0.36; also reproducible against current main source.
Environment#
Linux 7.0.0-30-generic x86_64, Node.js 22.22.0, Codex app-server provider.
Workaround#
Remove or rename the incomplete .git path, or register an actual child repository as the T3 Code project. Initializing a polyrepo parent as a repository is not an appropriate workaround because parent-level checkpoints do not capture the nested repositories' working trees.
juliusmarminge closed this
Sign in to join this conversation.
I got a similar problem when working with a folder with subfolders and each with it's own git repo.
VCS operation is unsupported for unknown in VcsDriverRegistry.resolve: No supported VCS repository was detected at