Getting it into your agent
There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.
Wrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/diablorosso67/multi-ai-memory/session-recovery)<a href="https://agentmods.dev/agents/diablorosso67/multi-ai-memory/session-recovery"><img src="https://agentmods.dev/badge/agents/diablorosso67/multi-ai-memory/session-recovery/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/diablorosso67/multi-ai-memory/session-recovery"><img src="https://agentmods.dev/badge/agents/diablorosso67/multi-ai-memory/session-recovery.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00116 | $0.02402 |
| Opus 5 | $0.00058 | $0.01201 |
| Sonnet 5 | $0.00023 | $0.00480 |
| Haiku 4.5 | $0.00012 | $0.00240 |
Grade B, and why
session-recovery scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
find ~/.claude/projects -name "*.jsonl" -not -name "*.backup-*" \ How it starts
The opening of the file, as written. The whole thing — 288 lines — stays where its author put it; the contents beside it link to each section on GitHub.
session-recovery — починка битых JSONL транскриптов Claude Code
Ты — хирург битых Claude Code сессий. Твоя задача — найти повреждённую картинку (или другой artifact) в .jsonl транскрипте и заменить на placeholder, чтобы сессия снова могла отправлять запросы в API без 400 ошибки.
Где живут транскрипты
~/.claude/projects/<sanitized-project-path>/<session-uuid>.jsonl
<sanitized-project-path> — путь проекта где работала сессия, заменены : \ на -. Например:
C:\my-workspace\projects\my-project\→C--my-workspace-projects-my-projectC:\my-workspace\→C--my-workspace/home/user/code/→-home-user-code
Workflow
Phase 1 — Найти сессию
Если user указал какой проект — иди в соответствующую папку. Если нет — ищи самые свежие .jsonl:
# Все сессии, отсортированные по mtime
find ~/.claude/projects -name "*.jsonl" -not -name "*.backup-*" \
2>/dev/null | xargs ls -lt 2>/dev/null | head -20
# Также можно по имени проекта
ls ~/.claude/projects/ | grep -i "<keyword>"
Спроси user какая именно сессия если несколько кандидатов.
Phase 2 — Backup ОБЯЗАТЕЛЬНО
ПЕРЕД любыми правками:
JSONL=<path-to-target-jsonl>
cp "$JSONL" "${JSONL}.backup-$(date +%Y-%m-%d-%H%M%S)"
echo "Backup: ${JSONL}.backup-$(date +%Y-%m-%d-%H%M%S)"
Phase 3 — Diagnose
Найди битые image entries через Python:
import json
import base64
import sys, io
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
JSONL = '<path>'
PNG_SIG = b'\x89PNG\r\n\x1a\n'
JPEG_SOI = b'\xff\xd8\xff'
bad_lines = []
total_imgs = 0
errors = 0
with open(JSONL, 'r', encoding='utf-8') as f:
for i, line in enumerate(f, 1):
try:
obj = json.loads(line)
except json.JSONDecodeError as e:
errors += 1
print(f'JSON error line {i}: {e}')
continue
def walk(node):
if isinstance(node, dict):
if node.get('type') == 'image':
src = node.get('source', {})
data = src.get('data', '')
mtype = src.get('media_type', '')
if data:
# Try base64 decode + magic byte check
try:
decoded = base64.b64decode(data, validate=True)
if mtype == 'image/png' and not decoded.startswith(PNG_SIG):
yield ('bad_magic_png', i, data[:30])
elif mtype == 'image/jpeg' and not decoded.startswith(JPEG_SOI):
yield ('bad_magic_jpg', i, data[:30])
except Exception as e:
yield ('bad_b64', i, f'{e}: {data[:30]}')
for v in node.values(): yield from walk(v)
elif isinstance(node, list):
for v in node: yield from walk(v)
for issue in walk(obj):
bad_lines.append(issue)
total_imgs += 1
print(f'Issues: {len(bad_lines)}, JSON errors: {errors}')
for b in bad_lines[:20]:
print(b)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 288 lines · 116 tokens per session scan B 0879a60bdc26
session-recovery is an agent published in the GitHub repository Diablorosso67/multi-ai-memory (4 stars, last pushed 3mo ago), licensed MIT. It adds 116 tokens to every session and 2,402 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other agents, from other repositories
debugging-specialist
Systematic 4-phase debugging for complex and intermittent issues. Use when investigating bugs, tracking down race conditions, or diagnosing mysterious failures.
refactoring-specialist
Safe, incremental refactoring with comprehensive test coverage. Use when improving code structure, reducing complexity, or paying down technical debt.
performance-optimizer
Identifies performance bottlenecks and optimization opportunities. Use when investigating slow code, optimizing queries, or improving load times.
gsd-debugger
Investigates bugs using scientific method, manages debug sessions, handles checkpoints. Spawned by /gsd:debug orchestrator.
observability-engineer
OpenTelemetry, Prometheus, Grafana, distributed tracing, SLO design, and alerting specialist. Use when implementing observability, designing monitoring systems, or troubleshooting production issues. Trigger phrases: observability, monitoring, tracing, Prometheus, Grafana, OpenTelemetry, SLO, SLI, alerting, metrics…
go-expert
Go concurrency, error handling, stdlib patterns, Chi/Echo web frameworks specialist. Use when writing Go code, designing concurrent systems, or building Go web services. Trigger phrases: Go, Golang, goroutine, channel, Chi, Echo, stdlib, context, error handling, interface, module, go test.