Expand description
Claude Code session transcripts (hive-mind#3570).
Claude Code writes each session to
${CLAUDE_CONFIG_DIR:-~/.claude}/projects/<cwd slug>/<session id>.jsonl.
When an API error ends a run, the transcript’s last conversation entry is
a synthetic assistant message with isApiErrorMessage: true, even when
--output-format stream-json printed only a generic failure. Only that
last entry is read, so an error an earlier turn recovered from is not
reported.
Structs§
- Claude
Transcript ApiError - The API error that ended a transcript
- Claude
Transcript Options - Where to look for Claude transcripts
Constants§
- CLAUDE_
TRANSCRIPT_ LIMIT_ SOURCE limit_sourceof a limit found in a transcript- TRANSCRIPT_
TAIL_ BYTES - Bytes read from the end of a transcript
Functions§
- apply_
claude_ transcript_ usage_ limit - Fill a failed Claude run’s usage-limit fields from its transcript when the output did not report the limit. A killed process cannot report one.
- claude_
project_ slugs - Project directory names Claude Code uses for a working directory: older
versions replace
/, newer ones every non-alphanumeric character - claude_
transcript_ api_ error - The API error that ended a transcript, if its last conversation entry is one; otherwise why not.
- claude_
transcript_ candidates - Transcript paths that may hold a session, most specific first
- read_
claude_ transcript_ api_ error - Read the API error that ended a Claude session.