convert_session
Converts coding agent sessions between Claude Code, Codex CLI, and OpenCode. Reads a session, transforms messages to the target format, and writes to the target harness's native storage.
Instructions
Convert a session from one harness to another. Reads the session, transforms messages to the target format, and writes it to the target harness's native storage. OpenCode conversion (read/write) is uniquely supported — no other tool does this.
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>",
"from": "<from>",
"to": "<to>"
},
"name": "convert_session"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Target harness | |
| from | Yes | Source harness | |
| sessionId | Yes | Session ID to convert | |
| projectPath | No | For OpenCode target: explicitly use this project-local .opencode/opencode.db; omitted uses the current global OpenCode database | |
| searchPaths | No | For OpenCode source: paths to search for databases |