Skip to content

fix(server): capture checkpoints through symlinked repository subdirectories - #24

Closed
macodev00 wants to merge 1 commit into
mainfrom
cursor/fix-symlink-checkpoint-capture-f0ec
Closed

macodev00 wants to merge 1 commit into
mainfrom
cursor/fix-symlink-checkpoint-capture-f0ec

Conversation

@macodev00

@macodev00 macodev00 commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

What Changed

Checkpoint capture and repository path lookup now ask Git for an absolute --git-common-dir before joining it with the project path.

Why

Opening a project through a symlink that points at a repository subdirectory made every turn fail checkpoint capture with exit 128. Git's relative --git-common-dir is computed from the physical working directory, and path.resolve applied .. to the symlink string, so the temporary index was created in a directory that does not exist. Diffs and Go back stayed unavailable for that thread.

The same join in repository path lookup could cache that missing directory, or a different repository's .git when the lexical path happened to exist. Both call sites now use --path-format=absolute, which checkpoint capture already uses for --git-path index. realPath still runs afterward so Windows 8.3 short names collapse.

Fixes pingdotgg#13187

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • No UI changes (screenshots and video not applicable)

Model: Grok 4.7
Harness: Cursor cloud agent

Open in Web Open in Cursor 

…ctories

Git's relative --git-common-dir is computed from the physical working
directory. path.resolve applied ".." to the symlink path, so a project
opened through a symlink into a repository subdirectory pointed
GIT_INDEX_FILE at a missing directory and checkpoint capture exited 128
on every turn.

Ask Git for the absolute common directory before joining it with the
project path. Repository path lookup uses that same absolute directory,
then realpath, so later --git-dir reads stay in the real repository.

Fixes pingdotgg#13187
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M labels Sep 23, 2026
@macodev00

Copy link
Copy Markdown
Owner Author

Superseded by upstream READY PR on pingdotgg/t3code (same branch).

@macodev00 macodev00 closed this Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Checkpoint capture fails with exit 128 on every turn when the project path is a symlink to a repository subdirectory

1 participant