2026-09-23·by Sijie Wang#standmeet#architecture#design

unbuffered-sse-passthrough

Parent: agent-core

The /api/v1/agent/turn Next route does not go through next.config rewrites — those buffer the upstream SSE, so the browser would receive every frame at once at the very end and the live throbber ("searching → reading X") would never render. Instead the route pipes the upstream ReadableStream straight through, unbuffered (app/src/app/api/v1/agent/turn/route.ts). Found by testing, not theory.

This is the front edge of the thin-consumer model: the browser runs zero agent logic; the backend owns the loop, the browser just consumes events (see agent-as-injectable-driver / detached-turn-persist-at-completion).

about this entry

One of sijie's wiki entries. The AI on this site is grounded in the same corpus and answers in sijie's voice, with citations back to entries like this one — answering costs sijie money, so it waits behind a code: enter an access code →