Skip to content

fix: SSH remote ping uses same args as Exec; remove debug traces - #143

Merged
gavin-jeong merged 1 commit into
masterfrom
fix/remote-ssh-ping-and-persist
Jul 25, 2026
Merged

fix: SSH remote ping uses same args as Exec; remove debug traces#143
gavin-jeong merged 1 commit into
masterfrom
fix/remote-ssh-ping-and-persist

Conversation

@gavin-jeong

Copy link
Copy Markdown
Collaborator

Root cause of sessions disappearing after restart: other ccx processes running concurrently each call cleanupStaleRemoteSessions + pollRemotePhasesCmd, racing on the shared remote-sessions.yaml file. One ccx instance's failed SSH ping writes [], clobbering the session added by another.

Fixes:

  • SSH Prepare/Status use the same SSH args as Exec (no BatchMode, with keepalive) so the ping succeeds on macOS where BatchMode=yes hangs with the launchd SSH agent.
  • Debug traces removed from persist.go.
  • Verified with single ccx process: SSH session persists across restart and survives 30s poll cycle.

go build/vet clean; go test ./... green (except pre-existing TestNewAppDefaults failure).

Root cause of sessions disappearing after restart: other ccx processes
(running concurrently) each call cleanupStaleRemoteSessions +
pollRemotePhasesCmd, racing on the shared remote-sessions.yaml file.
When multiple ccx instances ping the same SSH host, one fails and
writes [], clobbering the session added by another instance.

Fixes:
- SSH Prepare/Status use the same SSH args as Exec (no BatchMode, with
  keepalive) so the ping succeeds on macOS where BatchMode=yes hangs
  with the launchd SSH agent.
- Debug traces removed from persist.go.
- Verified: with a single ccx process, the SSH session persists across
  restart and survives the 30s poll cycle.

@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!

@jinsekim jinsekim added the auto-review/approved Auto-approved by the Slack auto-reviewer bot label Jul 25, 2026
@gavin-jeong
gavin-jeong merged commit 2246300 into master Jul 25, 2026
3 checks passed
@gavin-jeong
gavin-jeong deleted the fix/remote-ssh-ping-and-persist branch July 25, 2026 13:33
@gavin-jeong
gavin-jeong restored the fix/remote-ssh-ping-and-persist branch July 25, 2026 14:01
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