Skip to content

fix(coding-agent): route waits to the monitor tool — kill the tmux contradiction, teach the bash surface, dedup guidance #1280

fix(coding-agent): route waits to the monitor tool — kill the tmux contradiction, teach the bash surface, dedup guidance

fix(coding-agent): route waits to the monitor tool — kill the tmux contradiction, teach the bash surface, dedup guidance #1280

Triggered via pull request July 28, 2026 04:14
Status Failure
Total duration 20m 52s
Artifacts

ci.yml

on: pull_request
Matrix: terminal-cross-os
Fit to window
Zoom out
Zoom in

Annotations

2 errors
Check and test
Process completed with exit code 1.
test/suite/terminal-monitor-notify.test.ts > terminal monitor event delivery > teaches watcher discipline in the terminal prompt: packages/coding-agent/test/suite/terminal-monitor-notify.test.ts#L187
AssertionError: expected '\n## Persistent terminal sessions\n\n…' to match /never a foreground\s+sleep\/…/poll loop - Expected: /never a foreground\s+sleep\/poll loop/ + Received: " ## Persistent terminal sessions The `bash` tool is PTY-backed. For long-running or interactive work, do NOT use tmux or manual `&` backgrounding — use the built-in session tools: - `bash({ command, run_in_background: true })` starts a persistent session and returns a `bash_id` immediately. Foreground calls still block and return output; their `timeout` (seconds) is a kill deadline. Background sessions ignore `timeout` and live until they exit or you call `kill_bash`. - `bash_output({ bash_id, filter, view })` peeks at a session without blocking: new output since the last read, the status line, or a rendered full-screen snapshot of TUIs via `view: \"screen\"`. Completion arrives as a notification carrying the exit code and output tail — peeking is for steering, never for waiting. - `monitor({ description, command, filter?, timeout_ms?, persistent? })` subscribes you to a command: its stdout lines arrive as injected events while you keep working. Shape the command by notifications needed: exit-on-condition for one completion event; emit-per-occurrence (`tail -f | grep --line-buffered`, a polling loop inside the command) for a stream. Filter noise at the command source, stop with `kill_bash`, and use `monitor({ action: \"rearm\", bash_id })` only after a wake-budget pause. - `bash_input({ bash_id, input, keys, submit })` sends stdin or named keys (e.g. `[\"ctrl+c\"]`, `[\"enter\"]`) to steer a REPL or interrupt a process. - `bash_resize({ bash_id, cols, rows })` resizes the PTY so full-screen programs reflow. - `kill_bash({ bash_id })` (or `{ all: true }`) tears the session tree down with no orphans. Typical flow: start with `run_in_background: true`, watch for patterns with `monitor({ command, filter })`, peek with `bash_output`, steer with `bash_input`, then `kill_bash` when done. Completion notifications carry the exit code and output tail, so a follow-up read is only needed when the tail is not enough. " ❯ test/suite/terminal-monitor-notify.test.ts:187:35