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
Agents branch on exit codes and parse stderr to decide whether to retry, escalate, or give up. If our exit codes are "0 or 1" and our error messages are free-text English, agents waste tokens guessing. This bucket defines the contract that everything in agent-mode (#10) hangs off.
Spec
Exit codes (stable contract — bumping them is a breaking change)
Propose the standard sysexits-style range, mapped to our domain:
Motivation
Agents branch on exit codes and parse stderr to decide whether to retry, escalate, or give up. If our exit codes are "0 or 1" and our error messages are free-text English, agents waste tokens guessing. This bucket defines the contract that everything in agent-mode (#10) hangs off.
Spec
Exit codes (stable contract — bumping them is a breaking change)
Propose the standard sysexits-style range, mapped to our domain:
Retry-Afterhint in JSON body)Final mapping TBD; the principle is stable, documented, and finite.
Structured error envelope
When agent-mode (#10) is on, errors go to stderr as a single JSON object:
{ "error": { "code": "AUTH_EXPIRED", "message": "Token expired at 2026-05-28T10:00:00Z", "hint": "Run: dci auth login", "retryable": false, "http_status": 401, "request_id": "abc123" } }Stable
codestrings are the contract;messageis for humans.Idempotency
No interactive prompts in agent mode
Definitive empty states
{"count": 0, "results": []}, exit 0References
Open questions
Acceptance criteria
codestrings){"count":0,"results":[]}and exit 0