GGGODLIN

Claude Code Unpoison — Development skill for Claude Code

Development community

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 no tool_use block (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