[BUG] --teleport exits 1 with no stdout/stderr when run without a TTY

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?

claude --teleport <session-id> run without a TTY (piped stdin, backgrounded, or otherwise non-interactive) exits 1 with no output on stdout or stderr and writes nothing. The silent failure is indistinguishable from an authentication/authorization failure or a missing session, so callers can't tell "needs an interactive terminal" from "wrong account" from "session gone."

What Should Happen?

A distinct diagnostic (e.g. "teleport requires an interactive terminal") and/or a distinct exit code, so automation can branch correctly.

Steps to Reproduce

  1. Run claude --teleport <session-id> </dev/null (or backgrounded / piped — anything without a controlling TTY).
  2. Observe exit code 1, empty stdout/stderr, and no transcript under ~/.claude/projects/.
  3. Run the same command with --debug → the actual reason is surfaced, confirming the information exists but is suppressed on the normal path.

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

claude -p --teleport ... is the supported headless path and works. This report is specifically about the interactive invocation failing opaquely instead of reporting that it needs a terminal.

View original on GitHub ↗