fix(server): fork Claude histories with bodyless system records - #216
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: pandec/t3code/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe Claude adapter now accepts system session records without message bodies. Fork boundary remapping preserves unknown boundaries and rejects loss of known boundaries. Tests cover bodyless system, user, and assistant records and updated rewind history. ChangesClaude fork handling
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to Claude forks now accept bodyless system history records while preserving known conversation boundaries and continuing to reject invalid user or assistant records. The reported validation passes indicate the change is ready to merge. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What changed
Claude conversation forks now accept system history records without a
messagebody, such asstop_hook_summary. User and assistant records still require that field. Fork validation preserves already-unknown turn boundaries while continuing to reject lost known boundaries or changed conversation content.Why
Forking a real session failed with
Missing key at [43]["message"]after the history worker serialized an undefined system-message body. Once decoding succeeded, an existing unknown first-turn boundary caused a second rejection. Both fixes use the existing history path shared by fork and rewind.Validation
vp checkpasses with 0 errors and 886 existing warnings.vp run typecheckpasses.Checklist
Model: GPT-6. Harness: Codex.
Summary by CodeRabbit