Back to directory

Claude Code Session Jsonl Orphan Advisor Tool Result

Agent skill
1 skill

Repair a Claude Code session whose transcript JSONL has an orphan servertooluse / toolresult content block, causing every API call (including /compact and claude --resume) to fail with HTTP 400 "unexpected tooluseid found in advisortoolresult blocks: srvtoolu... Each ... block must have a corresponding servertooluse block before it". Use when: (1) a Claude Code session dies mid-advisor call with "socket connection was closed unexpectedly", (2) resume / compact returns the 400 above naming srvtoolu..., (3) /remote-control (or any system event) activated mid-stream while the assistant was emitting an advisor response. Covers diagnosis via grouping JSONL lines by shared message.id, surgical deletion of the orphan pair (both halves), and the line-number-drift gotcha that occurs when the file grows between inspection and edit.

Install with
Claude CodeCodexCursorGitHub CopilotGemini CLI

Supported by the Atlas install prompt. Skill-specific requirements vary.

Skill stats

Skills1CategoryContent & writingStars0

About this skill

Repair a Claude Code session whose transcript JSONL has an orphan servertooluse / toolresult content block, causing every API call (including /compact and claude --resume) to fail with HTTP 400 "unexpected tooluseid found in advisortoolresult blocks: srvtoolu... Each ... block must have a corresponding servertooluse block before it". Use when: (1) a Claude Code session dies mid-advisor call with "socket connection was closed unexpectedly", (2) resume / compact returns the 400 above naming srvtoolu..., (3) /remote-control (or any system event) activated mid-stream while the assistant was emitting an advisor response. Covers diagnosis via grouping JSONL lines by shared message.id, surgical deletion of the orphan pair (both halves), and the line-number-drift gotcha that occurs when the file grows between inspection and edit.

Quick start

  1. Copy the install prompt. Use the green button above this README.
  2. Send it to your agent. Paste it into your coding agent’s chat and send.
  3. Review the setup. Your agent checks the skill’s instructions, requirements, and installation scope.
Review, license & listing details
Review the source before using this skill

This is an imported listing. We haven’t certified its safety, license, or compatibility. Skills may include executable scripts.

Automated security scan: Partial

Only SKILL.md was scanned. Supporting files and scripts were not checked. No safety grade has been assigned.

0 potential findings · Scanned 11/4/2026 · Scanner 0.2.1

Content SHA-256: e03127ad7e75704e15a5583dee312dfd91c9a6b35f62b389b3de3b37bcf9216d

About scan coverage and limitations

About this listing

Category
Content & writing
Reported license
MIT
Listing language (estimated)
English
Review status
Not individually reviewed
Agent compatibility
Atlas installation supports Claude Code, Codex, and Cursor. Skill-specific dependencies and features are checked during setup.
Claude Code Session Jsonl Orphan Advisor Tool Result | Agent Skills Atlas