Read session history
opencode_session_historyAudit a session. Default detail='summary' returns only what a caller usually needs: the user prompt, the assistant's answers, token totals and a count of tools used — no tool arguments or outputs.
Instructions
Audit a session. Default detail='summary' returns only what a caller usually needs: the user prompt, the assistant's answers, token totals and a count of tools used — no tool arguments or outputs. detail='tools' adds one line per step (name and status; targets only with includeTargets=true). detail='full' is disabled for security unless the bridge was started with --allow-full-history. The full transcript is never sent by default.
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 | Pagination cursor from a previous call | |
| detail | No | summary (default) | tools | full (admin-only, usually disabled) | |
| format | No | Default json | |
| sessionID | Yes | ||
| includeTargets | No | detail='tools': include a redacted path/command target per step (default false) | |
| includeReasoning | No | Only with admin-enabled detail='full' |