Finish agent session
finish_agent_sessionClose this project's active agent session. Save its outcome, decisions, blockers and validation results for the next agent to review.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectId": "<projectId>",
"sessionId": "<sessionId>",
"summary": "<summary>",
"codeChanges": "<codeChanges>",
"expectedVersion": "<expectedVersion>",
"idempotencyKey": "<idempotencyKey>"
},
"name": "finish_agent_session"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| outcome | No | Result of the agent session being closed. | |
| summary | Yes | Concise account of the work or result being recorded. | |
| blockers | No | Unresolved obstacles encountered during the session. | |
| decisions | No | Decisions made during this session to preserve for the next handoff. | |
| projectId | Yes | Owned Brain Scanner project ID from the account's project list; not a local path or repository URL. | |
| sessionId | Yes | ID of this project's active agent session, returned when the session was started. Not needed for read-only calls. | |
| codeChanges | Yes | Required completion declaration. Submit every code file changed during this session with its actual unified diff. Use [] only when no code changed. Do not include secrets or unrelated pre-existing edits. | |
| validations | No | Checks performed during the session and their results. | |
| idempotencyKey | Yes | Caller-generated retry key. Reuse the same key and identical payload only to retry the same mutation; use a new key for a new action. | |
| expectedVersion | Yes | Current version of the target record from its latest read or mutation result. A stale value causes a version conflict; re-read before retrying. |