[BUG] Interactive --teleport silently writes no transcript when nested (CLAUDE_CODE_CHILD_SESSION set)

Open 💬 0 comments Opened Jul 7, 2026 by RandyHaddad

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

Running an interactive claude --teleport <session-id> from inside another Claude Code session — i.e. the child process has CLAUDE_CODE_CHILD_SESSION set in its environment — opens the session, restores full history, and answers prompts, but never writes the local transcript JSONL under ~/.claude/projects/. There is no warning, error, or log line indicating that persistence was skipped.

I understand this is likely intentional (child sessions shouldn't pollute local history). The problem is that it is completely silent, which makes any automation built on teleport look broken for a non-obvious reason.

What Should Happen?

Either persist the transcript, or emit a clear message (e.g. "transcript persistence disabled for child session; set <flag> to override") and document the override.

Steps to Reproduce

  1. From within a Claude Code session (or any process with CLAUDE_CODE_CHILD_SESSION set in its env), run claude --teleport <session-id> interactively.
  2. Let it fully open, send one message, then quit.
  3. Observe: no new .jsonl appears under ~/.claude/projects/.
  4. Re-run the exact same command with the CLAUDE* environment variables stripped from the child → the transcript now persists within seconds. Only that variable differs between the failing and succeeding runs.

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Claude Code Version

2.1.200 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Non-interactive/CI environment

Additional Information

Print mode (claude -p --teleport ...) does persist even when nested, which is a good workaround — but the interactive silent-skip is surprising and undocumented.

View original on GitHub ↗