Relationships
#3917 `swamp workflow list --server` TUI picker exits immediately in an interactive terminal
Opened by zts · 10/25/2026· Shipped 10/25/2026
What happens
In an interactive terminal, swamp workflow list (local) opens the TUI picker. You can move through the workflows, preview their definitions, and select one. The picker stays open until you press Enter or Esc.
swamp workflow list --server ws://127.0.0.1:9090, run from the same terminal, shows the picker briefly, then exits with code 0 without any keypress. The user gets no chance to navigate, preview, or select.
Reproduction
swamp serve # in another shell, listening on 127.0.0.1:9090
# Local: the picker stays open and is interactive
swamp workflow list
# Remote: the picker flashes up, then the process exits (exit=0)
swamp workflow list --server ws://127.0.0.1:9090 --log-level debug 2>/tmp/swamp-debug.log; echo "exit=$?"--log-level debug writes nothing to stderr except the Remote ws://127.0.0.1:9090 banner, so I have no further diagnostics.
Possibly related observation
Under a pseudo-TTY ((sleep N) | script -q /dev/null swamp workflow list ...):
- Local: the picker keeps running after stdin reaches EOF (it was still alive after 60s).
- Remote: the picker renders fully, then exits with code 0 at the exact moment stdin reaches EOF.
So the remote path ends the picker on stdin EOF or an input-stream end, and the local path doesn't. In a real terminal the remote picker exits straight away, which suggests its input stream ends or detaches right after the list renders. Possible causes are stdin not being put into raw mode, stdin being consumed or closed by the WebSocket client, or the picker resolving when the remote stream completes.
This may be a regression from the fix for #1866, which added TTY detection to the --server list commands.
Expected
When stdin/stdout are a TTY, --server should behave like the local path: keep the picker open and interactive, with the same navigation, preview, Ctrl-r run, and select keys.
Scope
I only tested swamp workflow list. swamp model list --server and the other --server list pickers probably share this code path.
Environment
- swamp 20261025.114930.0-sha.b4dd513d (client and server)
- macOS (Darwin 24.6.0), zsh
- Server: local
swamp serveat ws://127.0.0.1:9090
Shipped
Click a lifecycle step above to view its details.
stack72 commented 10/25/2026, 9:37:33 PM
Thanks @zts for reporting this! We shipped: With --server, search and list commands never start the interactive picker. In a terminal they print a plain, non-interactive list of the same items --json returns (each entry is the text the picker prints on select, blank line between entries, then a count, plus the extras the picker shows such as the reaped-runs note and the type search hint). Piped and --json output are unchanged, local commands keep the picker, and the unawaited completed() call that made workflow list, report search, report type search and vault type search flash and exit is gone.. The fix has been merged and a release is on its way. We appreciate your contribution to swamp.
Sign in to post a ripple.