Bug: --teleport and --list-sessions fail with 'too many arguments' error
Resolved 💬 2 comments Opened Apr 14, 2026 by nikishev Closed May 24, 2026
Description
The claude --teleport and claude --list-sessions commands fail with a cd: too many arguments error, preventing users from switching between sessions or listing available sessions.
Steps to Reproduce
- Run
claude --list-sessionsfrom a regular terminal - Or run
claude --teleport <session-id>from a regular terminal
Expected Behavior
--list-sessionsshould display a list of available sessions--teleportshould switch to the specified session
Actual Behavior
Both commands fail with errors like:
(eval):cd:1: too many arguments
or
(eval):cd:1: string not in pwd: /Users/nikishev/Claude
Environment
- OS: macOS (Darwin 25.4.0)
- Shell: zsh
- Claude Code Version: 2.0.50 (based on session logs)
Additional Context
The error suggests the commands are attempting to cd into a directory path but aren't properly quoting paths that may contain spaces or special characters. The error occurs even when the directory path doesn't contain spaces, indicating a potential issue with how the teleport feature constructs the cd command.
Impact
Users cannot:
- Switch between different Claude Code sessions
- View their available sessions
- Resume previous work sessions
This significantly impacts the multi-session workflow functionality.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗