Skip to content

[Bug]: Git checkpoint timeout hides "Edit from here" even for conversation-only rewind (v0.1.11) #40732

Closed

Description

@andirtew

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. Open a valid Git repository containing a large number of untracked, non-ignored files (in my case, ~489,890 untracked files totaling ~240 GB of local data/cache files).
  2. Open the repository in T3 Code v0.1.11 using Current checkout (non-worktree).
  3. Start a Claude Code thread (claudeAgent).
  4. Send two consecutive prompts and let both runs complete (status: "completed").
  5. During post-turn checkpoint capture for Run 1, git add -A -- . exceeds the 30-second VCS timeout (VcsProcessTimeoutError), so Run 1's checkpoint is stored with status: "error".
  6. Hover over the second user message (Run 2) and inspect the message action bar.
  7. Observe that Edit from here is completely hidden, leaving only Copy and Copy link.

Additional verification

  • git rev-parse --is-inside-work-tree returns true (branch main).
  • Both Claude runs completed normally (status: "completed").
  • No refs/t3/orchestration-v2/checkpoints/* refs exist in .git/refs/ (and checkpoint file lists are []).
  • The first user message may still show Edit from here because baseline 0 falls back to status: "missing" (via materializeBaselineCheckpoint), whereas Run 1's failed post-turn capture produces status: "error", hiding the button on Run 2 and all subsequent messages.
  • Distinct from non-Git workspace reports and from [Bug]: "Edit from here" is missing on sent messages, so threads can't be rolled back #36563 (where providerSessionId is absent on idle/restarted sessions): here the Git repo is valid and the provider session is active, but a checkpoint capture timeout turns checkpoint status into "error".

Expected behavior

The Edit from here action should remain available for conversation-only rewind when the provider supports rollback and a valid conversation rewind boundary can be resolved, even if Git checkpoint capture fails.

Specifically:

  1. Allow Revert and keep changes when the conversation can be safely rolled back.
  2. Disable Revert files too when no valid filesystem checkpoint exists.
  3. Display a warning explaining that Git checkpoint capture failed and filesystem restoration is unavailable.
  4. Do not make conversation-only rewind depend on successful Git snapshot creation.
  5. Preserve the existing safety checks for identifying valid conversation rollback targets.

Since this thread uses Current checkout, filesystem restoration is not needed for the requested operation.

A Git snapshot failure should not automatically disable an otherwise valid conversation-only rewind.

Actual behavior

The Edit from here action is completely hidden on Run 2 (and any turn following a failed checkpoint capture), even when the user only wants a conversation-only rewind (and even in Current checkout mode where file restore is not offered anyway).

Root cause verified in v0.1.11 (and still present on main):

  1. apps/server/src/vcs/GitVcsDriver.ts (captureCheckpoint) stages the workspace via git add -A -- . in a temporary index.
  2. apps/server/src/vcs/VcsProcess.ts enforces DEFAULT_TIMEOUT_MS = 30_000 (5s BASELINE_CAPTURE_BUDGET for pre-turn baselines in CheckpointService.ts). In workspaces with huge untracked directories (related to [Bug]: Checkpoint capture hits the 30 s git timeout in large workspaces and never converges; every killed attempt leaves a tmp_objdir-bulk-fsync-* directory behind #26227), this times out with VcsProcessTimeoutError.
  3. apps/server/src/orchestration-v2/CheckpointService.ts (capture) catches the timeout and records the run's checkpoint with status: "error" and files: [].
  4. Client gate: apps/web/src/session-logic.ts (isRewindableCheckpoint) only accepts "ready" or "missing" and rejects "error", so deriveRevertTurnCountByUserMessageId returns undefined for the following user message and apps/web/src/components/chat/TimelineUserMessageRow.tsx omits the Edit from here button.
  5. Server gate: apps/server/src/orchestration-v2/CheckpointRollbackService.ts (execute) similarly rejects checkpoint.status === "error" with rollback-target-invalid even when restoreFiles === false:
    checkpoint.status !== "ready" && !(checkpoint.status === "missing" && !restoreFiles)

Even though both runs completed, ClaudeAdapterV2.rollbackThread supports native conversation rollback, and conversation-only rewind (restoreFiles: false) does not need a Git snapshot, status: "error" blocks rollback on both client and server.

Suggested fix: Treat status: "error" the same as status: "missing" for conversation-only rewind (restoreFiles === false) in both isRewindableCheckpoint (session-logic.ts) and CheckpointRollbackService.ts, while keeping filesystem restore (restoreFiles: true) restricted to status: "ready".

Impact

Major degradation or frequent failure

Version or commit

v0.1.11 (Orchestrator V2); also verified on main

Environment

macOS 26.5.1 (Apple Silicon / ARM64), T3 Code Desktop v0.1.11 (Orchestrator V2), Claude Code (claudeAgent), local Git repo (Current checkout, main)

Logs or stack traces

# Local diagnostic summary (not a verbatim T3 server log)
$ git rev-parse --is-inside-work-tree
true

$ git ls-files --others --exclude-standard | wc -l
489890

$ git for-each-ref refs/t3/
(empty - 0 checkpoint refs created)

# Isolated temporary-index simulation of GitVcsDriver.captureCheckpoint:
$ GIT_INDEX_FILE=/tmp/test/index GIT_OBJECT_DIRECTORY=/tmp/test/obj git add -A -- .
TIMED OUT (> 30s)

# Thread state observed via T3 orchestration:
# - Run 1: status=completed, checkpoint files=[]
# - Run 2: status=completed, checkpoint files=[]
# - Client hides "Edit from here" on Run 2 (isRewindableCheckpoint rejects status="error")

Screenshots, recordings, or supporting files

No response

Workaround

Adding the large untracked data/cache directories to .gitignore (placed after any ! un-ignore rules) reduced untracked files from ~489,890 (~240 GB) to ~1,850 (~365 MB) and brought isolated git add -A -- . time down to 1.4s.

  • New turns and new threads after this change capture checkpoints normally and restore the Edit from here button.
  • Previously completed turns whose checkpoints were already persisted as status: "error" remain non-rewindable in existing threads (workaround for those turns is pressing Up Arrow in the empty composer to recall the prompt, or forking into a new thread).

Activity

  1. added
    bugSomething is broken or behaving incorrectly.
    needs-triageIssue needs maintainer review and initial categorization.
    on Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions