Resume Team Run Stream
Team storage and identity
Use the database-backed example Team server. Keep the Team run's returned run_id and session_id; a nested member run is not interchangeable with the Team run. Stored run, checkpoint and session operations require the configured database.
JWT user isolation is opt-in; non-admin service-account PAT callers always self-scope. Scoped callers need their own matching Team session and run, while configured resource authorization also applies. Run and checkpoint lookups return 404 for inaccessible or mismatched records. For factories, retain any factory_input needed by endpoints that reconstruct the Team.
Resume delivery
Reconnect to a background streaming run with the original session and the last event_index actually received:
RUN_ID="returned-run-id"
SESSION_ID="returned-session-id"
curl --fail-with-body --no-buffer \
"http://127.0.0.1:7777/teams/reference-team/runs/$RUN_ID/resume" \
-H "Authorization: Bearer $OS_SECURITY_KEY" \
-F "session_id=$SESSION_ID" -F 'last_event_index=7'Replace 7 with the last observed index, or omit it to request all available events. An index is not a count. Scoped callers require session_id; supplying it also enables database fallback. Factories and remote Teams do not support resumption (400).
The default live buffer is process-local. Multiple replicas need a shared event stream for live reconnection. Fallback replays saved events only; the example server enables event storage. A run with no stored events returns replay metadata rather than reconstructed output. HTTP 200 can contain an SSE error frame.
Resuming delivery does not restart a run or resolve human review. Use Continue Team Run for decisions, and poll non-streaming background runs for their output.
/teams/{team_id}/runs/{run_id}/resumeResume an SSE stream for a team run after disconnection.
Sends missed events since last_event_index, then continues streaming live events if the run is still active.
Three reconnection paths:
- Run still active: Sends catch-up events + continues live streaming
- Run completed (in buffer): Replays missed buffered events
- Run completed (in database): Replays events from database
Client usage:
Track event_index from each SSE event. On reconnection, pass the last received event_index as last_event_index.
Authorization
HTTPBearer In: header
Path Parameters
Request Body
application/x-www-form-urlencoded
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl --request POST 'https://example.com/teams/string/runs/string/resume'null{ "detail": "string", "error_id": "string", "error_type": "string"}{ "detail": "string", "error_id": "string", "error_type": "string"}{ "detail": "string", "error_id": "string", "error_type": "string"}{ "detail": "string"}{ "detail": "string", "error_id": "string", "error_type": "string"}