fix(loops): sandbox live-path — sandbox 0.4.3 (SSE reconnect) + poll session-id + fail-loud infra errors#189
Conversation
…, poll follows assigned session id, surface infra errors The in-box agentic batch path (runLoop -> sandbox -> benchmark) lost its SSE stream on long quiet turns (clone/build/test): the bench resolved @tangle-network/sandbox 0.4.2, which drops the prompt stream without a terminal event on a long tail. 0.4.3's reconnect-backoff survives it — a commit0 in-box rollout streamed >520s with zero drops on 0.4.3. - bench: @tangle-network/sandbox ^0.4.0 -> ^0.4.3 - experiment.ts: surface the underlying iter0 error instead of hiding it behind a generic INFRA-ERROR (a swallowed-error fail-loud gap) - sandbox-lineage poll-mode: follow the session id dispatchPrompt assigned (DispatchedSession.sessionId), not the client-minted one — polling the wrong id 404s the session-events endpoint. Poll-mode still needs a platform session-events endpoint for dispatched sessions; SSE is the working batch path.
|
✅ No Blockers —
|
tangletools
left a comment
There was a problem hiding this comment.
✅ Approved — 1 non-blocking finding — 2b23c33a
Full multi-shot audit completed 4/4 planned shots over 4 changed files. Global verifier still owns final merge decision.
Full immutable report for this review: trace
Summary comment for this run: full summary
tangletools · 2026-06-07T01:09:23Z · immutable trace
What
The in-box agentic batch path (
runLoop→ sandbox → benchmark) was losing its SSE prompt stream on long quiet turns (clone/build/test), surfacing asStream dropped without terminal event→Replay endpoint 404. Root cause: the bench resolved@tangle-network/sandbox0.4.2, which drops the stream on a long tail. 0.4.3's reconnect-backoff survives it.Verified
A
commit0in-box rollout (clone real repo → opencode implements → repo pytest judges) streamed >520s with zero drops on 0.4.3, completed end-to-end, wrote real RunRecords. On 0.4.2 the same path dropped at ~256s.Changes
@tangle-network/sandbox^0.4.0→^0.4.3.experiment.ts: surface the underlyingiter0.error(an[infra-cause]line) instead of hiding every failure behind a genericINFRA-ERRORlabel — a swallowed-error fail-loud gap that cost real debugging time.sandbox-lineage.tspoll-mode: follow the session iddispatchPromptactually assigned (DispatchedSession.sessionId), not the client-minted one. Polling the wrong id 404s the session-events endpoint.Residual (not fixed here)
Poll-mode (
dispatchPrompt+session().result()) is still gated on a platform session-events endpoint for dispatched sessions (result()→_sessionEvents→404 on all SDK versions). SSE is the working batch path; poll-mode remains opt-in and currently unusable until the platform serves events for dispatched sessions.