Rensei docs
API ReferenceWorker Protocol

Generate and store a recovery packet for a crashed session

Generates a tiered recovery packet from the provided crash context and persists it to the database. Used by the dashboard when a session enters a failed state to capture enough context for resumption. Auth: WorkOS session cookie (`getUser()`). Dashboard/browser only.

POST
/api/sessions/{id}/recovery-packet

Authorization

cookieAuth
wos-session<token>

WorkOS AuthKit session cookie. Required by browser-facing dashboard routes (recovery-packet, recovery-chain). Not usable from CLI or programmatic callers without an active WorkOS browser session.

In: cookie

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/sessions/string/recovery-packet" \  -H "Content-Type: application/json" \  -d '{    "agentId": "string"  }'
{}
{
  "error": "Session not found"
}
{
  "error": "Session not found"
}
{
  "error": "Session not found"
}