OpenCode Sessions
opencode_sessionsInspect and interact with opencode sessions: list, get, transcript, send, diff, grep, export, share, unshare, rename, or delete.
Instructions
Inspect and interact with opencode sessions: list, get, transcript, send, diff, grep, export, share, unshare, rename, or delete.
Return Format
{"success": bool, "message": str, "data": dict}
Examples
opencode_sessions(action="list", limit=50) opencode_sessions(action="messages", session_id="sess_01", limit=100) opencode_sessions(action="send", session_id="sess_01", message="continue") opencode_sessions(action="share", session_id="sess_01") opencode_sessions(action="unshare", session_id="sess_01") opencode_sessions(action="rename", session_id="sess_01", title="Refactor auth module") opencode_sessions(action="delete", session_id="sess_01", confirm=True)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Page size (list/messages) | |
| query | No | Search query (required for grep) | |
| title | No | New title (required for rename) | |
| action | Yes | list: all sessions. get: one session. messages: transcript. send: message a session. diff: files changed. grep: search messages across sessions. export: render session as markdown/html. share: publish an unlisted share page (offline, revocable). unshare: revoke a session's share pages. rename: set title (serve API, live UI). delete: permanently remove (confirm=True). | |
| format | No | Export format: markdown or html (export) | markdown |
| offset | No | Page offset (list) | |
| confirm | No | Must be True to delete (permanent) | |
| message | No | Message text (required for send) | |
| session_id | No | Session ID (required for get/messages/send/diff/export/share/unshare/rename/delete) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| message | Yes | ||
| success | Yes |