AgentConnect
Sessions

Hold this session’s sandbox while its page is open

Renews an open console page’s lease on the agent’s sandbox pod, so the idle sweep does not suspend work the page is watching. The DAEMON decides whether to hold, from facts the console cannot assert: uncommitted files in this session’s worktree, or an armed merge-when-ready watcher — which for a cluster agent is a process inside the pod it was armed in, so a suspend would silently disarm it. The answer says which reasons applied and for how long the hold stands; the console renews inside that window while its document is visible, and the hold lapses within one TTL when the page closes, the tab goes to the background, or the machine sleeps. Nothing is persisted, there is nothing to release, and a suspended pod is never woken by this call (asleep: true). placement: daemon means the agent runs no sandbox at all, which is an answer rather than an error. 404 mirrors the session reads; 409 when no daemon serves the agent or it is too old to hold a lease; 402 (ORG_SUSPENDED, the key server’s message) for a managed pool agent when the organization may not run Cloud compute; 503 when its daemon is unreachable, or a pool agent’s organization standing cannot be confirmed (ORG_STANDING_UNAVAILABLE).

POST
/v1/orgs/{orgId}/sessions/{id}/sandbox-keep-alive

授权

bearerAuth
授权Bearer <token>

位置: header

路径参数

orgId*string
id*string

响应主体

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/orgs/string/sessions/string/sandbox-keep-alive"
{  "held": true,  "reasons": [    "uncommitted-files"  ],  "ttlMs": 1,  "placement": "sandbox",  "asleep": true}