Skip to main content

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

ComponentPurpose
Agent OrchestratorCoordinates task distribution across agents
Worktree ManagerGit worktree isolation (standalone or paired with opencode-worktree)
Notification SystemEvent-based desktop and sound notifications
Background Agent RunnerAsync agent execution with result collection
Context ManagerCross-session context persistance
Terminal ManagerMulti-terminal session tracking
Session LoggerFull session recording and replay
Permission ManagerGranular cross-agent permission controls
Health MonitorAgent performance and error tracking
Task SchedulerTimed and event-triggered task execution
Output CollectorAggregated result collection from parallel agents
Conflict DetectorIdentifies overlapping file modifications
State ManagerShared state across agent sessions
Rate LimiterPrevents API token exhaustion
Recovery HandlerAutomatic retry and fallback on agent failure
Metrics ExporterOpenTelemetry-compatible metrics

When to Use

ScenarioBenefit
Complex multi-agent workflowsSingle config manages all agents and their interactions
Production deploymentsBuilt-in safety rails and conflict detection
Team useConsistent behavior across multiple developers
CI/CD integrationReproducible agent pipelines

Installation

{
"plugin": ["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