opencode_start_session
Start a new opencode coding session to obtain a session ID and project directory for subsequent agent messages.
Instructions
Start a new opencode session. Call this before opencode_send_message.
Returns session_id, model, and project_dir. Store session_id — every subsequent call to opencode_send_message requires it.
Use opencode for coding tasks: writing, editing, refactoring, debugging, explaining code. For tasks requiring reasoning or research, prefer gemini_prompt or qwen_prompt instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Model in 'provider/model' format. Call opencode_list_models to see all available models. Defaults to OPENCODE_DEFAULT_MODEL env var if omitted. | |
| project_dir | No | Absolute path to the project directory the agent will work in. Example: 'C:/Users/User/projects/myapp'. Defaults to current working directory if omitted. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||