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
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -113,7 +113,7 @@ A colleague then used `agent-tty` to build an experimental TUI for Coder agents
113
113
114
114
## Command surface
115
115
116
-
Every user-facing command takes `--json` and returns a stable, machine-readable envelope, and exits with a stable code (`0` success, `2` usage error, `3` session not found, …) so scripts can branch without parsing output.
116
+
Every user-facing command takes `--json` and returns a stable, machine-readable envelope, and exits with a stable code (`0` success, `2` usage error, `3` session not found, `11` wait timeout, …) so scripts can branch without parsing output.
Copy file name to clipboardExpand all lines: docs/USAGE.md
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,7 +104,7 @@ Useful flags:
104
104
-`--exit`: wait for the process to exit.
105
105
-`--timeout <ms>`: maximum wait time in milliseconds, with `0` meaning infinite.
106
106
107
-
On timeout, a standalone `wait`still exits `0` and reports `matched: false` / `timedOut: true` in the JSON result — check the envelope, not the exit code. Inside `batch`, a timed-out `wait` step is a step failure (`WAIT_TIMEOUT`, exit code `11`under fail-fast).
107
+
On timeout, a standalone `wait` exits `11` (`WAIT_TIMEOUT`) while preserving a success JSON envelope with `timedOut: true` in the result (`matched: false` for render waits). Inside `batch`, a timed-out `wait` step is a step failure with the same `WAIT_TIMEOUT` exit code under fail-fast.
108
108
109
109
### Screen Hash
110
110
@@ -235,22 +235,22 @@ A lone `'%'` does **not** restore the marker (zsh treats it as a prompt escape t
235
235
236
236
## Exit Codes
237
237
238
-
Every command exits with a stable code, so scripts can branch without parsing output. The `--json` error envelope carries the precise `error.code`(for example `WAIT_TIMEOUT`); the exit code is a coarser, stable summary of it.
|`2`| Usage error: unknown command or flag, or an invalid argument (session ID, dimensions, keys, duration, signal, input). |
245
-
|`3`| Session not found. |
246
-
|`4`| Session is not running or already destroyed. |
247
-
|`5`| Session host timed out. |
248
-
|`6`| Session host unreachable. |
249
-
|`7`| Export failed. |
250
-
|`8`| Storage read/write or manifest validation error. |
251
-
|`9`| Protocol or RPC error. |
252
-
|`10`| Replay failed. |
253
-
|`11`| A `wait` step inside a fail-fast `batch` timed out (standalone `wait` exits `0` with `timedOut: true` in the result — see [`wait`](#wait)). |
238
+
Every command exits with a stable code, so scripts can branch without parsing output. The `--json` error envelope carries the precise `error.code`when a command fails before producing a result. Commands that preserve an observable result for a failed predicate, such as timed-out `wait` and fail-fast `batch`, still emit a success envelope while exiting non-zero.
0 commit comments