Move a session to another version of its agent
Sets the version of its agent a root session runs. The move is recorded at once and takes effect before the session’s next model call, never in the middle of one: a sleeping session stays asleep and adopts the version when it next runs, and a finished session when it is next resumed. Threads adopt after their parent. The response is the representation managedAgentsGetSessionAgentVersion returns, with state pending until the move takes effect; if the version cannot run in this session, state becomes failed and lastFailure says why. Repeating the request while the move is pending, or once the session runs that version, changes nothing; repeating it after the move failed asks again. The later of two different requests wins, and naming the version the session already runs withdraws a pending move. Because a version can grant the session the vaults a new session would receive, the caller needs both managed-agents:create and managed-agents:update. Sessions that are members of another session’s tree, sessions the platform runs itself, evaluations and pull request reviews stay on the version they started with and answer 409 conflict, as does a session that was not started from an agent, and one that is stopping or can no longer continue. A version of another agent answers 404.
Authorizations
A Recursion API key, created in the console under API keys.
Headers
Optional tenant consistency check. When present, it must name the tenant bound to the API key, including when x-organization-id is default.
1Organization in which to act. Required for a tenant-scoped API key. Optional for an organization-scoped key, where it must name that same organization. The value may be an organization id or default.
1Path Parameters
Session id (UUID) as returned by managedAgentsStartSession or managedAgentsListSessions.
Body
The agent version a root session should run.
Version the session should run. It must be a version of the session's own agent. Naming the version the session already runs withdraws a move that is still pending.
Response
The agent version a root session runs, the move waiting to take effect if any, and how far each member of the session tree has followed.
The agent version a root session runs, the move waiting to take effect if any, and how far each member of the session tree has followed.
Version the session is set to run: the pending version while a move is waiting, otherwise the version it runs now.
Version the session runs now.
Why the most recent move was refused, or null. Null while a newer move is pending.
The agent's newest version, or null when the agent has been deleted.
The root session and every open thread of its tree, root first, with how far each has followed the root.
The move waiting to take effect, or null.
current: nothing is waiting. pending: agentVersionId takes effect before the session's next model call. failed: the last move was refused and the session stayed on currentAgentVersionId; lastFailure says why.
current, pending, failed Number of currentAgentVersionId within its agent. Absent when the number can no longer be read.
1 <= x <= 9007199254740991