Resuming a cloud session can fetch subagent transcripts one at a time instead of all at once.
The lazy per-agent transcript path exists but is toggled by a caller-supplied boolean decided outside this code.
What's wrong with this entry?
Resuming a cloud session previously had to fetch every subagent's events before showing anything. A new path fetches a single agent's transcript when it is actually asked for, at most once per agent, skipping agents whose transcript was written locally. It is switched on by a boolean handed in when the reader is registered; what sets that boolean is decided outside this code, so how often the lazy path runs depends on the caller.
- Concurrent requests for the same agent share one in-flight fetch.
- Each attempt reports an outcome of hit, empty, superseded, unfiltered, read failure, write failure or aborted, with page count, event count and duration.
- Failures surface as a dedicated transcript-fetch error rather than an empty transcript.
- Eager fetching still happens when the caller already prefetched the events.
ccr_subagent_lazy_fetch
Strings lifted out of the shipped bundle, so the claim above can be checked against them.