[BUG] 2.1.190 Linux: active session transcript .jsonl not written until session exit; hooks get empty transcript_path mid-session

Open 💬 1 comment Opened Jun 24, 2026 by asicmaster

What happened

On 2.1.190 (Linux), the active session's transcript .jsonl is not written during the session — it only appears when the session ends. While the session is live:

  • ~/.claude/projects/<slug>/<session-id>/ exists with subagents/*.meta.json and tool-results/* populated, but no <session-id>.jsonl sibling file.
  • UserPromptSubmit hooks receive an empty / non-existent transcript_path — the file the path points to doesn't exist yet.
  • ~/.claude/history.jsonl updates normally.

Completed sessions on the same version DO flush a readable <session-id>.jsonl on exit (verified — see below), so this is deferred-until-exit, not total loss like the multiplexer case in #70219.

Why it matters

Any hook- or sidecar-based tool that reads the live transcript for usage/token accounting is broken mid-session: it either sees "no conversation" or silently falls back to a previously-completed session, so its numbers never move within the active session. The empty transcript_path delivered to hooks is the same surface as #13668 / #68778.

Repro

  1. Start claude from a plain terminal (no tmux/screen/zellij).
  2. Have a multi-turn conversation with tool use.
  3. While still in the session, inspect on disk:
SID=<your-session-id>
ls -la ~/.claude/projects/<slug>/$SID/            # subagents/ + tool-results/ present
ls -la ~/.claude/projects/<slug>/$SID.jsonl       # MISSING during the session
  1. A UserPromptSubmit hook printed with its stdin shows transcript_path empty or pointing at the not-yet-existent file.

Observed (this machine)

CC version: 2.1.190 (updated from 2.1.187 today)
OS: Linux (qterminal -> bash -> claude; TMUX/STY unset)

Active session c3d43f13-…:
  projects/-home-dave/c3d43f13-…/            <- directory only
    subagents/agent-*.meta.json              <- present
    tool-results/*.txt                       <- present
  projects/-home-dave/c3d43f13-….jsonl       <- DOES NOT EXIST (session live for hours, many turns)

Completed session 81846cc8-… (same version, today):
  projects/-home-dave-Documents-recon-orchestrator/81846cc8-…/        <- dir
  projects/-home-dave-Documents-recon-orchestrator/81846cc8-….jsonl   <- 163,839 bytes, parses fine (assistant usage present)

Expected

Either (a) the session transcript .jsonl is written incrementally during the session (prior behavior that hook tooling relies on), or (b) hooks receive a transcript_path that points at an actually-readable file (even a partial/streamed one), so live token/usage tooling works.

Environment

  • Claude Code: 2.1.190 (native install; auto-updated from 2.1.187 on 2026-06-24)
  • OS: Linux 6.17 (no tmux/screen/zellij; TMUX, STY unset; TERM=xterm-256color)
  • cleanupPeriodDays: not set
  • Related: #70219 (multiplexer false-detect — different trigger, transcripts never written), #13668 (empty transcript_path to PreCompact), #68778 (empty-record transcript hooks can't read), #62017 (/desktop "transcript not found" as first command)

View original on GitHub ↗

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