[Bug] Subagent transcript over SKIP_PRECOMPACT_THRESHOLD (5 MiB) cannot be resumed: 'No transcript found for agent ID'

Status Fixed / completed
Reported on v2.1.241
Maintainer reply None cached
Activity 1 comment · opened Aug 23, 2026 · closed Aug 23, 2026

Summary

A subagent whose transcript file on disk exceeds SKIP_PRECOMPACT_THRESHOLD (5,242,880 bytes) cannot be resumed. The resume fails with No transcript found for agent ID, which reads as "that agent does not exist" rather than "its transcript was too large to load".

What I observed

Measured across one machine's agent transcripts on 2026-08-21:

  • Six resume attempts failed with No transcript found for agent ID. Every one had a transcript file between 5.65 MB and 13 MB.
  • Every resume that succeeded had a transcript under 5.24 MB.
  • Size was the only predictor. Three of the six failures were warm (well inside the cache TTL), and one had only ~101k tokens of context — small conversations, large files, because the agents had read images.

The agents themselves were alive and idle; the transcripts were present on disk with normal contents.

Expected

Either the resume works, or the failure says what actually happened, e.g. "transcript is 8.2 MB, above the 5 MiB load threshold; set CLAUDE_CODE_DISABLE_PRECOMPACT_SKIP=1 to load it anyway".

Actual

No transcript found for agent ID, which is indistinguishable from a wrong or expired ID. It cost real time to diagnose, because nothing in the message points at file size, and the file is plainly there.

Suggestions

  1. Make the error name the cause and the threshold, and name the env var that overrides it.
  2. Consider compacting or truncating an over-threshold transcript on resume instead of refusing it — a summary of a large history is more useful than no session.
  3. If the skip is deliberate for performance, documenting the threshold and the override in the sessions or subagents docs would be enough on its own; today the constant is only visible by inspecting the binary.

Environment

Claude Code 2.1.241 (observed first on 2.1.239), macOS (darwin 25.3), Claude subscription.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗