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
Guest protocol: tty and window resize for StartProcess #104
ax ssh (soon ax exec, google/ax#492) runs commands through the env guest ProcessService, which has no pty today: -i gives a prompt but no job control or full-screen tools (google/ax#374). Proposal, all additive:
StartProcessRequest gets an optional tty with rows/cols. When set, the tracker allocates a pty (Setsid + Setctty), puts merged output on stdout, and treats EIO on the master as EOF.
A unary ResizeProcess(process_id, rows, cols) RPC (SIGNAL_WINCH carries no size).
tty processes exempt from the 10 MB output cap, or use a ring buffer, so long top/vim sessions don't go silent.
Old clients and servers keep working. Happy to send the PR if this shape works for you.
Opens a pty pair (/dev/ptmx + TIOCGPTPEER), applies initial window dimensions via TIOCSWINSZ, and launches the child with Setsid: true, Setctty: true, Ctty: 0 with Stdin/Stdout/Stderr bound to the slave fd.
Streams the master fd into the stdout spool (stderr remains empty), exempts tty processes from the 10 MB MaxLogBytes truncation cap, and treats EIO when the last slave closes as clean EOF.
Implements ResizeProcess via TIOCSWINSZ on the master fd (delivering SIGWINCH to the foreground process group) and returns FailedPrecondition if the process was started without tty or has already exited.
API Proxy & Go SDK (internal/apiservice/server.go, clients/go/process.go): Added Server.ResizeProcess proxy forwarding and (*Process).Resize(ctx, rows, cols).
Activity
tomergee commentedon Oct 18, 2026
Confirmed and implemented in #107.
Summary of Changes
proto/ateenv/v1alpha/guest.proto): Addedmessage TTY { uint32 rows = 1; uint32 cols = 2; },TTY tty = 6onStartProcessRequest, andrpc ResizeProcess(ResizeProcessRequest) returns (ResizeProcessResponse)onProcessService(regenerated Go and Python stubs).guest/process/pty_linux.go,guest/process/tracker.go,guest/process/service.go):/dev/ptmx+TIOCGPTPEER), applies initial window dimensions viaTIOCSWINSZ, and launches the child withSetsid: true, Setctty: true, Ctty: 0withStdin/Stdout/Stderrbound to the slave fd.stdoutspool (stderrremains empty), exemptsttyprocesses from the 10 MBMaxLogBytestruncation cap, and treatsEIOwhen the last slave closes as clean EOF.ResizeProcessviaTIOCSWINSZon the master fd (deliveringSIGWINCHto the foreground process group) and returnsFailedPreconditionif the process was started withoutttyor has already exited.internal/apiservice/server.go,clients/go/process.go): AddedServer.ResizeProcessproxy forwarding and(*Process).Resize(ctx, rows, cols).anzal1 commentedon Oct 18, 2026
Thanks for picking this up so fast! I'll do the ax client side (raw mode, SIGWINCH resize,
~.escape) on top of #107 and google/ax#492 once they land.