Read session history
opencode_session_historyReads a session's messages and totals to inspect agent activity, audit tool calls, or export transcripts in JSON, markdown, or transcript format.
Instructions
Read a session's messages and totals. Useful for inspecting what an agent did, auditing tool calls, or exporting a transcript to another client.
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": {
"sessionID": "<sessionID>"
},
"name": "opencode_session_history"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Default 100 | |
| order | No | ||
| cursor | No | ||
| format | No | Default json | |
| sessionID | Yes | ||
| includeReasoning | No | Include reasoning blocks (default false) | |
| includeToolCalls | No | Include tool calls in rendered output (default true) |