CLI for agents: non-TTY safe run/confirmations, compact inspect, wait hints and exit codes

- Without a terminal, run behaves as --json, tui refuses and confirmations
  fail fast naming --yes instead of prompting.
- inspect prints a compact summary by default; --step N, --transcripts and
  --json give detail.
- wait names a failed run's stage and first diagnostic line, prints how to
  answer a run waiting on a person, and exits 2 when any run failed,
  was canceled or interrupted (1 stays for client errors).
- help describes the current # outcome / # handoff format.
- Task starter's Land stage drops edit to match format.md; skill docs
  document run --json --yes, retry --yes --json and the new behaviour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 00:27:14 +00:00
parent accb9970b6
commit 2bde6b6344
16 changed files with 658 additions and 56 deletions
+15
View File
@@ -10,3 +10,18 @@ type ExitError struct{ Code int }
func (e *ExitError) Error() string { return fmt.Sprintf("subprocess exited with status %d", e.Code) }
func (e *ExitError) ExitCode() int { return e.Code }
// StatusError is a failure whose message is printed like any other error but
// whose process exit status is Code rather than the generic 1, so a caller can
// tell, for example, a run that ended unsuccessfully from a client failure.
type StatusError struct {
Code int
Message string
}
func (e *StatusError) Error() string { return e.Message }
// WaitRunsUnsuccessful is the `pipelines wait` / `run --wait` exit status when
// every wait completed but at least one run ended failed, canceled or
// interrupted. Client failures (unknown run, connection, wait limit) exit 1.
const WaitRunsUnsuccessful = 2