Move a session to another version of its agent
Sets the version of its agent a root session runs. A move brings the session’s instructions, model and inference settings, tools, MCP servers, skills, integrations, credentials and roster to the new version, tells the agent what changed, and moves an outcome the session inherited from the agent’s default rubric to the new version’s default. Setting replaceActiveOutcome also replaces an active caller-supplied outcome with the target default, including on a session already at that version, preserving its objective, pass limit and grading history. An outcome under evaluation waits; terminal outcomes remain unchanged. Explicit replacement requires a usable target default rubric. 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 managedAgentsGetSessionAgentVersionV2 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
Headers
Path Parameters
Body
The agent version a root session should run.
Explicitly replace an active outcome, including one supplied by a caller, with this version's default rubric while preserving its objective, pass limit and grading history. A grader already in flight finishes first; terminal outcomes are not replaced. Works even when the session already runs agentVersionId.
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.
current: no version move is waiting; a recorded outcome replacement may still wait for the next model operation. 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