Skip to content

fix(terminal): don't ssh-wrap the local runner's own tmux attach#264

Closed
dkrattiger wants to merge 1 commit into
mainfrom
panopticon/fix-local-attach-ssh-wrap
Closed

fix(terminal): don't ssh-wrap the local runner's own tmux attach#264
dkrattiger wants to merge 1 commit into
mainfrom
panopticon/fix-local-attach-ssh-wrap

Conversation

@dkrattiger

Copy link
Copy Markdown
Contributor

Summary

Fixes "task entry requires multiple t presses": the local runner registers its own hostname as runner_host (ADR 0013 §6), and the dashboard's t hook forwarded it unchecked. Every attach got ssh-wrapped (ssh -t <own-host> tmux ...) even for a same-machine task, and run_console_local's attach swallows failures — so a slow/flaky loopback ssh silently no-op'd, requiring repeated t presses to eventually succeed.

switch_to (src/panopticon/terminal/console.py) now only treats host as remote when it differs from the console's own hostname (local_host, injectable for tests), matching ADR 0013 §7's intended "not the local machine" check, which had never been implemented.

See the plan artifact (plan.md) on this task for the full root-cause analysis.

  • src/panopticon/terminal/console.pyswitch_to gains a local_host param; drops host to None when it equals the local machine's hostname.
  • tests/test_console.py — covers the local (own-hostname) and remote (differing-hostname) cases explicitly.

The local runner registers its own hostname as runner_host (ADR 0013 §6), which
switch_to forwarded unchecked — every `t` press ssh-wrapped a same-machine tmux
attach (`ssh -t <own-host> tmux ...`). run_console_local's attach swallows
failures, so a slow/flaky loopback ssh silently no-op'd, requiring repeated `t`
presses. switch_to now only treats host as remote when it differs from the
console's own hostname.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@tildesrc

tildesrc commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

I suppose this was fixed in #257?

@dkrattiger dkrattiger closed this Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants