Open workflow runtime

Run agent workflows anywhere.

Write orchestration in JavaScript; dispatch Codex, Claude Code, Gemini, Qwen, Kimi, or any local CLI.

01 Why ODW

Keep the plan in code. Keep the agent context clean.

ODW turns dynamic workflow scripts into portable artifacts: easy to inspect, run, pause, resume, and move between agent CLIs.

workflow.js

Portable scripts

The same Claude Code-style workflow can run on Codex, Gemini, Qwen, Kimi, or a custom shell adapter.

parallel()

Parallel by design

Fan out independent subtasks without filling the host agent's conversation with every intermediate step.

odw status

Observable runs

Detached workers persist logs, state, and final results so long-running orchestration can be inspected later.

02 Runtime shape

A small engine between workflow scripts and real agent CLIs.

The loader wraps Claude-style JavaScript, the scheduler limits concurrency, and adapters shell out to the local agents you already use.

fan-out-reduce.jsworkflow
export const meta = { name: "fan-out-reduce" }
 
const drafts = await parallel(
  [1, 2, 3, 4].map((i) => () =>
    agent(`Draft #${i}: ${args.question}`)
  )
)
 
return await agent(
  "Synthesize the best answer",
  { schema }
)
agentagent(prompt)

Dispatch real work

Run one coding-agent CLI on a scoped subtask and collect text or schema-validated output.

parallelparallel(thunks)

Fan out safely

Run independent branches concurrently when the next step needs the full batch.

pipelinepipeline(items)

Stream stages

Move each item through review, verification, and synthesis without a global barrier.

03 Built for long runs

Runs that survive the night.

Every finished agent is saved the moment it lands. A failure costs one step, not the run: fix it, resume, and only the unfinished work runs again.

odw resume $RUN3 replayed from disk · 2 ran again
odw resume

Resume, don't restart

Finished agents replay from disk at no cost; only edited or unfinished calls run again.

odw agents

Read results mid-run

Each lane's output is on disk as soon as it finishes — for you, a script, or another agent.

notify

Hear when it ends

Slack or Discord webhooks, ntfy, or any command — when a run finishes, fails or stops.

checkpoint()

Ask before the expensive part

A run waits for a person's yes — from the terminal, the dashboard or a webhook — then carries on.

429 → retry

Rides out rate limits

Throttled CLIs retry after the wait they asked for; a spent quota says when it resets — and, if you allow it, the run waits for it.

stallTimeout

No silent hangs

An agent that stops printing is killed and retried, a bounded number of times.

exec()

Checks without a model

Run tests and linters as steps of the graph, with exit codes and output caps.

odw doctor

Know it works first

Checks your config and agent CLIs, then sends each a real smoke prompt.

04 Review & control

Know what it cost. See what it changed.

Every agent reports what it spent from its own CLI, keeps its diff for review, and runs at the tier you allow. Nothing lands in your tree until you apply it — and a failed check rolls it back.

$ spend

See where it spent

Tokens and dollars per agent and per phase, from each CLI's own report — and a warning before a wide fan-out.

odw apply --verify

Review, then land

Worktree agents keep their diff. Preview every file, apply in order, run your checks; a failure rolls back exactly.

odw logs --agent

Every step on the record

Each agent's transcript — tool calls, results, retries — live in the terminal or the dashboard.

--permissions read

Only what you allow

Read, edit or full, mapped to each CLI's own flags. Secrets are redacted from everything odw keeps.

["codex", "claude"]

Out of quota, not out of work

Fallback chains and model tiers move an agent down its list instead of failing it, at the same permission tier.

odw schedule

On a schedule, no daemon

cron, launchd or systemd, with an overlap lock and a log per run; the dashboard shows what runs next.

odw apply $RUN --all --verify "npm test"3 applied · 1 rolled back

05 Guardrails

Many agents, one codebase, no surprises.

Parallel agents step on each other, loop for hours, or report green with half the work killed. ODW sees it in their transcripts and stops it — and lets them talk before they collide.

agent(p, { scope, limits, notes: true })1 waited · 1 stopped · 1 note
limits

No runaway loops

Cap an agent's tool calls, cost, tokens or time; the same call five times in a row kills it, with the evidence.

orphanedBackground

No silent green

Background work a headless agent left running when it said “done” is caught, not counted as success.

scope

Plan who touches what

Calls that declare overlapping files run one after another; a write outside its scope is flagged.

odw note

Agents that talk

A shared notes board, and each worktree agent's interface changes posted for the ones that start after it.

network.allow

Only the hosts you allow

Container agents reach the web through a proxy they cannot touch; refused hosts are logged.

--on ssh://box

Your box, your phone

Run on your own server over plain ssh, approve its checkpoints from a signed one-time link, pull the run back.

06 Nothing lost

No silent guesses. No lost work.

A headless agent that stops to ask gets your answer, not a guess. Work you had not committed is saved before an agent can wipe it. And the changes that come back are ranked by what could go wrong.

questions · odw restore · odw review1 answered · 1 restored · 3 ranked
questions

Questions get answers

An agent that stops to ask waits at a checkpoint — terminal, dashboard or phone — then runs again with your answer.

odw restore

Uncommitted work, kept

A snapshot before the first agent edits your tree in place; git reset --hard and friends are flagged, and one command puts it back.

odw review

Review the risky first

Every kept diff across runs, ranked by what the run recorded — CI, auth, migrations, missed checks — each point explained.

--untrusted-input

Issue text is not a command

Runs started from issues and webhooks get read-only agents, no tokens, and a checkpoint before anything writes.

odw gc

A disk that stays yours

Orphaned worktrees, applied branches and old transcripts, reported with sizes; nothing goes without --yes, and pinned runs never do.

odw digest

One morning note

What needs you, what failed, what changed and what it cost — across every run, from the record, once a day.

07 Written right

Workflows you can write right — and see work.

Your editor completes the dialect. Your agent definitions mean what they say. Arguments are checked before a run starts, fan-outs that came back empty fail loudly, and one script reaches across repositories — then odw shows what of it you actually kept.

odw types · agentType · --repo · odw outcomes2 repos · 1 run · 7 of 9 applied
odw types

An editor that knows the dialect

Completion and hover for agent(), parallel() and every option; odw-only ones are marked, so a script stays portable.

agentType

Agent definitions that mean it

.claude/agents/*.md loaded per CLI: body, model, effort, isolation — and a tools list that can only tighten.

meta.input · minOk

Nothing quietly does nothing

Arguments checked before a run exists; every fan-out counts what came back, and minOk fails one that mostly didn't.

--repo

One script, several repositories

Agents work in the repository they name — own worktree, own diff — and odw apply writes none unless all apply.

odw workflows add

Workflows from git, locked

Fetched without running anything, shown before written, pinned by hash, and run strict as third-party code.

odw outcomes

See what you kept

Applied, dismissed and left, by workflow and by the model that served it — plus tmux panes, a compact IDE panel and ACP agents.

08 Start

Install the runtime or hack from source.

Use the single-file installer, install from npm, or clone the repository. ODW drives local agent CLIs; it does not call model APIs directly.

terminalsh
curl -fsSL https://raw.githubusercontent.com/xz1220/open-dynamic-workflows/main/scripts/install.sh | sh one-file installer
npm i -g open-dynamic-workflows or from npm
odw run examples/deep-research.js --wait run your first workflow