Skip to main content

Sandbox runtime

Called by the runtime inside a task's sandbox with its run token, which only the gateway issues: the runtime link, model and decision-engine relays, connectors, channels and agent teams seen from a run. Scripts and other systems do not call these; they are listed so the reference is complete.

OperationMethod and path
Forward an authenticated model requestPOST /relay/r/{route}/chat/completions
Forward an authenticated model requestPOST /relay/r/{route}/responses
Forward an authenticated model requestPOST /relay/r/{route}/messages
Forward an authenticated model requestGET /relay/r/{route}/models
Relay one decision/v1 consultation to the conversation's decision enginePOST /relay/d/{engine}/v1/{point}
Register a runtime WebSocketGET /runtime/link
Page stored frames for the authenticated runtime conversationGET /runtime/history
Open a connector session's server streamGET /mcp/{connector}
Call a connector's MCP serverPOST /mcp/{connector}
End a connector sessionDELETE /mcp/{connector}
A run's channelsGET /runtime/channels
Read a channel from a runGET /runtime/channels/{id}/messages
Post to a channel from a runPOST /runtime/channels/{id}/messages
Claim a task from a runPOST /runtime/channels/{id}/tasks/{seq}/claim
Read an agent team's messages from a runGET /runtime/teams/messages
Post to an agent team from a runPOST /runtime/teams/messages
Start an agent-team member from a runPOST /runtime/teams/members
Which agent-team tools a run getsGET /runtime/teams/role
The lead ends its agent team's work (done)POST /runtime/teams/done
The acceptance check the lead's done runs firstGET /runtime/teams/acceptance
The lead stops one of its helpers (stop_member)POST /runtime/teams/members/{name}/stop
The lead reads one helper's transcript (read_helper)GET /runtime/teams/members/{name}/transcript
Place a helper's report files in the lead's uploadsPOST /runtime/teams/files
The sandbox's screen bridge (WebSocket)GET /runtime/screen

Forward an authenticated model request​

POST /relay/r/{route}/chat/completions

The relay pins the route model, applies route extensions and reasoning policy, and forces streamed usage when configured. Unknown request fields pass through. One usage row is recorded for each forwarded completion, including errors and disconnects.

Sign-in: The run token of a task's sandbox (the runtime only).

Parameters

NameInRequiredTypeDescription
routepathyesstring
X-TQA-Run-IDheaderstring

Request body

application/json: object

Responses

StatusMeaningBody
401Invalid, expired, revoked or wrong-address runtime token
403Route does not belong to the authenticated conversation
404Unsupported route or operation
409team_budget_helpers: the task helps in an agent team past its helpers' share of the budget (GW-I-304); its lead goes on. team_budget: the task leads or helps in an agent team whose token budget or deadline is spent (or that stops for either); team_stopped: the task helps in an agent team that is stopping for another reason (its lead's own calls pass, to finish its answer). Nothing was sent; final, never retried (ADR-0034 point 8).Error
413Request exceeds the configured 16 MiB maximum
429The caller's per-user request bucket is exhausted, or the model route's limiter could not admit the request within relay.queue_wait or relay.queue_max (LLM-U-012). The model is not contacted.
502Upstream transport unavailable
503Credential or database unavailable
504Request header deadline exceeded
defaultUpstream status, content type and body bytes are preserved, including error responses and incomplete streams.

Forward an authenticated model request​

POST /relay/r/{route}/responses

The Responses-protocol path of a Responses route; a route of another protocol has no such path (404). The relay pins the route model, forces streaming and store: false, applies route extensions and the reasoning effort policy, and reports usage from the terminal event. Unknown request fields pass through. One usage row is recorded for each forwarded completion, including errors and disconnects.

Sign-in: The run token of a task's sandbox (the runtime only).

Parameters

NameInRequiredTypeDescription
routepathyesstring
X-TQA-Run-IDheaderstring

Request body

application/json: object

Responses

StatusMeaningBody
401Invalid, expired, revoked or wrong-address runtime token
403Route does not belong to the authenticated conversation
404Unsupported route or operation
409team_budget_helpers: the task helps in an agent team past its helpers' share of the budget (GW-I-304); its lead goes on. team_budget: the task leads or helps in an agent team whose token budget or deadline is spent (or that stops for either); team_stopped: the task helps in an agent team that is stopping for another reason (its lead's own calls pass, to finish its answer). Nothing was sent; final, never retried (ADR-0034 point 8).Error
413Request exceeds the configured 16 MiB maximum
429The caller's per-user request bucket is exhausted, or the model route's limiter could not admit the request within relay.queue_wait or relay.queue_max (LLM-U-012). The model is not contacted.
502Upstream transport unavailable
503Credential or database unavailable
504Request header deadline exceeded
defaultUpstream status, content type and body bytes are preserved, including error responses and incomplete streams.

Forward an authenticated model request​

POST /relay/r/{route}/messages

The Messages-protocol path of a Messages route; a route of another protocol has no such path (404). The relay pins the route model, forces streaming, applies route extensions, accepts thinking only with a budget the route maps, and sends the pinned protocol version header upstream. Thinking blocks, signatures and cache markers pass through unchanged, and usage split across the stream's events is combined. One usage row is recorded for each forwarded completion, including errors and disconnects.

Sign-in: The run token of a task's sandbox (the runtime only).

Parameters

NameInRequiredTypeDescription
routepathyesstring
X-TQA-Run-IDheaderstring

Request body

application/json: object

Responses

StatusMeaningBody
400Thinking that the route does not map, or another route policy violation; nothing is forwarded
401Invalid, expired, revoked or wrong-address runtime token
403Route does not belong to the authenticated conversation
404Unsupported route or operation
409team_budget_helpers: the task helps in an agent team past its helpers' share of the budget (GW-I-304); its lead goes on. team_budget: the task leads or helps in an agent team whose token budget or deadline is spent (or that stops for either); team_stopped: the task helps in an agent team that is stopping for another reason (its lead's own calls pass, to finish its answer). Nothing was sent; final, never retried (ADR-0034 point 8).Error
413Request exceeds the configured 16 MiB maximum
429The caller's per-user request bucket is exhausted, or the model route's limiter could not admit the request within relay.queue_wait or relay.queue_max (LLM-U-012). The model is not contacted.
502Upstream transport unavailable
503Credential or database unavailable
504Request header deadline exceeded
defaultUpstream status, content type and body bytes are preserved, including error responses and incomplete streams.

Forward an authenticated model request​

GET /relay/r/{route}/models

Model discovery shares the per-user request bucket and peer-address authentication. It does not create a usage row.

Sign-in: The run token of a task's sandbox (the runtime only).

Parameters

NameInRequiredTypeDescription
routepathyesstring

Responses

StatusMeaningBody
401Invalid, expired, revoked or wrong-address runtime token
403Route does not belong to the authenticated conversation
404Unsupported route or operation
409team_budget_helpers: the task helps in an agent team past its helpers' share of the budget (GW-I-304); its lead goes on. team_budget: the task leads or helps in an agent team whose token budget or deadline is spent (or that stops for either); team_stopped: the task helps in an agent team that is stopping for another reason (its lead's own calls pass, to finish its answer). Nothing was sent; final, never retried (ADR-0034 point 8).Error
413Request exceeds the configured 16 MiB maximum
429Per-user request bucket exhausted
502Upstream transport unavailable
503Credential or database unavailable
504Request header deadline exceeded
defaultUpstream status, content type and body bytes are preserved, including error responses and incomplete streams.

Relay one decision/v1 consultation to the conversation's decision engine​

POST /relay/d/{engine}/v1/{point}

Called by the runtime with its token (ADR-0013 point 6). The gateway adds the engine's credential from the secret store; the runtime never holds it. Each consultation shares the per-user request bucket and records a usage row under decision:<engine>.

Sign-in: The run token of a task's sandbox (the runtime only).

Parameters

NameInRequiredTypeDescription
enginepathyesstring
pointpathyes"before_step", "after_response"

Request body

application/json: object

Responses

StatusMeaningBody
200The engine's answer, at most 64 KiB, with only its content type
400Not a decision/v1 request, a point that differs from the path, or history the engine's exposure excludes
401Invalid, expired, revoked or wrong-address runtime token
403The conversation's profile does not name this engine
404Unknown or disabled engine, or an unknown point, or a point the engine's kind doesn't answer (a typed-question engine answers before_step only)
409decision_engine_budget_spent: the engine's budget for its period is spent; nothing was sent, and the task's owner is told once; or team_budget: the task leads or helps in an agent team whose token budget or deadline is spent (or that stops for either); team_stopped: the task helps in an agent team that is stopping for another reason (its lead's own calls pass, to finish its answer). Nothing was sent; final, never retried (ADR-0034 point 8).Error
413Request over 64 KiB
429Per-user request bucket exhausted
502upstream_unavailable: the engine failed, refused its key, or its answer was too large; decision_engine_invalid: a typed-question engine's answer wasn't a usable choice, its service refused the question as invalid, or the question's state was over 16 KiB (never sent)
503The engine's credential or the database is unavailable
504The engine did not answer within its timeout_ms

Register a runtime WebSocket​

GET /runtime/link

WebSocket upgrade. ServerFrame JSON from the runtime, ClientFrame JSON toward it. Runtime tokens identify one sandbox instance and never appear in URLs. Supervisor heartbeat frames update liveness only; they are never stored or streamed. A second link replaces the first with restarting. Ping every 30 seconds, pong deadline 90 seconds. Frames are capped at 256 KiB inside the outer 16 MiB transport limit. The first outbound frame is session.config with the last stored sequence and an explicit secret-free route projection, followed by queued actions. Reserved bootstrap tokens refuse authentication until binding completes; the runtime redials with backoff and the same token file.

Sign-in: The run token of a task's sandbox (the runtime only).

Responses

StatusMeaningBody
101WebSocket established
400Invalid request or unsupported protocolError
401Authentication requiredError
403Origin, ownership or role deniedError
404Record not foundError
409Bootstrap closed, idempotency route conflict or deleted conversationError
413Request body limit exceededError
426The runtime's protocol revision (the TQA-Protocol-Revision header; absent means 1) is below the gateway's floor. The error names the needed and the presented revision (needs, has); nothing is exchanged, and the runtime's sandbox is retired without a replacement (ADR-0026).
429Rate or capacity limit reachedError
503Database unavailable or gateway restartingError
504I/O deadline exceededError

Page stored frames for the authenticated runtime conversation​

GET /runtime/history

Conversation and sandbox come only from the token and transport address; forwarded headers cannot change the binding.

Sign-in: The run token of a task's sandbox (the runtime only).

Parameters

NameInRequiredTypeDescription
afterqueryinteger 0 or more
limitqueryinteger 1–1000

Responses

StatusMeaningBody
200Stored frames strictly after the cursor, ordered by sequenceobject
400Invalid or unknown paging parameter
401Missing, reserved, expired, revoked or wrong-address runtime token
503Store unavailable

Open a connector session's server stream​

GET /mcp/{connector}

The session's server-to-client event stream (ADR-0031), relayed event by event (each at most 1 MiB) and ended after 5 minutes without an event. One stream per session.

Sign-in: The run token of a task's sandbox (the runtime only).

Parameters

NameInRequiredTypeDescription
connectorpathyesstring
Mcp-Session-IdheaderyesstringThe opaque session id the proxy returned; never the remote's.

Responses

StatusMeaningBody
200The event streamstring (text/event-stream)
400No Mcp-Session-IdError
401No live runtime token from its sandbox's addressError
403connector_not_allowedError
404Unknown session: another conversation's or connector's, expired, closed, or opened with another credential; initialise againError
405The remote offers no server stream
409stream_open: this session's stream is already openError
424connector_credential_missingError
502connector_unavailable or connector_redirectError
503Database or secret store unavailableError
504connector_timeoutError

Call a connector's MCP server​

POST /mcp/{connector}

The MCP proxy (ADR-0031), streamable HTTP with JSON answers: one JSON-RPC 2.0 message or a batch of at most 32, at most 1 MiB. Only a runtime token from its own sandbox's address is accepted, and only for a connector in the conversation's connector set. Only initialize, notifications/initialized, ping, tools/list, tools/call and notifications/cancelled pass; anything else, or a tools/call for a tool the connector's filter hides, is answered here with a JSON-RPC error. The proxy injects the user's own credential or the connector's shared one, reaches the remote only at checked addresses without following redirects, and filters tools/list answers. An event-stream answer is relayed event by event (each at most 1 MiB; tools/list results filtered). At most 4 calls from a conversation to a connector, and 256 through the proxy, are in flight (429 connector_busy). The remote's Mcp-Session-Id never reaches the runtime: the proxy returns an opaque id bound to the conversation, the connector and the credential source (at most 8 per conversation, 10 minutes idle). A tools/call the runtime abandons is cancelled at the remote with notifications/cancelled. A connector call that fails reaches the task's transcript as a tool error whose code is one of this proxy's refusals, or the runtime's own: mcp_error (the server answered with a JSON-RPC error), mcp_method_not_found (JSON-RPC -32601) or mcp_server_exited (a tool server stopped during the call).

Sign-in: The run token of a task's sandbox (the runtime only).

Parameters

NameInRequiredTypeDescription
connectorpathyesstring
Mcp-Session-IdheaderstringThe opaque session id the proxy returned on initialize; never the remote's. An unusable one is 404.
MCP-Protocol-Versionheaderstring

Request body

application/json: object or array of object

Responses

StatusMeaningBody
200The remote's JSON-RPC answer, or the proxy's JSON-RPC error for a refused method or toolobject or array of object; string (text/event-stream)
202Notifications accepted
400Not a JSON-RPC 2.0 message or batchError
401No live runtime token from its sandbox's addressError
403connector_not_allowed: unknown, disabled, or not in the conversation's connector setError
404Unknown session: another conversation's or connector's, expired, closed, or opened with another credential; initialise againError
413Larger than 1 MiBError
424connector_credential_missing, or connector_credential_rejected when the remote refuses the person's own credential (401 or 403)Error
429connector_busy: 4 calls from this conversation to this connector, or 256 through the proxy, are in flight; or rate_limited: the conversation owner's mcp.calls_per_minute bucket (one per message forwarded, a minute's worth at most) cannot cover this body. The remote is not contacted.Error
502connector_unavailable, connector_redirect or connector_answer_too_largeError
503Database or secret store unavailableError
504connector_timeoutError

End a connector session​

DELETE /mcp/{connector}

Ends the session at the remote and forgets it; the opaque id is then 404.

Sign-in: The run token of a task's sandbox (the runtime only).

Parameters

NameInRequiredTypeDescription
connectorpathyesstring
Mcp-Session-IdheaderyesstringThe opaque session id the proxy returned; never the remote's.

Responses

StatusMeaningBody
200Ended (the remote's status)
204Ended
400No Mcp-Session-IdError
401No live runtime token from its sandbox's addressError
403connector_not_allowedError
404Unknown session: another conversation's or connector's, expired, closed, or opened with another credential; initialise againError
405The remote does not end sessions this way
424connector_credential_missingError
502connector_unavailable or connector_redirectError
503Database or secret store unavailableError
504connector_timeoutError

A run's channels​

GET /runtime/channels

The channels the run's conversation belongs to (ADR-0014 point 4). A runtime token only, from its sandbox's address; an empty list means the run gets no channel tools.

Sign-in: The run token of a task's sandbox (the runtime only).

Responses

StatusMeaningBody
200Successful operationRuntimeChannels
400Invalid request or unsupported protocolError
401Authentication requiredError
403Origin, ownership or role deniedError
404Record not foundError
409Bootstrap closed, idempotency route conflict or deleted conversationError
413Request body limit exceededError
429Rate or capacity limit reachedError
503Database unavailable or gateway restartingError
504I/O deadline exceededError

Read a channel from a run​

GET /runtime/channels/{id}/messages

As the human read, for a member conversation's run, with wait: a long poll that returns as soon as a matching message is past since (ADR-0014 point 7). 403 not_member otherwise, also when removed during a wait. A runtime token only.

Sign-in: The run token of a task's sandbox (the runtime only).

Parameters

NameInRequiredTypeDescription
idpathyesstring (uuid)
sincequeryinteger 0 or moreMessages with a greater seq; 0 by default.
limitqueryinteger 1–200At most this many; 50 by default.
typesquerystringComma-separated message types.
parentqueryinteger 1 or moreOnly replies to this message.
task_seqqueryinteger 1 or moreOnly this task's message, its claims and reports.
author_kindquery"conversation", "user", "gateway"Only messages by this kind of author.
waitqueryinteger 1–300Wait up to this many seconds for a matching message past since; an empty page when none comes. The sandbox sits idle meanwhile.

Responses

StatusMeaningBody
200Successful operationChannelMessagePage
400Invalid request or unsupported protocolError
401Authentication requiredError
403Origin, ownership or role deniedError
404Record not foundError
409Bootstrap closed, idempotency route conflict or deleted conversationError
413Request body limit exceededError
429Rate or capacity limit reachedError
503Database unavailable or gateway restartingError
504I/O deadline exceededError

Post to a channel from a run​

POST /runtime/channels/{id}/messages

The run posts as its conversation; the author is never taken from the body. 403 not_member, observer or not_claimant; 409 channel_ended. The Idempotency-Key is optional here (the tools send one per call). A runtime token only. A vote must name an open proposal (409 not_a_proposal, proposal_closed); only a person vetoes (403 veto_not_allowed); a vote that decides its proposal is followed by the gateway's decision. 429 channel_rate once the channel has had 5,000 messages in the last 24 hours (ADR-0014), with Retry-After.

Sign-in: The run token of a task's sandbox (the runtime only).

Parameters

NameInRequiredTypeDescription
idpathyesstring (uuid)
Idempotency-KeyheaderstringA retry with the same key returns the first answer; the same key with another body is 422 idempotency_key_reused.

Request body

application/json: ChannelPost

Responses

StatusMeaningBody
201Successful operationChannelMessage
400Invalid request or unsupported protocolError
401Authentication requiredError
403Origin, ownership or role deniedError
404Record not foundError
409Bootstrap closed, idempotency route conflict or deleted conversationError
413Request body limit exceededError
429Rate or capacity limit reached; channel_rate past the channel's daily message limitError
503Database unavailable or gateway restartingError
504I/O deadline exceededError

Claim a task from a run​

POST /runtime/channels/{id}/tasks/{seq}/claim

As the person's claim, for the run's conversation. A runtime token only. 429 channel_rate once the channel has had 5,000 messages in the last 24 hours (ADR-0014), with Retry-After.

Sign-in: The run token of a task's sandbox (the runtime only).

Parameters

NameInRequiredTypeDescription
idpathyesstring (uuid)
seqpathyesinteger 1 or more

Responses

StatusMeaningBody
200The claimant already holds a claim: it is returnedChannelMessage
201Successful operationChannelMessage
400Invalid request or unsupported protocolError
401Authentication requiredError
403Origin, ownership or role deniedError
404Record not foundError
409Bootstrap closed, idempotency route conflict or deleted conversationError
413Request body limit exceededError
429Rate or capacity limit reached; channel_rate past the channel's daily message limitError
503Database unavailable or gateway restartingError
504I/O deadline exceededError

Read an agent team's messages from a run​

GET /runtime/teams/messages

What is addressed to the run's conversation after its last-read seq (ADR-0034, the slice S1 contract). The answer is recorded under the call's Idempotency-Key for the run in X-TQA-Run-ID: a repeat answers the same, and the seq advances only when that call's tool.result is stored. 403 teams_disabled when agent teams are off, not_a_member outside a team. A runtime token only.

Sign-in: The run token of a task's sandbox (the runtime only).

Parameters

NameInRequiredTypeDescription
limitqueryinteger 1–200At most this many; 50 by default.
waitqueryinteger 0–30A long poll of at most this many seconds; 0 by default.
Idempotency-KeyheaderyesstringThe calling tool call's key.
X-TQA-Run-IDheaderyesstringThe calling run.

Responses

StatusMeaningBody
200Successful operationobject
400Invalid request or unsupported protocolError
401Authentication requiredError
403Origin, ownership or role deniedError
404Record not foundError
409Bootstrap closed, idempotency route conflict or deleted conversationError
413Request body limit exceededError
429Rate or capacity limit reachedError
503Database unavailable or gateway restartingError
504I/O deadline exceededError

Post to an agent team from a run​

POST /runtime/teams/messages

A lead's assign, question, decision or person_question, or a member's answer, report or ask, stored with the next seq or refused with a reason (ADR-0034, the slice S1 contract): 403 teams_disabled, not_a_member, not_lead or members_only; 404 unknown_member; 409 team_stopped or member_gone. The Idempotency-Key is required; a retry answers the first seq. A runtime token only.

Sign-in: The run token of a task's sandbox (the runtime only).

Parameters

NameInRequiredTypeDescription
Idempotency-KeyheaderyesstringThe calling tool call's key.
X-TQA-Run-IDheaderyesstringThe calling run.

Request body

application/json: object

Responses

StatusMeaningBody
201Successful operationobject
400Invalid request or unsupported protocolError
401Authentication requiredError
403Origin, ownership or role deniedError
404Record not foundError
409Bootstrap closed, idempotency route conflict or deleted conversationError
413Request body limit exceededError
422Unknown reference: question_seq, decision_seq or report_seq names no message of the right type in this agent teamError
429Rate or capacity limit reachedError
503Database unavailable or gateway restartingError
504I/O deadline exceededError

Start an agent-team member from a run​

POST /runtime/teams/members

start_member (ADR-0034, the slice S1 contract): the run's conversation starts a member, a normal task of the same person with the lead's settings or a profile's narrowed to them, working in its own copy of the lead's workspace or in the lead's own; the agent team is created with the first member, and the brief is stored as an assign to the member. 201 with the member, the brief's seq and lead_tools. 400 naming the field; 403 teams_disabled or not_lead; 409 profile_unusable, team_stopped or member_limit (details: limit, by); 422 unknown_reference (profile). The Idempotency-Key is required; a retry answers as the first did. A runtime token only.

Sign-in: The run token of a task's sandbox (the runtime only).

Parameters

NameInRequiredTypeDescription
Idempotency-KeyheaderyesstringThe calling tool call's key.
X-TQA-Run-IDheaderyesstringThe calling run.

Request body

application/json: object

Responses

StatusMeaningBody
201Successful operationobject
400Invalid request or unsupported protocolError
401Authentication requiredError
403Origin, ownership or role deniedError
409Bootstrap closed, idempotency route conflict or deleted conversationError
413Request body limit exceededError
422Unknown reference or idempotency key reusedError
429Rate or capacity limit reachedError
503Database unavailable or gateway restartingError
504I/O deadline exceededError

Which agent-team tools a run gets​

GET /runtime/teams/role

The run's role at run start (ADR-0034, slice 3): member (its two tools), lead (the ten), may_lead (a task in no team: start_member alone) or none (agent teams are off, or the conversation was ever a member, which never leads). A runtime token only.

Sign-in: The run token of a task's sandbox (the runtime only).

Responses

StatusMeaningBody
200The roleobject
401Authentication requiredError
503Database unavailable or gateway restartingError

The lead ends its agent team's work (done)​

POST /runtime/teams/done

When the administrator set an acceptance check, the lead's runtime runs it first in the lead's workspace (at most 10 minutes) and sends its report as check; done is refused acceptance_failed unless the report is for the check set now and it exited 0, and nothing is stored. Otherwise stores the summary as a done message to every member and sets the team stopping; the stop carries it out and posts the end note to the lead. A repeat with the same key answers the same.

Sign-in: The run token of a task's sandbox (the runtime only).

Parameters

NameInRequiredTypeDescription
Idempotency-KeyheaderyesstringThe calling tool call's key.
X-TQA-Run-IDheaderyesstringThe calling run.

Request body

application/json: object

Responses

StatusMeaningBody
200The team is stoppingobject
400Invalid request or unsupported protocolError
401Authentication requiredError
403Origin, ownership or role deniedError
409Bootstrap closed, idempotency route conflict or deleted conversation; team_stopped, team_ended or not_current_run; acceptance_failed: the check didn't run (an older runtime), ran another command, or failed, the last with details {exit_code, timed_out, output} (the output's last 4,096 bytes)Error
413Request body limit exceededError
422Idempotency key reused with another summary or check commandError
429Rate or capacity limit reachedError
503Database unavailable or gateway restartingError
504I/O deadline exceededError

The acceptance check the lead's done runs first​

GET /runtime/teams/acceptance

The administrator's acceptance check (ADR-0034 point 10), read fresh: the lead's runtime runs it in the lead's workspace before done and sends its report with done. The lead only; a runtime token only.

Sign-in: The run token of a task's sandbox (the runtime only).

Responses

StatusMeaningBody
200The checkobject
401Authentication requiredError
403teams_disabled, not_a_member or not_leadError
503Database unavailable or gateway restartingError
504I/O deadline exceededError

The lead stops one of its helpers (stop_member)​

POST /runtime/teams/members/{name}/stop

Stops the helper and posts a member_stopped notice to the lead, then cancels its active run and drops a queued wake. Stopping a stopped helper answers the same.

Sign-in: The run token of a task's sandbox (the runtime only).

Parameters

NameInRequiredTypeDescription
namepathyesstringThe helper's name in the team.
Idempotency-KeyheaderyesstringThe calling tool call's key.
X-TQA-Run-IDheaderyesstringThe calling run.

Request body

application/json: object

Responses

StatusMeaningBody
200The helper is stoppedobject
400Invalid request or unsupported protocolError
401Authentication requiredError
403Origin, ownership or role deniedError
404Record not foundError
409Bootstrap closed, idempotency route conflict or deleted conversationError
413Request body limit exceededError
429Rate or capacity limit reachedError
503Database unavailable or gateway restartingError
504I/O deadline exceededError

The lead reads one helper's transcript (read_helper)​

GET /runtime/teams/members/{name}/transcript

Where the helper is now (now), then its messages, text, tool calls and tool results after the event since, in order; read-only.

Sign-in: The run token of a task's sandbox (the runtime only).

Parameters

NameInRequiredTypeDescription
namepathyesstringThe helper's name in the team.
sincequeryinteger 0 or more
limitqueryinteger 1–200
X-TQA-Run-IDheaderyesstringThe calling run.

Responses

StatusMeaningBody
200A page of the helper's transcriptobject
400Invalid request or unsupported protocolError
401Authentication requiredError
403Origin, ownership or role deniedError
404Record not foundError
409Bootstrap closed, idempotency route conflict or deleted conversationError
503Database unavailable or gateway restartingError
504I/O deadline exceededError

Place a helper's report files in the lead's uploads​

POST /runtime/teams/files

take_files (ADR-0034 point 6): the lead places a report's files, all of them or those named by their paths in the report, in its own uploads/ exactly as a person's attachments go there, each named <member>-<path> with / as -, sanitised; a name already taken gets the next free one, so nothing is overwritten. 200 with each file's report path, workspace path and size. Taking a file again places another copy; files placed before a failure stay. 400 invalid_request (the files rule, or X-TQA-Run-ID missing or malformed), or path_invalid naming the file; 403 teams_disabled, not_a_member or not_lead; 404 not_found naming the file (not in that report, or its member task deleted); 409 team_stopped, not_current_run, uploads_full or files_unavailable (the lead's workspace can't be written now), a file's naming it; 413 upload_too_large naming the file; 422 unknown_reference (report_seq). A file's refusal has details: {path}. The Idempotency-Key is required; a retry answers as the first did. A runtime token only.

Sign-in: The run token of a task's sandbox (the runtime only).

Parameters

NameInRequiredTypeDescription
Idempotency-KeyheaderyesstringThe calling tool call's key.
X-TQA-Run-IDheaderyesstringThe calling run.

Request body

application/json: object

Responses

StatusMeaningBody
200Successful operationobject
400Invalid request or unsupported protocolError
401Authentication requiredError
403Origin, ownership or role deniedError
404A named file not in that report, or no longer storedError
409Team stopped, uploads full or the workspace unavailableError
413Request body or file size limit exceededError
422Unknown reference or idempotency key reusedError
429Rate or capacity limit reachedError
503Database unavailable or gateway restartingError
504I/O deadline exceededError

The sandbox's screen bridge (WebSocket)​

GET /runtime/screen

Dialled by the runtime of a desktop session with its runtime token (ADR-0039 section 5), held as a long poll: upgraded for the oldest viewer asking for a bridge, now or within 30 s, else 204 at 30 s and the runtime dials again. One bridge per viewer, at most four: while four are up the dial is refused 409, and the runtime waits for one of its bridges to close. The bridge carries RFB bytes between that viewer and the sandbox's VNC server on loopback.

Sign-in: The run token of a task's sandbox (the runtime only).

Responses

StatusMeaningBody
101Paired with a viewer: the WebSocket bridge
204No viewer asked within 30 s: dial again
401No valid runtime tokenError
403The conversation's environment has no desktopError
409screen_bridges: four bridges are upError
503Database unavailable or gateway restartingError