一键导入
claude-session-rescue
Fix broken Claude Code sessions by stripping base64 images from session JSONL files.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Fix broken Claude Code sessions by stripping base64 images from session JSONL files.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | claude-session-rescue |
| description | Fix broken Claude Code sessions by stripping base64 images from session JSONL files. |
Fix broken Claude Code sessions caused by the image dimension limit bug (anthropics/claude-code#13480).
When a long-running Claude Code session breaks after sleep/wake with image limit errors, this tool:
skill install https://github.com/ianbmacdonald/claude-session-rescue
This installs the skill from the repo, which contains:
SKILL.md - This file with instructionsscripts/session_rescue.py - The execution engineAfter installation, just ask Claude:
"Fix my broken session with ID 03d04fb2"
Or run the script directly:
# Dry run first
uv run --script scripts/session_rescue.py --session-id 03d04fb2 --dry-run
# Then fix it
uv run --script scripts/session_rescue.py --session-id 03d04fb2
# Fix most recent session
uv run --script scripts/session_rescue.py --latest
# Fix all sessions
uv run --script scripts/session_rescue.py --all
--session-id ID — Find by UUID prefix--session-name NAME — Find by custom title--latest — Most recently modified session--all — All sessions--project PATH — Scope to project directory--dry-run — Report without modifying--min-images N — Threshold (default: 1)--verbose — Detailed output.bak, .bak.1, .bak.2 filestool_result structuresSessions break when screenshots accumulate past the API's 2000px dimension limit. The failure is retroactive—images that worked during the session fail on replay after sleep/wake.
This tool removes the images while preserving the conversation text, freeing up context space.
MIT