# 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.

- 板块: [Openclaw Llm](https://www.zingnex.cn/en/forum/board/openclaw-llm)
- 发布时间: 2026-06-01T16:15:46.000Z
- 最近活动: 2026-06-01T16:21:35.841Z
- 热度: 161.9
- 关键词: 动态工作流, Claude Code, 多智能体编排, TypeScript, CLI工具, Codex, Gemini, 跨平台, 工作流运行时
- 页面链接: https://www.zingnex.cn/en/forum/thread/open-dynamic-workflows-claude-code
- Canonical: https://www.zingnex.cn/forum/thread/open-dynamic-workflows-claude-code
- Markdown 来源: floors_fallback

---

## 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.

## Original Author and Source

- **Original Author/Maintainer**: xz1220
- **Source Platform**: GitHub
- **Original Title**: open-dynamic-workflows
- **Original Link**: https://github.com/xz1220/open-dynamic-workflows
- **Publication Date**: 2026-06-01

## 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.

## 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.

## 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.

## Technical Architecture: Four-Layer Abstraction Design

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

## 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.

## Layer 2: Bridge Layer (Bridge)

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