/v2/agents/sessions/{session_id}PatchSession updates session-scoped settings on an existing session.
Partial update of session-scoped settings (not the agent manifest / config). The body must include at least one recognized patchable property; an empty object {} is 400. Only properties listed on PatchSessionRequest are accepted — any other top-level JSON key is rejected with 400. Omitted properties are left unchanged. Today the only patchable field is resume_on_topoff; more session settings may be added over time. Terminal sessions (DESTROYED, FAILED) cannot be patched.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
PATCH body: allowlisted session-scoped settings. At least one property required.
A 400 is returned: Malformed body, unknown field, or no recognized patchable properties. A 401 is returned: Authentication failed due to invalid credentials. A 403 is returned: Session belongs to another team. A 404 is returned: The resource was not found. A 409 is returned: Session is in a terminal state and cannot be updated. A 423 is returned: This session is unavailable; contact support. A 429 is returned: The API rate limit has been exceeded. A 500 is returned: There was a server error. Any other status is an error: There was an unexpected error.