# SSE stream One POST to `/api/analyze` returns a server-sent event stream. `lib/stream.ts` frames events on the server and parses them in the browser, and also extracts text deltas from an OpenAI-compatible streaming response. Four named stages are reported as they happen: digesting, proposing, judging, writing. The console shows them as `1 of 4 ยท Reading the plan` style pills. A `done` frame re-enables the Analyse button; an `error` frame names the stage it died in, so a rejected plan reads "digesting: ..." rather than failing silently. If the browser disconnects, in-flight model fetches are aborted and the row is stored as `abandoned` or `partial` instead of piling ghost runs onto the analyst endpoint. Related: [[Analysis row lifecycle]], [[Console runner]], [[OpenUI report language]].