[BUG] Channel-notification turns (--dangerously-load-development-channels) not written to session JSONL in 2.1.172/2.1.173
What happened
A turn driven by a channel notification (notifications/claude/channel, delivered via an MCP stdio server with --dangerously-load-development-channels) runs to completion — the agent reads context, calls tools, and produces its answer — but no session JSONL transcript is ever written to disk for that turn. The session project directory under ~/.claude/projects/<encoded-cwd>/ is created (it contains a memory/ subdir), but the <session-id>.jsonl file never appears, even though the running agent's own status line cites that exact filename.
Typed/interactive turns and -p turns still write transcripts normally. Only channel-notification-driven turns vanish from disk.
This breaks any harness that observes agent activity by tailing the session transcript: the agent answers correctly, but there is no on-disk record of the turn (no user/assistant entries, no turn_ended), so the supervising process is blind to work that actually happened.
Version boundary
Controlled A/B against the same harness — the only variable is the claude binary:
| Version | Channel-turn transcript written? |
|---|---|
| 2.1.170 | ✅ yes (works) |
| 2.1.172 | ❌ no |
| 2.1.173 | ❌ no |
2.1.173 does not fix it. Pinning to ≤ 2.1.170 is the only workaround we've found.
Minimal evidence (2.1.173)
- The agent ran a full turn and posted its answer via an MCP tool — confirmed in its tmux pane.
- The agent's status line referenced session
b606e37e-…jsonl. find ~/.claude/projects -name 'b606e37e-….jsonl'→ no such file anywhere on disk.- The session project dir
~/.claude/projects/-private-tmp-…-project/contained only an emptymemory/subdir — no.jsonl.
This looks like the same class as prior persistence regressions
- #60984 — 2.1.144/2.1.145: JSONL contained only an
ai-titlestub, no message content; fixed by downgrading to 2.1.143. - #66486 — 2.1.169: interactive sessions wrote only an
ai-titlestub (regressed from 2.1.168).
Same fingerprint: a session-persistence rework that stops flushing real turn content to the transcript. This report is the channel-notification-turn variant, newly present in 2.1.172 and still present in 2.1.173.
Steps to reproduce
- Launch
claudewith--dangerously-load-development-channels server:<name>and an MCP stdio server that advertises theclaude/channelcapability. - From that MCP server, push a
notifications/claude/channelnotification instructing the agent to do some work and respond. - Observe: the agent completes the turn and answers, but
~/.claude/projects/<encoded-cwd>/<session-id>.jsonlis never created. - Repeat with 2.1.170 → the transcript is written.
Environment
- Claude Code: 2.1.172 and 2.1.173 (broken); 2.1.170 (good)
- OS: macOS 26.4 (arm64)
- Node: v25.9.0
Expected
Channel-notification-driven turns should be persisted to the session JSONL transcript exactly like typed/-p turns are.