API ReferenceAgent sessions
Recover an agent session
Resume a saved managed Claude or Codex conversation, or a registered native Codex session. Requires agent_session.send and the original running sandbox with saved history. Already-ready sessions are unchanged; known live previous processes prevent restart. Queued work is never replayed; interrupted turns have uncertain prior effects. Native Claude attachment is not supported.
Authorization
bearerAuth AuthorizationBearer <token>
A RemoteHost API key (rh_sk_...) or a user session token.
In: header
Path Parameters
sessionId*string
Format
uuidResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/agent-sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08/recover"{ "id": "string", "sessionId": "string", "projectId": "string", "sandboxId": "string", "agent": "string", "agentLabel": "string", "communication": { "status": "ready", "capabilities": [ "messages" ], "message": "string", "requirements": [ { "code": "string", "action": "restart", "message": "string" } ] }, "requirements": [ { "code": "string", "action": "restart", "message": "string" } ], "surface": "terminal", "status": "active", "turnId": "string", "turnState": "submitted", "needsYou": true, "waitingOn": "string", "pendingInput": { "requestId": "string", "kind": "string", "summary": "string" }, "error": "string", "bridgeState": "starting", "released": true, "releasing": true, "bridgeEventSeq": 0, "drifted": true, "problems": [ { "seq": 0, "event": "string", "reason": "string" } ]}