Claude Dynamic Workflows, but for OpenCode. Install once, use inside OpenCode forever.
oc-dw brings multi-agent workflow orchestration directly into OpenCode. No separate CLI to run, no servers to manage, no dashboard to open. Just tell OpenCode what you want done and it plans, fans out, verifies, and synthesizes — exactly like Claude Code's built-in dynamic workflows.
npm i -g oc-dwOne command wires everything into OpenCode:
oc-dw setupThis does three things automatically:
- Adds
"oc-dw"to youropencode.jsonplugin list - Installs the
/workflowcustom command - Installs the
/ultraworkcustom command
Restart OpenCode. Done.
Inside OpenCode, just ask:
/workflow Refactor the auth layer to use JWT tokens instead of sessions
Or for fire-and-forget mode that runs until completion:
/ultrawork Add comprehensive test coverage for the payment module
That's it. The agent calls dynamic_workflow_run behind the scenes, which:
- Plans — Generates phases, tasks, dependencies, and model routing
- Fans out — Spawns isolated worker sessions with scoped prompts
- Verifies — Independent verifiers check results against acceptance criteria
- Synthesizes — Merges all outputs into a final report
- Checkpoints — File-backed state so workflows are resumable
Artifacts are stored under .opencode/dynamic-workflows/runs/<workflow-id>/.
| Feature | What it means |
|---|---|
| Planning | LLM generates a structured plan with phases, tasks, dependencies, model roles, and quality gates |
| DAG execution | Tasks run in dependency order with bounded concurrency |
| Multi-round verification | Independent verifier agents check every result |
| Adversarial review | Critic and adversary agents debate results with convergence detection |
| Skill constraints | Apply reusable rules like test-driven, security-first, strict-types to all workers |
| Templates | Built-in templates for deep-research, codebase-audit, large-migration, test-generation, documentation-update |
| Resumable | File-backed checkpoints keep state across restarts |
| Model-agnostic | Route any role to any OpenCode provider/model |
The agent picks defaults automatically, but you can be explicit:
Run a dynamic workflow with:
- template: deep-research
- skill: security-first
- skill: test-driven
- adversarial_review: true
- effort: ultra
- stopping_condition: "All findings are cross-referenced with source code and documented in FINDINGS.md"
Available templates:
deep-research— Multi-angle investigation with cross-checkingcodebase-audit— Systematic security/quality auditlarge-migration— Framework/language migration with parity verificationtest-generation— Comprehensive test generation with edge casesdocumentation-update— Doc update/generation for a codebase
Available skills:
no-casts— Prohibit type assertions oranytest-driven— Require tests for every changeminimal-diff— Smallest possible changestrict-types— Enforce TypeScript strict modesecurity-first— Evaluate all changes for securityperformance-aware— Consider complexity and I/O efficiencydocs-required— Document all public APIsbackward-compat— Maintain backward compatibility
- Planner — Uses structured output to create the workflow plan
- Workers — Each task runs in an isolated OpenCode session with scoped context
- Verifiers — Independent agents check against acceptance criteria
- Adversaries — Cross-check findings with convergence detection
- Synthesizer — Chunks and merges results into a final report
- State store — File-backed for resumability and inspection
npm install
npm run typecheck
npm run build
npm testMIT