Compare commits

...
Author SHA1 Message Date
iris
527022c5f2 fix: correct 409 endpoint name — /api/loose-ends not /api/state 2026-07-04 13:52:49 +02:00
iris
8e441ead93 docs(agent-ui): document HTTP error codes for POST endpoints
After the fix in c708f698, POSTs no longer always return 200 — they use
semantic status codes: 400 for bad input, 409 for retryable state
conflicts (turn in flight, hive-c0re busy), 500 only for genuine failures.
Update the preamble to the Per-agent endpoints section to reflect this.
2026-07-04 13:52:49 +02:00

View file

@ -277,9 +277,14 @@ Unknown `/foo` shows an error row instead of being silently sent.
## Per-agent endpoints ## Per-agent endpoints
All POSTs return 200 (no 303 redirects). The matching mutations Successful POSTs return 200 (no 303 redirects). Error responses
fire `LiveEvent` variants on the per-agent bus, so the client use semantic status codes: **400** for missing/invalid input
doesn't refetch `/api/state` on submit — the SSE stream (`body` required, unknown model name, invalid effort level),
**409** for retryable state conflicts (turn in flight when
`/compact` is called, hive-c0re busy on `GET /api/loose-ends`),
**500** only for genuine server/transport failures. The matching
mutations fire `LiveEvent` variants on the per-agent bus, so the
client doesn't refetch `/api/state` on submit — the SSE stream
delivers the new state faster anyway. Only the login flow still delivers the new state faster anyway. Only the login flow still
polls (session output streams in updates that aren't event- polls (session output streams in updates that aren't event-
shaped). shaped).