Session transcripts (UUID.jsonl) are never written to disk

Resolved 💬 3 comments Opened Jan 24, 2026 by Mustafa-Esoofally Closed Jan 29, 2026

Description

Session transcript files are never created on disk, even though transcript_path is defined in the session registry. This affects all hooks that expect to access transcripts (SessionEnd, PreCompact, etc.).

Related to #13668 (PreCompact receives empty transcript_path) - same root cause.

Expected Behavior

After a session ends, the transcript should exist at the path specified in transcript_path:

~/.claude/projects/PROJECT/SESSION_ID.jsonl

Actual Behavior

The file is never created. The transcript_path field in session registry points to a non-existent file.

$ ls ~/.claude/session-registry/*.json | wc -l
109  # 109 sessions registered

$ ls ~/.claude/projects/-Users-coolm-Developer-agno/*.jsonl
# No matches found - 0 transcript files exist

Sample registry entry shows path is defined:

{
  "sessionId": "fe2d1fd9-...",
  "transcript_path": "/Users/.../fe2d1fd9-....jsonl",
  "cost": 85.74
}

What IS Being Saved (works correctly)

  • ~/.claude/history.jsonl (user prompts)
  • ~/.claude/session-registry/*.json (session metadata)
  • SESSION_ID/subagents/*.jsonl (subagent transcripts)
  • SESSION_ID/tool-results/ (tool outputs)

What Is NOT Being Saved (the bug)

  • SESSION_ID.jsonl (main session transcript)

Impact

  1. SessionEnd hooks can't backup transcripts - nothing to copy
  2. cleanupPeriodDays: 0 has no effect - no files to retain
  3. Session history is lost - can't review past conversations
  4. Related issue #13668 - PreCompact receives empty path for same reason

Environment

  • Claude Code: 2.1.19
  • OS: macOS (Darwin 25.2.0)
  • Shell: zsh

Steps to Reproduce

  1. Start any Claude Code session
  2. Have a conversation with tool use
  3. Exit with /exit
  4. Check: ls ~/.claude/projects/PROJECT/*.jsonl
  5. Observe: file does not exist

Notes

  • Subagent transcripts ARE saved correctly, suggesting infrastructure exists
  • The --no-session-persistence flag implies persistence is ON by default
  • This appears to be a regression or incomplete feature

🤖 Generated with Claude Code

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗