Claude Code Unpoison — Development skill for Claude Code
One-command recovery from Claude Code's Opus 4.7/4.8 'tool call could not be parsed (retry also failed)' bug — rewinds the poisoned session tail so you can --resume cleanly.
How to install Claude Code Unpoison
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open GGGODLIN/claude-code-unpoison and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Claude Code Unpoison does
One-command recovery from Claude Code's Opus 4.7/4.8 'tool call could not be parsed (retry also failed)' bug — rewinds the poisoned session tail so you can --resume cleanly.
Alternatives in Development
- Maestro Session Manage — Manage a v3 Session — inspect status/resume-view, review knowledge candidates, complete, archive/unarchive 530 ★
- Harness Remote — Native-session control plane for Codex, Claude Code, OpenCode, OMP and PI 356 ★
- Tail Claude — A Go Bubble Tea TUI for reading Claude Code session JSONL files 154 ★
README
claude-code-unpoison
One command to recover a Claude Code session killed by the Opus 4.7/4.8 bug:
**The model's tool call could not be parsed (retry also failed).**
No dependencies. Pure Python 3 stdlib. It rewinds the session transcript past the failed turns and lets you `--resume` cleanly — keeping all your prior context.
⚠️ This is a **stopgap**, not a fix. The bug is server-side and unfixed as of 2026-06. The durable workaround is to run tool-heavy work on a clean model (`/model claude-opus-4-6[1m]` or Sonnet 4.6). See [Limitations](#limitations).
The bug
When extended/adaptive thinking is active, Opus 4.7 and 4.8 intermittently serialize a tool call as **malformed legacy XML** (a bare `` missing the namespace prefix, or a stray token before it) instead of a structured `tool_use` block. The harness can't parse it, injects a retry, and when the retry also fails the turn dies with the error above.
In the `.jsonl` transcript the failed turns look like this and pile up at the tail:
- an assistant turn with
stop_reason: "tool_use"but notool_useblock (only an empty thinking block), - a synthetic
"Your tool call was malformed and could not be parsed. Please retry.", - finally a synthetic
"...retry also failed."
`--resume` replays that poisoned tail, so the session keeps failing. Once one malformed call is in history, later calls tend to reproduce it (few-shot self-poisoning).
Reported widely on the Claude Code tracker — e.g. [#62123](https://github.com/anthropics/claude-code/issues/62123) (canonical), [#63583](https://github.com/anthropics/claude-code/issues/63583) (same signature), [#64235](https://github.com/anthropics/claude-code/issues/64235) (regression dated 2026-05-29), [#63481](https://github.com/anthropics/claude-code/issues/63481) (Opus 4.8 + extended thinking).
Reported severity by model generation: Opus 4.6 clean · 4.7 intermittent · **4.8 worst** · Sonnet 4.6 clean.
What it does
Walks the transcript bac
Related Skills
Clean End Of Session
Claude Code mod: winds agents down cleanly before your subscription credit runs out and writes a resume memo.
Claude Punch List
Capture a browser bug with the console errors and failed requests behind it, and paste one ready-made prompt i
Session End.Skill
Close a session cleanly by running tests, committing, updating all state files, and appending a handoff entry
Lore Close
Close out a working session cleanly — reconcile status across all layers, verify against ground truth, capture
Wend
Find, recover & resume your past Claude Code sessions — fast, local, single-binary CLI + plugin. Keyword + sem
Opus Compatibility Scanner
Free Claude Code skill that audits CLAUDE.md, AGENTS.md, subagents, settings.json, hooks, and Anthropic SDK ca
Related Agents
Loom Advisor
Read-only advisory agent for debugging and repeated failures. Spawned instead of a blind retry when an impleme
Orchestration Recovery
Recovery diagnostician for unknown orchestration failures. Analyzes phase state, wrapper exit code, and log ta
Coder High
Écrivain de code Sonnet 5.5 en effort high (ADR-022 claude-stack — Opus manage, Sonnet code). TRIGGER when the