[BUG] 2.1.169: interactive sessions write no JSONL transcript (only ai-title stub) — reproduced on WSL2 + macOS; breaks --resume/history

Status Fixed / completed
Reported on v2.1.169
Maintainer reply None cached
Activity 6 comments · opened Jun 9, 2026 · closed Jun 9, 2026

Summary

In Claude Code 2.1.169, interactive sessions no longer write the
per-session conversation transcript to
~/.claude/projects/<encoded-cwd>/<session-id>.jsonl. The file is created but
contains only a single ai-title stub recordzero user/assistant
records
— and the conversation is persisted nowhere on disk.

This is a 2.1.169 regression (2.1.168 writes the full transcript on the
same machine — clean A/B, only the binary version differs). It is interactive
-only
: headless claude -p writes a complete transcript even on affected
machines.

Reproduced independently on WSL2 and macOS (two reporters). Not observed
on Amazon Linux 2023 (EC2) in either pty or tmux testing — so the trigger is
environment-sensitive (likely a filesystem / write-flush assumption), not a
single platform.

It breaks --resume, the /resume picker, session history, and any tooling
that tails the transcript JSONL — for interactive sessions on affected systems.

Reproduction status (same prompt, MARKER repro)

| Environment | Mode | Version | Transcript | Persisted? |
|---|---|---|---|---|
| WSL2 (Ubuntu) | interactive (pty / tmux / no-tmux) | 2.1.169 | ~108 B (ai-title only) | ❌ no |
| macOS (fresh machine, tmux in Terminal.app) | interactive | 2.1.169 | ai-title only | ❌ no |
| WSL2 (Ubuntu) | interactive | 2.1.168 | ~26 KB | ✅ yes |
| WSL2 (Ubuntu) | headless -p | 2.1.169 | ~23 KB | ✅ yes |
| Amazon Linux 2023 (EC2) | interactive (pty and real tmux) | 2.1.169 | ~11–13 KB | ✅ yes |
| Windows | interactive | 2.1.169 | full | ✅ yes |

Affected so far: WSL2, macOS. Not reproduced: Amazon Linux 2023. The
core serializer is intact (headless writes on affected boxes); the break is in
the interactive-mode write/flush path, and only fires on some environments.

Environment (reporter 1)

  • Claude Code 2.1.169 (native install), autoUpdates: false
  • WSL2 (Ubuntu) on Windows; kernel 6.6.x-microsoft-standard-WSL2
  • Reproduces in a clean throwaway dir, no MCP/plugins; reproduces driving a

bare claude binary through a pty (no wrapper/observer/hook in the loop)

Reporter 2 (see comments): fresh ~factory macOS, Claude Code in tmux in
Terminal.app — same ai-title-only stub.

Repro

mkdir /tmp/cctest && cd /tmp/cctest
claude                              # 2.1.169
# prompt: Reply with exactly: MARKER123
# then /quit
cat ~/.claude/projects/-tmp-cctest/*.jsonl          # ~108 B, ai-title only
grep -r MARKER123 ~/.claude ~/.config ~/.cache ~/.local/share /tmp   # finds nothing

Expected

The session JSONL contains the user prompt and assistant reply records (as
2.1.168 does, and as 2.1.169 itself does headless / on Amazon Linux / Windows),
so --resume and history work and the content is durable.

Actual (2.1.169 interactive, affected systems)

~108-byte JSONL containing only:

{"type":"ai-title","aiTitle":"...","sessionId":"<id>"}

No user/assistant records — 0 of each — even though the turn completes
normally (reply rendered; /quit prints the claude --resume <id> hint). The
marker is not found anywhere under ~/.claude, ~/.config, ~/.cache,
~/.local/share, /tmp, /var/tmp, /dev/shm. Persists across graceful
/quit (not a flush-on-exit race).

--resume / /resume broken (downstream)

/quit prints claude --resume <session-id>, but that command returns
No conversation found with session ID: <session-id>. The interactive
/resume picker lists the session but opens to an empty conversation. Both
work on 2.1.168.

Ruled out as causes

Reproduces with each removed/changed:

  • SessionStart hooks + statusLine command (stripped via CLAUDE_CONFIG_DIR

clone) — still stubs.

  • Any local wrapper/observer — reproduces with the bare binary via pty.
  • tmux — controlled platform × tmux matrix: WSL stubs both in and out of

tmux; Amazon Linux writes both in and out of tmux. tmux (and --session-id
injection) is neither necessary nor sufficient.

  • Disk / inodes — ample free space; 2.1.168 writes to the same FS.
  • The binary/install — same 2.1.169 binary writes a full transcript headless on

the same machine.

Likely-related changelog entries (2.1.169)

2.1.169 lists two fixes touching session conversation persistence:

  • "Fixed background sessions re-attached after overnight retire losing their

conversation and re-running the original prompt"

  • "Fixed restoring a completed session from claude agents dropping chat

history and re-running the original prompt"

Both share the "re-running the original prompt" signature — a session
restored with its initial prompt but none of the subsequent conversation,
mirroring this bug (JSONL gets the start-of-session ai-title stub but no later
user/assistant records). The save/restore rework that fixed those cases may
have broken interactive transcript writing on environments with different
filesystem/flush behavior. Pinning back to 2.1.168 fully restores it.

View original on GitHub ↗

5 Comments

cnighswonger · 2 months ago

The version-bisect repro here is exactly the data anyone debugging this needs — 2.1.168 wrote correctly, 2.1.169 doesn't, no plugins involved, reproduces in a clean directory. That's about as clean as bug repros get.

Some affected users may benefit from a temporary mitigation while this is being fixed: there's a small mirror cron / shell script we run on our agent fleet that watches ~/.claude/projects/**/*.jsonl and writes a size-comparison-skip copy to a backup location every few minutes — originally built for a different incident, but its protection envelope covers the failure shape this regression presents (durable copy of whatever ends up in the live JSONL).

Important caveat for this specific issue: the mirror script copies what gets written, not what doesn't. If 2.1.169 is failing to write user/assistant records into the JSONL in the first place (which is what your byte count suggests — 108 bytes / ai-title stub only), there's nothing for a mirror to capture. The script is useful for the broader class of "session content was on disk and then disappeared" failures (transcript truncation, post-write corruption, accidental deletion), but it can't recover content that was never persisted.

So for users hit by THIS regression specifically, the only safe paths are downgrade to 2.1.168 and stay there until 2.1.170 ships a fix, or accept the loss for sessions already run on 2.1.169.

Script location for anyone curious about the broader mirror pattern: cnighswonger/claude-code-cache-fix has it as part of its operational tooling — tools/claude-session-backup.sh shape. MIT-licensed if you want to adopt it for protection against the next on-disk failure mode.

— AI Team Lead

ogt · 2 months ago

I can reproduce the same - identical "stub" jsonl with ai title only.

For the record this is what my claude believes is happening:

<img width="1188" height="588" alt="Image" src="https://github.com/user-attachments/assets/d2b1474f-7a80-403b-973a-64983e1f506b" />

Devail1 · 2 months ago

Thanks for the independent repro @ogt. One correction on the screenshot's root-cause guess: tmux isn't the trigger. I ran a controlled platform × tmux matrix:

| Platform | in tmux | no tmux |
|---|---|---|
| WSL2 | ❌ stub | ❌ stub |
| Native Linux (Amazon Linux 2023) | ✅ full | ✅ full |

tmux (and --session-id injection) changes nothing on either platform. The only variable that flips it is WSL2 vs native Linux, interactive-only — headless -p and 2.1.168 both write fine on the same WSL2 box.

Are you on WSL2? If so it promotes this from "my machine" to "WSL2 generally."

ogt · 2 months ago

@Devail1 I am on a fresh 6 month old Mac. Pretty much factory. Claude code inside tmux inside Terminal App

Devail1 · 2 months ago

Thanks @ogt — that's a key data point. A clean macOS box reproducing it means this is not WSL-specific (I'd over-narrowed it from a single Amazon-Linux control). I've broadened the report accordingly.

Current picture across what's been tested:

  • Affected (interactive, 2.1.169): WSL2 (Ubuntu), macOS
  • Not reproduced: Amazon Linux 2023 (EC2), in pty and real tmux
  • Unaffected on all: headless claude -p, and 2.1.168 interactive

So it's a genuine cross-platform 2.1.169 regression in the interactive write path that only fires on some environments — most likely a filesystem / write-flush assumption (WSL2's ext4-on-VHD and APFS differ from EC2's plain ext4/xfs). And to head off the tmux guess: tmux isn't the trigger — WSL stubs without it, Amazon Linux writes with it.

Showing cached comments. Read the full discussion on GitHub ↗