Skip to content

fix: shell-quote each SSH arg in the attach retry script - #145

Merged
gavin-jeong merged 1 commit into
masterfrom
fix/remote-attach-quoting
Jul 25, 2026
Merged

fix: shell-quote each SSH arg in the attach retry script#145
gavin-jeong merged 1 commit into
masterfrom
fix/remote-attach-quoting

Conversation

@gavin-jeong

Copy link
Copy Markdown
Collaborator

Enter on a remote SSH session went to a plain SSH shell instead of attaching to the remote tmux session running Claude.

Root cause: the retry wrapper script joined sshArgs with spaces, but the args contain spaces themselves (the tmux command with quotes). The shell split them incorrectly: ssh -t host sh -c tmux new-session ... became ssh -t host sh -c tmux (sh -c only gets "tmux", losing the rest of the command).

Fix: each ssh arg is now individually shell-quoted so the script passes the full tmux command string intact to the remote sh -c.

go build/vet clean.

The retry wrapper script joined sshArgs with spaces, but the args
contain spaces themselves (the tmux command with quotes). The shell
split them incorrectly: "ssh -t host sh -c tmux new-session ..." became
"ssh -t host sh -c tmux" (sh -c only gets "tmux", losing the rest).

Each arg is now individually shell-quoted so the script passes the
full tmux command string intact to the remote sh -c.
@Kairo-Kim Kairo-Kim added the auto-review/approved Auto-approved by the Slack auto-reviewer bot label Jul 25, 2026

@jinsekim jinsekim left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@gavin-jeong
gavin-jeong merged commit 915c13b into master Jul 25, 2026
3 checks passed
@gavin-jeong
gavin-jeong deleted the fix/remote-attach-quoting branch July 25, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-review/approved Auto-approved by the Slack auto-reviewer bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants