Skip to content

Add support/bugfixes for using zeus with AI tools#689

Merged
latortuga merged 3 commits intomasterfrom
tty-flags
Feb 24, 2026
Merged

Add support/bugfixes for using zeus with AI tools#689
latortuga merged 3 commits intomasterfrom
tty-flags

Conversation

@latortuga
Copy link
Collaborator

No description provided.

When running Zeus commands from AI tools or piped contexts, the client
auto-detects TTY from stdout, which causes commands to get socket pairs
instead of PTYs. This adds explicit flags to override TTY detection:

- --tty / -t: force PTY allocation (like ssh -t)
- --no-tty / -T: force socket pairs (like ssh -T)
- Default (auto): existing behavior, detect from fd

Also fixes sync.WaitGroup pass-by-value bug in forwardOutput and guards
MirrorWinsize call with a terminal check.
Several fixes to make zeus work when invoked from piped contexts
(e.g. Claude Code which redirects stdin from /dev/null):

- Close remote fd copies immediately after sending to server, not via
  defer -- prevents fd leak that blocks EOF on local ends
- Remove broken sync.WaitGroup (was pass-by-value and Add inside
  goroutine, effectively dead code) -- exit status read from the unix
  socket is the real synchronization point
- Shutdown write side of socket on stdin EOF so command process gets
  EOF instead of blocking forever on stdin reads
- Do not SIGKILL command after receiving exit status -- with socket
  pairs Ruby uses full buffering, and killing the process before it
  flushes loses all output
- Guard MirrorWinsize with IsTerminal check
- Bump version to 0.19.0
@latortuga latortuga merged commit 1a7b0f7 into master Feb 24, 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.

1 participant