Skip to content

Instantly share code, notes, and snippets.

@armanddp
Created January 24, 2026 11:57
Show Gist options
  • Select an option

  • Save armanddp/a62986a0e01480af0339b28c818eadfb to your computer and use it in GitHub Desktop.

Select an option

Save armanddp/a62986a0e01480af0339b28c818eadfb to your computer and use it in GitHub Desktop.
Corrupted session file sample - missing header, orphaned parentIds (sanitized)
{"type":"message","id":"3d596f44","parentId":"588873d9","timestamp":"2026-01-23T14:23:57.178Z","message":{"role":"assistant","content":[{"type":"text","text":"This is a response from the assistant."}],"api":"anthropic-messages","provider":"anthropic","model":"claude-opus-4-5","usage":{"input":10,"output":50,"totalTokens":60},"stopReason":"end_turn"}}
{"type":"message","id":"7f933825","parentId":"3d596f44","timestamp":"2026-01-23T14:23:57.416Z","message":{"role":"toolResult","toolCallId":"toolu_example","toolName":"bash","content":[{"type":"text","text":"command output here"}],"isError":false}}
{"type":"message","id":"21e1489c","parentId":"7f933825","timestamp":"2026-01-23T14:23:57.436Z","message":{"role":"toolResult","toolCallId":"toolu_example2","toolName":"bash","content":[{"type":"text","text":"another command output"}],"isError":false}}
{"type":"message","id":"abc12345","parentId":"21e1489c","timestamp":"2026-01-23T14:24:00.000Z","message":{"role":"assistant","content":[{"type":"text","text":"Here is my analysis of the results."}],"api":"anthropic-messages","provider":"anthropic","model":"claude-opus-4-5","usage":{"input":100,"output":80,"totalTokens":180},"stopReason":"end_turn"}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment