You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Anything similar to Claude code dynamic workflows? #30308
Yes, already working on it! You could try to clone branch for that pull request and start it with "bun run dev" and test some worklows by yourself. Model already have an access execute and create new ones. I am working on some improvements regarding their execution review and whould some work to imrpove code quality.
There is currently no out of box workflows, but i have plans to add one (like deep research from Claude)
Reacted by DrShrinker and jason
Reacted by lctech-sid, Leo Capuano, ShanQincheng and Lythaeon
For anyone tracking this: #29789's feature branch now matches Claude Code's dynamic-workflows behavior end to end — ultracode keyword/session mode, bundled /deep-research, pause/resume, run caps, approval flow, /workflows dashboard. Work happens in VasyaYovbak#2 until #29789 gets maintainer review.
Yes — PR #29789 implements exactly this. It brings Claude-Code-style dynamic workflows to opencode.
A few highlights:
Workflow files + slash commands: drop a TypeScript workflow into .opencode/workflows/; each discovered workflow surfaces as a direct /<name> slash command, plus /workflow with name and name=value argument autocomplete.
Engine orchestration API: ctx.agent dispatches a subagent (optionally with a schema for structured output), ctx.parallel fans out concurrently, and ctx.pipeline chains staged steps — all with phases, logging, and an optional USD budget cap.
Pause / resume: runs persist an agent journal; you can pause and later resume, replaying already-completed agents from cache so cost is charged once. State survives restarts.
Live TUI dashboard + per-run approval: watch runs update in real time, with a Yes / Yes-always / View-script / No approval gate before any workflow code executes.
Safe discovery + a built-in deep-research workflow: discovery reads workflow metadata from the TS source AST only and never executes module code before you approve a run.
To try it, check out the PR branch:
gh pr checkout 29789
then build and run opencode and either type /workflow, use a discovered /<name> command, or just include the ultracode keyword in a prompt.
Update: the implementation in #29789 just gained a full review-roadmap round (via VasyaYovbak#3) — human-in-the-loop ctx.question (with pause/resume), deterministic ctx.shell steps, depth-1 ctx.workflow nesting, per-step git-worktree isolation + tool/skill/file scoping, run lifecycle bus events, structured phases, a headless opencode run --workflow, and ACP discovery. All TDD + adversarially reviewed (3,122 tests green). Worth a look if you're tracking this.
Claude Code "bare-globals" format is supported directly — workflow files use injected globals (agent(), parallel(), pipeline(), phase(), log(), args) with no boilerplate, alongside the native workflow({...}) form. Files written for Claude Code's hidden workflows feature run unmodified.
Sub-agents run in isolated sessions (clean main chat), with structured output via a JSON schema option (model is forced to return validated JSON).
Deterministic orchestration in plain JS: loops, branching, parallel() fan-out, and pipeline() (per-item staging, no barrier).
Bare model IDs resolve across providers (e.g. claude-sonnet-4 → the provider's versioned claude-sonnet-4.6), and the resolved model is threaded through to the sub-agent call.
Skill-catalog pre-injection: when a prompt references a skills directory, the runner injects SKILL.md content + a per-dir catalog so the manager agent can plan over locally-discovered skills.
13 files, includes test coverage (bare-globals.test.ts, workflow-command.test.ts, plus tool/schema tests). Verified E2E: a 6-phase research workflow and isolation tests run to completion against GitHub Copilot-served Claude models.
Happy to open a PR upstream or split it into reviewable chunks if there's interest.
If anyone is still waiting for a plugin, just made a V2 plugin, be aware this intentionally expands on CC capabilities, most high-risk additions are configurable
Features
Plain TypeScript: agent(), pipeline, parallel, loops and if.
Shell, files and HTTP: ctx.$, ctx.file and ctx.fetch, confined to the project and logged in the Run's activity; can be turned off for agent-written Workflows.
Typed results: give a Unit a zod schema and get a validated value back, not prose.
Any model per Unit: mix models and agents in one Workflow.
The agent can write Workflows: you read the whole script and approve it before it runs.
Saved Workflows: each one becomes a slash command, and /workflows lists them.
People in the loop: a Workflow can ask you questions mid-run, and you answer permission requests from the same place.
Limits: concurrency caps and token budgets.
Resume: every Unit is journaled, so a stopped or crashed Run resumes where it left off.
TUI: Run library, phases, Units, transcripts; stop a Run, restart a Unit.
Web app: the same views in a browser, served locally; pair other devices.
Build on it: a versioned protocol with an OpenAPI 3.1 spec, so other apps can start and follow Workflows.
Install
opencode plugin add @malhashemi/opencode-dynamic-workflows
opencode service restart
If anyone is still waiting for a plugin, just made a V2 plugin, be aware this intentionally expands on CC capabilities, most high-risk additions are configurable
Features
Plain TypeScript: agent(), pipeline, parallel, loops and if.
Shell, files and HTTP: ctx.$, ctx.file and ctx.fetch, confined to the project and logged in the Run's activity; can be turned off for agent-written Workflows.
Typed results: give a Unit a zod schema and get a validated value back, not prose.
Any model per Unit: mix models and agents in one Workflow.
The agent can write Workflows: you read the whole script and approve it before it runs.
Saved Workflows: each one becomes a slash command, and /workflows lists them.
People in the loop: a Workflow can ask you questions mid-run, and you answer permission requests from the same place.
Limits: concurrency caps and token budgets.
Resume: every Unit is journaled, so a stopped or crashed Run resumes where it left off.
TUI: Run library, phases, Units, transcripts; stop a Run, restart a Unit.
Web app: the same views in a browser, served locally; pair other devices.
Build on it: a versioned protocol with an OpenAPI 3.1 spec, so other apps can start and follow Workflows.
Install
opencode plugin add @malhashemi/opencode-dynamic-workflows
opencode service restart
Needs OpenCode 2.0.16+.
It's early (0.x) and feedback is very welcome.
Wow, great job! I’m going to try it today. I was building this functionality three months ago, but back then there was no way to implement it as a plugin. Is this something that became possible because of the OpenCode v2 redesign?
Wow, great job! I’m going to try it today. I was building this functionality three months ago, but back then there was no way to implement it as a plugin. Is this something that became possible because of the OpenCode v2 redesign?
Yeah V2 plugins are super powered, within few days I managed to ship 3 crazy good plugins, please also have a look at
Thanks for the suggestion, @achrysaetos! As I understand it, you'd like something like Claude Code's dynamic workflows in OpenCode: the model writes a script that runs many subagents in the background (fan-out, pipelines, cross-checking), and that script can be watched, resumed and saved as a reusable command.
OpenCode doesn't have this built in today. The maintainers will consider the request.
In the meantime, a community member has published a v2 plugin that aims to do this. I haven't tested it myself. Its description says the model writes a small JavaScript script using agent, parallel, pipeline, phase and budget, which runs in the background and starts subagents as child sessions. It can resume from a journal, and the plugin adds a live view in the terminal app to watch, steer or stop running agents:
Activity
github-actions commentedon Jun 2, 2026
This issue might be a duplicate of an existing issue. Please check:
VasyaYovbak commentedon Jun 2, 2026
Yes, already working on it! You could try to clone branch for that pull request and start it with "bun run dev" and test some worklows by yourself. Model already have an access execute and create new ones. I am working on some improvements regarding their execution review and whould some work to imrpove code quality.
There is currently no out of box workflows, but i have plans to add one (like deep research from Claude)
leo-capvano commentedon Jun 4, 2026
wait for it, great!
mguttmann commentedon Jun 6, 2026
For anyone tracking this: #29789's feature branch now matches Claude Code's dynamic-workflows behavior end to end —
ultracodekeyword/session mode, bundled/deep-research, pause/resume, run caps, approval flow,/workflowsdashboard. Work happens in VasyaYovbak#2 until #29789 gets maintainer review.🤖 Generated with Claude Code
mguttmann commentedon Jun 7, 2026
Yes — PR #29789 implements exactly this. It brings Claude-Code-style dynamic workflows to opencode.
A few highlights:
.opencode/workflows/; each discovered workflow surfaces as a direct/<name>slash command, plus/workflowwith name andname=valueargument autocomplete.ctx.agentdispatches a subagent (optionally with aschemafor structured output),ctx.parallelfans out concurrently, andctx.pipelinechains staged steps — all with phases, logging, and an optional USD budget cap.deep-researchworkflow: discovery reads workflow metadata from the TS source AST only and never executes module code before you approve a run.To try it, check out the PR branch:
then build and run opencode and either type
/workflow, use a discovered/<name>command, or just include theultracodekeyword in a prompt.Link: #29789
mguttmann commentedon Jun 7, 2026
Update: the implementation in #29789 just gained a full review-roadmap round (via VasyaYovbak#3) — human-in-the-loop
ctx.question(with pause/resume), deterministicctx.shellsteps, depth-1ctx.workflownesting, per-step git-worktree isolation + tool/skill/file scoping, run lifecycle bus events, structured phases, a headlessopencode run --workflow, and ACP discovery. All TDD + adversarially reviewed (3,122 tests green). Worth a look if you're tracking this.dzianisv commentedon Jun 14, 2026
Yes — there are now concrete implementations of exactly this (the Claude Code dynamic-workflows feature) for opencode:
workflow()helper from@opencode-ai/plugin/workflow,ctx.agent/parallel/pipeline, background/workflow <name>runs and a/workflowsdashboard.opencode run --workflow, and anultracodekeyword.PR #32167 is a genealogical superset of #29789 (same lineage), so they're one effort, not two. I refreshed the combined work onto current
devhere (conflict-free): https://github.com/dzianisv/opencode/tree/feat/workflows-consolidateddzianisv commentedon Jun 19, 2026
For anyone tracking this: we shipped a working implementation of Claude Code-style dynamic workflows in our fork.
Commit: dzianisv@2073487
What works (end-to-end, against a real provider):
/workflow <path-to-file.js>slash command runs project-local JS workflows.agent(),parallel(),pipeline(),phase(),log(),args) with no boilerplate, alongside the nativeworkflow({...})form. Files written for Claude Code's hidden workflows feature run unmodified.schemaoption (model is forced to return validated JSON).parallel()fan-out, andpipeline()(per-item staging, no barrier).claude-sonnet-4→ the provider's versionedclaude-sonnet-4.6), and the resolved model is threaded through to the sub-agent call.SKILL.mdcontent + a per-dir catalog so the manager agent can plan over locally-discovered skills.13 files, includes test coverage (
bare-globals.test.ts,workflow-command.test.ts, plus tool/schema tests). Verified E2E: a 6-phase research workflow and isolation tests run to completion against GitHub Copilot-served Claude models.Happy to open a PR upstream or split it into reviewable chunks if there's interest.
isomoes commentedon Jul 15, 2026
We think implementing this feature as a plugin would be a good approach, so others can adopt it quickly.
syn7xx commentedon Sep 11, 2026
I tried doing it, but as a rule, it's easier to integrate it into the core than to do it via a plugin. Waiting this feature
malhashemi commentedon Sep 26, 2026
If anyone is still waiting for a plugin, just made a V2 plugin, be aware this intentionally expands on CC capabilities, most high-risk additions are configurable
Features
ctx.$,ctx.fileandctx.fetch, confined to the project and logged in the Run's activity; can be turned off for agent-written Workflows.Install
Needs OpenCode 2.0.16+.
It's early (0.x) and feedback is very welcome.
VasyaYovbak commentedon Sep 26, 2026
Wow, great job! I’m going to try it today. I was building this functionality three months ago, but back then there was no way to implement it as a plugin. Is this something that became possible because of the OpenCode v2 redesign?
malhashemi commentedon Sep 27, 2026
Yeah V2 plugins are super powered, within few days I managed to ship 3 crazy good plugins, please also have a look at
opencode-gpt-live
opencode-codex-computer-use
I now feel I have all the features I miss from Codex and CC back to OpenCode! And in my TUI!!!
opencodejr commentedon Oct 29, 2026
Thanks for the suggestion, @achrysaetos! As I understand it, you'd like something like Claude Code's dynamic workflows in OpenCode: the model writes a script that runs many subagents in the background (fan-out, pipelines, cross-checking), and that script can be watched, resumed and saved as a reusable command.
OpenCode doesn't have this built in today. The maintainers will consider the request.
In the meantime, a community member has published a v2 plugin that aims to do this. I haven't tested it myself. Its description says the model writes a small JavaScript script using
agent,parallel,pipeline,phaseandbudget, which runs in the background and starts subagents as child sessions. It can resume from a journal, and the plugin adds a live view in the terminal app to watch, steer or stop running agents:Source: https://github.com/rphang/opencode-workflows
Related issues:
task-paralleltool to start independent subtasks at the same timewait_for_subagentstool so a parent agent can wait for background subagents