Teleport silently fails on dirty git working tree instead of showing error
Bug Description
claude --teleport <session_id> exits with code 1 and zero output when the git working directory is dirty, instead of displaying the error message that exists in the code ("Git working directory is not clean. Please commit or stash your changes before using --teleport.").
Steps to Reproduce
- Have a dirty git working tree (e.g., a modified submodule pointer)
- Run
claude --teleport <valid_session_id> - Observe: no output, no error, exit code 1
$ claude --teleport session_01W5Qg5DnEatGfhXCdZLYVcv
$ echo $?
1
Even --debug and --verbose produce no output.
Expected Behavior
The CLI should print the error message: "Git working directory is not clean. Please commit or stash your changes before using --teleport."
Actual Behavior
Silent exit with code 1. No output on stdout or stderr.
Environment
- Claude Code version: 2.1.87
- Platform: Linux (ARM aarch64, Tegra)
- Auth: claude.ai, team subscription
Notes
The error message string exists in the binary — it's just not being rendered. After committing/stashing changes, teleport works correctly. The silent failure made debugging this take significantly longer than necessary.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗