v2.1.173 regression: TUI writes no transcript records when CLAUDE_CODE_CHILD_SESSION is inherited from a parent claude session — silent data loss, --resume broken

Open 💬 7 comments Opened Jun 11, 2026 by Nejjad

Summary

Since v2.1.173, interactive TUI sessions spawned under ConPTY (i.e., inside embedded terminals — Tauri/Electron apps using portable-pty, terminal multiplexers, IDE-like tools) never write conversation records to the session transcript. The ~/.claude/projects/<cwd-slug>/<session-id>.jsonl file contains only a single {"type":"ai-title",...} record (~100 bytes) — zero user/assistant records — neither incrementally during the session nor after a clean /exit. Consequently claude --resume <session-id> reports No conversation found with session ID: <id> and the conversation history is silently and permanently lost.

This is a regression from v2.1.169: the identical spawn path produced full transcripts on v2.1.169 earlier the same evening, and broke at the exact moment the machine auto-updated to v2.1.173.

Environment

  • Windows 11 Pro (10.0.22631)
  • Claude Code v2.1.173 (auto-updated from v2.1.169 on 2026-06-11 ~19:10 local; regression boundary matches exactly)
  • Spawn: ConPTY via portable-pty 0.8.x (Rust) — openpty + spawn_command, interactive TUI, claude --session-id <uuid> in a trusted project directory

Reproduction

  1. Spawn claude --session-id <fresh-uuid> as an interactive TUI under ConPTY (any embedded-terminal host).
  2. Submit a prompt (typed or bracketed paste + CR). The turn completes normally — response renders, tools run, the Stop hook fires, an AI title is generated.
  3. Inspect ~/.claude/projects/<cwd-slug>/<uuid>.jsonl → only the ai-title record. Poll as long as you like; no message records appear.
  4. Type /exit, wait, inspect again → unchanged.
  5. claude --resume <uuid> (same cwd) → No conversation found with session ID: <uuid>.

Evidence matrix (all same machine, same day)

| Scenario | Version | Transcript |
|---|---|---|
| TUI, plain terminal | 2.1.169 (pre-update) | ✅ full |
| TUI, plain terminal (long-running session) | 2.1.173 | ✅ full, incremental |
| Headless claude -p with --session-id | 2.1.173 | ✅ full |
| Headless -p, custom env vars + UserPromptSubmit/Stop hooks active | 2.1.173 | ✅ full |
| TUI under ConPTY (portable-pty) | 2.1.173 | ❌ ai-title stub only |
| TUI under ConPTY, after clean /exit | 2.1.173 | ❌ still stub |

Notes:

  • The turn demonstrably completes in the broken cases: the AI title is generated from the prompt content, registered hooks fire (UserPromptSubmit, Stop), tool calls execute and their side effects land.
  • Per-session side artifacts ARE written in the broken cases: file-history/<session-id>/, projects/<slug>/<session-id>/tool-results/…, security_warnings_state_<session-id>.json, and the global history.jsonl all update. Only the conversation records in <session-id>.jsonl are missing.
  • Hook presence is ruled out as the trigger (broken with hooks inert; intact in headless with hooks active).

Impact

Any tool embedding Claude Code in a terminal pane loses all conversation history silently: --resume is impossible, and users discover the loss only after closing a session. This is data loss with no error surfaced anywhere.

Expected

TUI sessions under ConPTY write transcript records as they did in v2.1.169 (and as headless mode and plain-terminal TUIs still do in v2.1.173).

View original on GitHub ↗

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