Cereal docs
Build a research agent

Recover and debug

Check browser reconnection, token renewal, and stopped turns before deployment.

Use the same research application.

ExerciseExpected observationWhere to investigate
Disconnect the browser network during a reply, then reconnectThe subscriber reconnects and durable messages appear onceBrowser network panel and session events
Refresh after a completed responseThe same session's conversation is rebuiltMember-scoped session ID in browser storage
Leave chat open past the token's five-minute lifetimeThe browser requests a new token from your application/api/sessions/:id/token and its no-store response
Ask to read an unknown source IDThe tool returns found: false; it does not invent a sourceread_source result in Trace
Click an approval already answered elsewhereThe UI reports the conflict and refreshes pending decisionsDecision endpoint's 409 response
Stop the local application and ask for a tool in the consoleThe tool cannot be served until you restart the appConnection status and session trace

An idle status alone does not mean success. Inspect stopReason: a completed answer, an approval wait, and an error all need different UI behavior. The terminal quickstart checks that the turn stopped with completed; the browser displays the actual reason.

The browser helper retries stream transport failures. That does not automatically retry your application's message writes. The starter retains a request ID after a failed send so retrying unchanged text can reuse it. A new page load does not retain that in-flight request; production apps can persist pending writes if they need that guarantee.

Read traces, delivery modes, and troubleshooting for the underlying contracts.

Next: deploy the application.