English · 简体中文 · 繁體中文 · العربية · Português (Brasil) · Bosanski · Dansk · Deutsch · Español · Français · Italiano · 日本語 · 한국어 · Norsk · Polski · Русский · ไทย · Türkçe · Українська · Tiếng Việt · Ελληνικά · বাংলা
An enhanced fork of opencode with a production-grade DAG workflow engine for multi-agent orchestration.
Built on top of the MIT-licensed opencode terminal AI agent. Not affiliated with or endorsed by the OpenCode team.
| Branch | Base | Content | Status |
|---|---|---|---|
main |
v1.17.11 | Hooks + Goal + Tools optimization | ✅ Stable |
dag-branch |
main + DAG | DAG workflow engine (114 files) | 🔧 In Development — adapting to v1.17.11 APIs |
Important
The DAG workflow engine is currently being ported from v1.15.10 to the v1.17.11 codebase.
It lives on the dag-branch and is not yet functional. The main branch is fully usable
with Hooks, Goal auto-loop, and Tools exception exposure — all production-ready.
Full Claude Code hooks protocol compatibility: command, mcp, http, prompt, agent hook types with 17 hook events including PreToolUse, PostToolUse, SessionStart, PermissionRequest, WorktreeCreate, and more.
See hooks reference.
An autonomous agent loop that continuously drives an agent toward a user-defined goal. Uses an LLM judge to decide whether the goal is achieved or needs more turns. /goal <target> to set, /subgoal to add sub-goals.
- JSON repair:
safeParseJson+fixJsonUnicodeEscapes— repairs broken multi-byte Unicode escapes in LLM-generated JSON - Question tool validation: structured error formatting with field-level hints and correct-call examples
- Tool descriptions: expanded
.txtdocs forquestion,task,skill,webfetch,websearchwith Parameters + Returns sections - Shell pipe fix:
stdout/stderr: "pipe"on allChildProcess.makecalls + reader fiber grace drain
A directed acyclic graph (DAG) workflow engine that lets LLM agents orchestrate complex multi-node parallel tasks within a single session.
⚠️ Status: Raw-copied from the v1.15.10 fork (114 files). 217 type errors pending API adaptation (syncDatabase.use→ Effect-basedDatabase.Service,Bus→EventV2Bridge, etc.). Not yet compilable.
| Capability | Description |
|---|---|
| Auto-scheduling | Spawns child agents based on dependency order, parallel where possible |
| Dynamic replanning | Add/remove/update nodes and adjust concurrency mid-run |
| State machine integrity | Four iron laws: state machine bypass forbidden, terminal states irreversible, events must broadcast, persist before mutate |
| Terminal TUI | Full DAG control panel with block-char topology map, tree view, node dialogs, real-time updates |
| Crash recovery | Detects and resumes orphaned running workflows on restart |
| Conditional branching | Nodes can conditionally execute or skip based on upstream output |
| Sub-DAG nesting | Worker type dag spawns recursive sub-workflows (max depth 3) |
| Persistent audit | 6-table SQLite schema, all state transitions traceable |
Extensive fixes for Chinese/Japanese/Korean text handling: tokenization, full-width punctuation, file paths, IME input in the terminal UI. See fixes list.
- Sandbox — ephemeral temp dirs with LSP diagnostics for safe code experiments
- Worktree —
git worktreeper-workflow isolation for parallel multi-agent editing
curl -fsSL https://opencode.ai/install | bash
# Package managers
npm i -g opencode-ai@latest
brew install anomalyco/tap/opencode
scoop install opencode
# ...and more — see upstream docsTip
Remove versions older than 0.1.x before installing.
All upstream MIT-licensed capabilities are fully preserved:
- Desktop app (macOS / Windows / Linux) — download from releases
- Build & Plan agents —
Tabto switch between full-access and read-only modes - Multi-provider — Claude, OpenAI, Google, local models via OpenCode Zen
- Built-in LSP — real-time diagnostics from language servers
- Client/server architecture — run locally, drive remotely from mobile
This fork adds the DAG engine, CJK fixes, sandbox coding workspace, and goal tracking on top — without breaking anything.
This repository uses a mixed license model:
| Content | License | Location |
|---|---|---|
| Upstream opencode code (the vast majority) | MIT | LICENSE |
| Self-developed DAG workflow engine | GNU AGPL v3 | packages/opencode/src/dag/LICENSE |
Full boundary details in NOTICE.
⚖️ Why AGPL? The DAG engine is the core differentiated work. AGPL ensures any derivative — including SaaS deployments — must contribute back.
docs/harness-dag.md— DAG engine architecture & usagedocs/localization/zh-hans-fixes.md— CJK fixes catalogueNOTICE— license boundaries & attributionAGENTS.md— contribution & development guide