Redone commits keep their checkpoint trailers

main

Commit

peyton-alt1w ago

An agent's commits redone as logical ones with git reset and new commits lost every trailer, so the session vanished from the trail. The dropped commits are those between the merge base of HEAD and ORIG_HEAD and ORIG_HEAD itself; a dropped commit's trailers are carried into the new message when a file it changed is staged with exactly the content it had at ORIG_HEAD. Rewritten content inherits nothing, a merge or pull replaces nothing, and the reset must still be the latest ref operation in HEAD's reflog. Renames, deletions and file/directory swaps are matched by the tree changes they make. Redone trailers are recorded as inherited, so post-commit never condenses into one.

Co-Authored-By: Claude Opus 5.5 (1M context) noreply@anthropic.com Entire-Checkpoint: 01M39ZKK8YATQHH45WCQTXW248

Checkpoints

Track Subagent Work Across Worktrees

Claude CodeOpus 5.5
View session
Checkpoint 1