Skip to main content
تشغيل أي مهارة في Manus
بنقرة واحدة

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

النجوم٠
التفرعات٠
آخر تحديث١ يونيو ٢٠٢٦ في ١٥:٣٥

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