opencode_message_send_async
Send a prompt to an OpenCode session asynchronously and get its messageId, then use that ID with opencode_wait to observe the turn's result.
Instructions
Send a prompt asynchronously and return its messageId. Pass sessionId and messageId to opencode_wait to observe this exact turn.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The text message to send | |
| agent | No | Agent to use | |
| format | No | Response format: plain text or JSON constrained by a JSON Schema. JSON Schema requires OpenCode permission for the StructuredOutput tool. | |
| modelID | No | Model ID (e.g. 'claude-3-5-sonnet-20241022') | |
| variant | No | Model variant (e.g. 'fast', 'smart') | |
| directory | No | Absolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory. | |
| sessionId | Yes | Session ID | |
| providerID | No | Provider ID (e.g. 'anthropic') |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| text | Yes | ||
| isError | Yes |