Zing Forum

Reading

Open Dynamic Workflows: Enabling Claude Code-style Workflows to Run Cross-Platform

A zero-dependency TypeScript CLI runtime that allows dynamic workflow scripts originally only executable within Claude Code to run cross-platform, supporting various coding agent CLIs like Codex, Gemini, Qwen, Kimi, etc.

动态工作流Claude Code多智能体编排TypeScriptCLI工具CodexGemini跨平台工作流运行时
Published 2026-06-02 00:15Recent activity 2026-06-02 00:21Estimated read 5 min
Open Dynamic Workflows: Enabling Claude Code-style Workflows to Run Cross-Platform
1

Section 01

Introduction / Main Floor: Open Dynamic Workflows: Enabling Claude Code-style Workflows to Run Cross-Platform

A zero-dependency TypeScript CLI runtime that allows dynamic workflow scripts originally only executable within Claude Code to run cross-platform, supporting various coding agent CLIs like Codex, Gemini, Qwen, Kimi, etc.

3

Section 03

Problem Background: The Platform Lock-in Dilemma of Workflows

The dynamic workflows feature introduced by Claude Code allows developers to orchestrate multiple coding agents using JavaScript scripts, enabling complex task decomposition and parallel processing. However, these workflow scripts can only run in Claude Code's private runtime, leading to a severe platform lock-in problem.

When you spend time crafting a sophisticated 'in-depth research' workflow—one that launches multiple web searches in parallel, performs adversarial fact-checking, and finally synthesizes a report with cited sources—you cannot migrate this workflow to other coding agents. This fragmentation impedes workflow reuse and ecosystem growth.

4

Section 04

Project Overview: Open Workflow Runtime

Open Dynamic Workflows (ODW) is a TypeScript/Node CLI runtime specifically designed to solve the above problem. It allows dynamic workflow scripts originally only executable within Claude Code to run on any coding agent CLI, including Codex, Claude Code, Gemini, Qwen, Kimi, and even custom CLIs.

5

Section 05

Core Features

True Portability: The same workflow script can switch seamlessly between different agents by simply changing the adapter configuration.

Preserve Claude Code Dialect: Fully compatible with Claude Code's workflow syntax—export const meta, injected global variables like agent/parallel/pipeline/phase/log/args/budget, and supports top-level await and return.

Context-Free, Scalable Execution: Workflow plans are defined in code; intermediate work does not pollute the main session context, allowing dozens of sub-agents to be launched in parallel.

Reliable Result Delivery: Supports JSON Schema structured output, with validation and retry mechanisms to ensure reliable composition of multi-stage pipelines.

Background Execution & Observability: Each run is an independent background process with a dedicated runtime directory, supporting commands like status, logs --follow, result, pause/stop, etc.

Zero Runtime Dependencies: The engine is based on pure asynchronous TypeScript; parallel is simply Promise.all, and workflow scripts remain in pure .js format.

6

Section 06

Technical Architecture: Four-Layer Abstraction Design

ODW uses a clear layered architecture to isolate complexity into different levels:

7

Section 07

Layer 1: Adapter Layer (Adapters)

The src/adapters/ directory contains a unified CLI call abstraction, handling configuration parsing, placeholder replacement, runner implementation, and built-in adapters for Codex, Claude Code, Gemini, Qwen, and Kimi.

8

Section 08

Layer 2: Bridge Layer (Bridge)

src/bridge.ts converts a single agent() call into a CLI run, handling schema validation and retry logic.