OpenCode Workspace
tip
450 GitHub stars — Bundled multi-agent orchestration harness. 16 components, one install, complete control.
Overview
OpenCode Workspace is a complete orchestration harness designed to make complex multi-agent workflows manageable. It bundles 16 components including agent delegation, worktree management, notifications, background agents, context management, and more into a single plug-and-play package.
What's Included
| Component | Purpose |
|---|---|
| Agent Orchestrator | Coordinates task distribution across agents |
| Worktree Manager | Git worktree isolation (standalone or paired with opencode-worktree) |
| Notification System | Event-based desktop and sound notifications |
| Background Agent Runner | Async agent execution with result collection |
| Context Manager | Cross-session context persistance |
| Terminal Manager | Multi-terminal session tracking |
| Session Logger | Full session recording and replay |
| Permission Manager | Granular cross-agent permission controls |
| Health Monitor | Agent performance and error tracking |
| Task Scheduler | Timed and event-triggered task execution |
| Output Collector | Aggregated result collection from parallel agents |
| Conflict Detector | Identifies overlapping file modifications |
| State Manager | Shared state across agent sessions |
| Rate Limiter | Prevents API token exhaustion |
| Recovery Handler | Automatic retry and fallback on agent failure |
| Metrics Exporter | OpenTelemetry-compatible metrics |
When to Use
| Scenario | Benefit |
|---|---|
| Complex multi-agent workflows | Single config manages all agents and their interactions |
| Production deployments | Built-in safety rails and conflict detection |
| Team use | Consistent behavior across multiple developers |
| CI/CD integration | Reproducible agent pipelines |
Installation
- npm
- Local
{
"plugin": ["opencode-workspace"]
}
git clone https://github.com/kdcokenny/opencode-workspace.git ~/.config/opencode/plugins/opencode-workspace
Configuration
Base Configuration
{
"plugin": ["opencode-workspace"],
"opencode-workspace": {
"orchestrator": {
"max_concurrent_agents": 3,
"timeout": 300000
},
"notifications": {
"enabled": true,
"sounds": false
},
"worktree": {
"enabled": true,
"cleanup_on_exit": true
}
}
}
Agent Configuration
{
"agent": {
"worker-1": {
"description": "Primary implementation agent",
"mode": "subagent",
"permission": {
"edit": "allow",
"bash": "allow"
}
},
"worker-2": {
"description": "Secondary review agent",
"mode": "subagent",
"permission": {
"edit": "deny",
"read": "allow"
}
}
}
}
Usage
Deploy a Multi-Agent Workflow
The orchestrator distributes tasks across configured agents:
/deploy-workflow implement and review the new authentication module
The orchestrator breaks this into subtasks, assigns them to available agents, monitors progress, and collects results.
Monitor Agent Health
/workspace status
Shows all active agents, their current tasks, resource usage, and status.
Best Practices
Start Small
- Begin with the core orchestrator and add components gradually.
- Each enabled component adds to the agent's context and tool surface.
Configure Timeouts
- Set reasonable timeouts for agent tasks to prevent runaway execution.
- Use the recovery handler to define fallback behavior on failure.
Cross-Agent Conflict Prevention
- Enable the Conflict Detector when multiple agents modify the same files.
- Use worktree isolation for agents that need full write access.
GitHub
- Repo: kdcokenny/opencode-workspace
- npm:
opencode-workspace - Topics:
multi-agent,orchestration,harness,bundle - Category: Agent Workflow / Orchestration