Skip to content

LeXwDeX/OpenCode-DAG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13,884 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English · 中文 · العربية · Português (Brasil) · Bosanski · Dansk · Deutsch · Español · Français · 日本語 · 한국어 · Norsk · Polski · Русский · ไทย · Türkçe · Українська

OpenCode-DAG

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.


What makes this fork different

DAG Workflow Engine (AGPL-3.0)

The headline feature. A directed acyclic graph (DAG) workflow engine that lets LLM agents orchestrate complex multi-node parallel tasks within a single session.

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

See Harness-DAG-Workflow docs and the DAG developer guide.

Hooks API (22 events × 5 execution types)

Full Claude Code hooks protocol compatibility plus DAG workflow event bus integration (workflow.* / node.* events), TUI subscriptions, and HTTP API forwarding. See hooks reference.

CJK & localization fixes

Extensive fixes for Chinese/Japanese/Korean text handling: tokenization, full-width punctuation, file paths, IME input in the terminal UI. See fixes list.

Dual isolation: Sandbox + Worktree

  • Sandbox — ephemeral temp dirs with LSP diagnostics for safe code experiments
  • Worktreegit worktree per-workflow isolation for parallel multi-agent editing

Install

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 docs

Tip

Remove versions older than 0.1.x before installing.


Keep the upstream — plus more

All upstream MIT-licensed capabilities are fully preserved:

  • Desktop app (macOS / Windows / Linux) — download from releases
  • Build & Plan agentsTab to 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.


License

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

Community

About

Extends the Hooks API with Goal-Oriented Instructions, TODO Pre-Hooks, Sandboxed Workspaces, and DAG (Directed Acyclic Graph) based Workflow Execution.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors