fix: exit codes match spec (0, 1, 2, 127) and silence usage on runtime errors

Exit 2 for missing required arguments, exit 127 for agent not found. SilenceUsage on all commands to avoid dumping usage on runtime errors.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-05 18:40:50 -04:00
parent 8e930c6b7a
commit 57f345ae2b
7 changed files with 35 additions and 18 deletions
+3 -2
View File
@@ -13,8 +13,9 @@ var newCmd = &cobra.Command{
Use: "new [title]",
Short: "Create a new task workspace and launch the agent",
Long: "Create a new task workspace and launch the agent. If title is omitted, generates task-HHMMSS.",
Args: cobra.MaximumNArgs(1),
RunE: runNew,
Args: cobra.MaximumNArgs(1),
SilenceUsage: true,
RunE: runNew,
}
var (