Send a message to a session
oc_sendSend follow-up messages, slash commands, or skills to an existing OpenCode session and wait for the answer, or start the task in the background.
Instructions
Send a follow-up message (or a slash command, or skills) to an existing OpenCode session, then wait for the answer.
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": {
"session_id": "<session_id>",
"message": "<message>"
},
"name": "oc_send"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wait | No | true (default): wait for the end and return the result. false: start in the background and return the session_id. | |
| agent | No | Primary OpenCode agent (build, plan, general, or a custom agent). See oc_catalog what=agents. | |
| files | No | File paths (or URIs) to attach to the message. | |
| model | No | Model: "provider/model", "provider/model#variant" (e.g. "opencode/claude-sonnet-5-5#high") or just an id/name ("deepseek-v4.1-flash-free"). Empty = OpenCode's default model. | |
| agents | No | Sub-agents to mention (@agent) in the message. | |
| detail | No | final = answer only; summary (default) = answer + tools + files; full = complete transcript of the turn. | |
| skills | No | Ids of OpenCode skills to attach to the message (see oc_catalog what=skills). | |
| command | No | OpenCode slash command to run instead of a free prompt (e.g. "review", "init"). `task` then becomes its arguments. | |
| message | Yes | Message text (or the command's arguments). | |
| delivery | No | If the session is already running: steer = inject now, queue = after the current turn. | |
| timeout_s | No | Max wait in seconds (default 900). Past it, the task keeps running and oc_wait picks it up. | |
| session_id | Yes |