Merged
Conversation
Entire-Checkpoint: fd00dbbb51f1
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a session conflict bug where a new session would fail to start after a previous session ran a Task (subagent) that made no file changes. The bug occurred because the PreTask hook created a shadow branch commit even with no file changes, but didn't increment the session's CheckpointCount. This caused the session initialization logic to incorrectly detect a conflict.
Changes:
- Removed
createStartingAgentCheckpoint()function that created empty "starting agent" commits during PreTask hooks - Updated PreTask hook to only capture local state (for computing new files later) without creating shadow branch commits
- Added clarifying comment that commits are only created when tasks actually result in file changes
Entire-Checkpoint: c3851e15e4c2
Entire-Checkpoint: a7e6172c3842
Remove documentation for the "Create Starting Checkpoint" step in PreToolUse[Task] since TaskStart checkpoints no longer exist. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Entire-Checkpoint: 523d2b8bfaf3
khaong
approved these changes
Jan 27, 2026
Contributor
khaong
left a comment
There was a problem hiding this comment.
Looks good - just updated some of the docs to align.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This was reported by @dipree but also @georg might have seen variations of it. After digging through the
entire/sessionslogs and what data we had (and trying different theories) this is where we landed:This is probably the important aspect:
Since that commit caused then the other session to fail to start since there was a commit in the shadow branch but no local changes, so it gave the wrong instructions.
Note
Eliminates creation of "starting" subagent checkpoints and empty marker commits to prevent session conflicts and reduce noise.
PreToolUse[Task]: now only captures pre-task state; no checkpoint/commit is createdAutoCommitStrategy.commitTaskCodeToActive: skips commit when no file changes; removes TaskStart handlingIncrementalTypeTaskStart,FormatSubagentStartMessage, and related tests; simplifiesFormatIncrementalSubjectWritten by Cursor Bugbot for commit 49bda72. This will update automatically on new commits. Configure here.