You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ax ssh: allocate a PTY when stdin is a terminal #790
ax ssh <task> runs the remote command on pipes, so full-screen programs such as Claude Code, vim or top do not work: tty prints "not a tty" and TERM is empty. The guest protocol's StartProcessRequest has no PTY or window-size field.
It does work today by allocating the PTY inside the sandbox by hand: stty raw -echo; ax ssh <task> -- sh -c 'export TERM=xterm-256color; exec script -qfc "stty rows 40 cols 120; exec claude" /dev/null'; stty sane. With that, the Claude Code TUI renders, and arrow keys, Enter and Ctrl-C reach it.
Proposal: make this the default when stdin is a terminal.
Add a PTY mode to ax-runner (for example ax-runner pty -- <cmd>) that opens a PTY and relays bytes, and have ax ssh call it through the existing StartProcess. This needs no Substrate protocol change and does not depend on the image shipping script.
ax ssh puts the local terminal in raw mode, sets TERM and the initial rows and columns, and restores the terminal on exit.
Forward window resizes (SIGWINCH) to the remote PTY.
Keep plain pipes when stdin is not a terminal, and add a flag to turn the PTY off.
Check the guest's default process timeout so that a long interactive session is not killed.
Longer term, a tty field and a resize RPC in the guest protocol (agent-substrate/env) would replace the runner-side helper.
Activity
Abhaysiri commentedon Nov 26, 2026
Hello, I can take on this issue , could you assign it to me?