Skip to main content
在 Manus 中运行任何 Skill
一键导入

claude-code-session-jsonl-whitespace-text-block

星标0
分支0
更新时间2026年6月1日 15:35

Repair a Claude Code session whose transcript JSONL has assistant messages containing a whitespace-only text block (typically `{"type":"text","text":" "}`), causing every API call (including new prompts, `/compact`, and `claude --resume`) to fail with HTTP 400 "messages: text content blocks must contain non-whitespace text". Use when: (1) a session refuses to accept new input with that exact 400, (2) `/compact` fails with the same 400 (since compact replays the full history first — it does NOT bypass the validator), (3) `claude --resume <id>` immediately exits with the same error. Covers diagnosis via JSON-walking the message.content array (NOT plain grep — the empty block is often nested), the distinction between message.content (sent to API → must fix) and toolUseResult (local metadata → harmless, leave alone), the underlying cause (extended-thinking turn serialization emits a synthetic single-space placeholder before the thinking block), and an idempotent fixer script that replaces " " with "." while prese

安装

用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。

文件资源管理器
2 个文件
SKILL.md
readonly