US-3: Error Handling in JSON Mode
Parent Epic: #4 (Event Coverage & Error Handling)
As a pipeline consumer,
I want errors to be structured JSON events,
so that I can handle failures programmatically without parsing terminal logs.
Acceptance Criteria
Technical Notes
- Maps existing print() error handlers to structured JSON events
- Error codes: NO_INPUT, API_ERROR, TOOL_ERROR (future: REPL_INCOMPATIBLE)
- Detail field for additional context (stack trace, status code)
US-3: Error Handling in JSON Mode
Parent Epic: #4 (Event Coverage & Error Handling)
As a pipeline consumer,
I want errors to be structured JSON events,
so that I can handle failures programmatically without parsing terminal logs.
Acceptance Criteria
{"type":"error","data":{"code":"NO_INPUT"}}{"type":"error","data":{"code":"API_ERROR","message":"..."}}{"type":"error","data":{"code":"TOOL_ERROR","message":"...","tool":"read_file"}}Technical Notes