Skip to content

Fix parentUuid chain break during compaction#39

Open
marksverdhai wants to merge 1 commit into
mainfrom
fix/parent-uuid-chain
Open

Fix parentUuid chain break during compaction#39
marksverdhai wants to merge 1 commit into
mainfrom
fix/parent-uuid-chain

Conversation

@marksverdhai
Copy link
Copy Markdown
Collaborator

Fixes a bug where Claude Code would fail to load compacted history because of a broken parentUuid chain. This PR relinks the parentUuid of the kept messages so the conversation chain remains unbroken. Also handles the case when total_tokens is already under budget.

This ensures that Claude Code can fully load a compacted session by relinking the parentUuid of kept messages. Also adds logic to write the unchanged jsonl if the session is already within budget to prevent missing output errors.
@marksverdhai marksverdhai force-pushed the fix/parent-uuid-chain branch from 30653fb to b0db26d Compare April 1, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants