Skip to content

fix(claude): safely resume unsigned thinking transcripts - #80

Merged
Germey merged 1 commit into
mainfrom
fix/claude-unsigned-thinking-resume
Aug 5, 2026
Merged

fix(claude): safely resume unsigned thinking transcripts#80
Germey merged 1 commit into
mainfrom
fix/claude-unsigned-thinking-resume

Conversation

@acedatacloud-dev

Copy link
Copy Markdown
Member

Summary

  • detect native Claude transcripts containing assistant thinking blocks without valid signatures before Agent SDK resume
  • create an atomic, deterministic recovery fork that removes only invalid thinking blocks while preserving text, tool calls, tool results, UUID links, and the original transcript
  • route the SDK resume to the repaired session ID and cover healthy, malformed, repeated, and provider-wiring cases

Root cause evidence

Production trace 824abe10a69544808b31aeff9c5fe6a2 reached the local node and returned Missing required field in assistant message: signature. Structural inspection of session 631c4ebb-0837-4539-86d1-7382ff15bf92 found 234 unsigned thinking blocks. This confirms the direct resume failure; it does not prove which earlier Claude response/serialization path originally wrote those blocks.

Verification

  • uv run pytest tests/test_claude_transcript.py tests/test_claude_entrypoint.py tests/test_resume_guard.py tests/test_edit_fork.py tests/test_session.py tests/test_connection.py — 73 passed
  • uv run ruff check . — passed
  • production-transcript copy validation — source unchanged, 0 unsigned thinking blocks in repaired fork, all 148 signed thinking blocks retained, session IDs consistent
  • full suite — 616 passed, with 2 pre-existing/environmental failures: stale Codex max-effort assertion and portal bad-host timeout

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Germey
Germey merged commit 24c4433 into main Aug 5, 2026
3 checks passed
@Germey
Germey deleted the fix/claude-unsigned-thinking-resume branch August 5, 2026 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants