pingdotgg / pingdotgg/t3code

[Bug]: Partial .git directory makes checkpoint reactor attempt VCS operations for a non-repository project

Open Beginner friendly
#8,873 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
23k
Forks
5.9k
Avg merge
11h 14m
Merged PRs (30d)
357

Description

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

  1. Create a directory that is not a Git repository but contains an incomplete .git path:

    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): .git
    
  2. Add /tmp/t3-nonrepo as a T3 Code project.

  3. Start a local thread and send a prompt.

  4. 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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in apps/server/src/git/Utils.ts and inspect isGitRepository alongside CheckpointStore.isGitRepository and CheckpointReactor admission. Reproduce with a directory containing only an incomplete .git path, then verify that checkpoint processing treats it as a non-repository and no longer emits warnings; also review ProviderRuntimeIngestion for the same path-existence check.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, typescript
Domain
backend, devtools
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
82/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.