opencode_parallel
Execute multiple coding tasks simultaneously within a shared workspace, with results saved to a designated file for efficient parallel development workflows.
Instructions
Run multiple opencode tasks in parallel. All tasks share workspace/permission/save_file. Results are appended to save_file with XML wrappers (). Max 100 tasks. Model can be array: single element shared by all, or one per task.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspace | Yes | Project root directory. Boundary for 'workspace-write'. Use absolute paths or relative paths. | |
| permission | No | Security level: 'read-only' (analyze files), 'workspace-write' (modify inside workspace), 'unlimited' (full system access). Default: 'read-only'. | read-only |
| save_file | Yes | PREFERRED when agent needs to write files or produce lengthy output. Output is written directly to this path, avoiding context overflow. This write is permitted even in read-only mode (server-handled). Essential for: code generation, detailed reports, documentation. | |
| report_mode | No | Generate a standalone, document-style report (no chat filler) suitable for sharing. | |
| context_paths | No | List of relevant files/dirs to preload as context hints. | |
| model | No | Model override(s). If single element, all tasks use that model. If multiple elements, must match parallel_prompts length - each task uses corresponding model. Empty array uses CLI default. | |
| file | No | Absolute paths to files to attach to the message. Use for: Source code files, configuration files, documentation. Example: ['/path/to/main.py', '/path/to/config.json'] | |
| agent | No | Agent type to use for the task. Common agents: 'build' (default, general development), 'plan' (planning). Example: 'build' | build |
| parallel_prompts | Yes | Complete prompts for parallel execution. Each spawns an independent subprocess. | |
| parallel_task_notes | Yes | Labels for each task. Length MUST equal parallel_prompts. | |
| parallel_max_concurrency | No | Max concurrent subprocesses. | |
| parallel_fail_fast | No | Stop spawning new tasks when any fails (already running tasks continue). | |
| debug | No | Enable execution stats (tokens, duration) for this call. |