Skip to content

guchengod/openclaw-claude-code

 
 

Repository files navigation

Claw Orchestrator

Claw Orchestrator

Run Claude Code, Codex and other coding agents in one unified runtime.

Claw Orchestrator turns interactive coding CLIs into programmable, headless agent engines. Start persistent sessions, route tasks across different coding agents, coordinate multi-agent councils, and expose everything through a clean tool-based API.

It's a TypeScript runtime for orchestrating Claude Code, OpenAI Codex, Gemini, Cursor Agent, and custom coding CLIs as persistent, programmable coding agents.

Claude Code, Codex, Gemini, Cursor Agent, OpenCode, or your own custom CLI — orchestrated as one runtime.

Runs standalone, with first-class OpenClaw plugin support and a path to other claw-style agent platforms.

npm version CI License: MIT


Why Claw Orchestrator?

Coding agents are powerful, but most are still designed as interactive CLIs.

That works well when a human is sitting in front of a terminal. It breaks down when you want agents to:

  • keep long-running coding sessions alive
  • switch between Claude Code, Codex, Gemini, Cursor Agent, OpenCode, or custom CLIs
  • collaborate as a team on the same codebase
  • integrate coding capabilities into OpenClaw first, and other claw-style agent systems over time
  • manage context, tools, worktrees, and execution state programmatically

Claw Orchestrator is the control layer for that.


Use Cases

  • Run Claude Code or Codex as a headless coding agent
  • Keep persistent AI coding sessions alive across requests
  • Build multi-agent coding teams with isolated git worktrees
  • Expose coding agents as tools to OpenClaw, MCP servers, bots, dashboards, or custom runtimes
  • Route tasks across Claude Code, Codex, Gemini, Cursor Agent, OpenCode, and custom CLIs

Core Features

Persistent Sessions

Keep coding agents alive across requests.

const session = await manager.startSession({
  name: "fix-tests",
  engine: "claude",
  cwd: "/path/to/project",
});

await manager.sendMessage("fix-tests", "Fix the failing tests");

Multi-Engine Runtime

Drive different coding agents through one unified interface.

await manager.startSession({ name: "claude-task", engine: "claude" });
await manager.startSession({ name: "codex-task",  engine: "codex"  });
await manager.startSession({ name: "gemini-task", engine: "gemini" });
await manager.startSession({ name: "cursor-task", engine: "cursor" });

Multi-Agent Council

Run multiple agents in parallel with isolated git worktrees, independent reasoning, and review-based collaboration.

await manager.councilStart("Design and implement an auth system", {
  agents: [
    { name: "Planner",  engine: "claude" },
    { name: "Builder",  engine: "codex"  },
    { name: "Reviewer", engine: "claude" },
  ],
});

Tool Orchestration

Expose coding sessions as tools so other agents and systems can control them. The runtime registers 35 tools, including:

session_start         session_send         coding_session_status
session_grep          session_compact      session_inbox
team_send             team_list            coding_agents_list
council_start         council_review       council_accept
ultraplan_start       ultrareview_start

Quick Start

Standalone (no OpenClaw)

npm install -g @enderfga/claw-orchestrator
clawo serve
clawo session-start fix-tests --engine claude --cwd .
clawo session-send fix-tests "Fix the failing tests"

Programmatic

import { SessionManager } from "@enderfga/claw-orchestrator";

const manager = new SessionManager();
await manager.startSession({ name: "task", cwd: "/project" });
const result = await manager.sendMessage("task", "Fix the failing tests");

Run a multi-agent council

clawo council start "Refactor the API layer and add tests"

As an OpenClaw plugin

If you run OpenClaw, Claw Orchestrator installs as a managed plugin. The same tools (session_start, team_send, council_start, ...) become available to every OpenClaw agent.

curl -fsSL https://raw.githubusercontent.com/Enderfga/claw-orchestrator/main/install.sh | bash

This installs via npm, registers the plugin in ~/.openclaw/openclaw.json, and restarts the gateway. See skills/references/getting-started.md for the full setup.


Engine Compatibility

Engine CLI Tested Version Status
Claude Code claude 2.1.126 Supported
Codex codex 0.128.0 Supported
Gemini gemini 0.36.0 Supported
Cursor Agent agent 2026.03.30 Supported
OpenCode opencode 1.1.40 Supported
Custom CLI any Supported

Any coding CLI that can run as a subprocess can be integrated as a custom engine.


Architecture

                 ┌─────────────────────┐
                 │  Claw Orchestrator  │
                 └──────────┬──────────┘
                            │
        ┌───────────────────┼───────────────────┐
        │                   │                   │
 ┌──────▼──────┐     ┌──────▼──────┐     ┌──────▼──────┐
 │ Claude Code │     │    Codex    │     │ Custom CLI  │
 └──────┬──────┘     └──────┬──────┘     └──────┬──────┘
        │                   │                   │
        └───────────┬───────┴───────────┬───────┘
                    │                   │
             Persistent Sessions   Tool API
                    │                   │
                    └──── Multi-Agent Council

For source-level architecture, see CLAUDE.md. For deeper reference docs, see skills/references/.


Migrating from v2.x

v3.x uses the Claw Orchestrator package, clawo CLI, and engine-neutral tool API. The v3.0 compatibility aliases were removed in v3.1.0.

What v2.x Current
npm package @enderfga/openclaw-claude-code @enderfga/claw-orchestrator
CLI binary claude-code-skill clawo
Tool names claude_session_start, claude_session_send, ... session_start, session_send, ...
OpenClaw plugin id openclaw-claude-code claw-orchestrator

To upgrade:

npm uninstall -g @enderfga/openclaw-claude-code
npm install -g @enderfga/claw-orchestrator
curl -fsSL https://raw.githubusercontent.com/Enderfga/claw-orchestrator/main/install.sh | bash

If your OpenClaw config still has an old plugin entry, remove it and register claw-orchestrator. Update scripts and tool callers before moving to v3.1.0 or newer.


Project Status

Active development. Current focus areas:

  • stable multi-engine session management
  • richer council workflows
  • custom engine configuration ergonomics
  • runtime control APIs
  • cleaner CLI and OpenClaw integration

Contributing

See CONTRIBUTING.md. PR prefixes (feat:, fix:, docs:, chore:, test:) are required. Run npm run build && npm run lint && npm run format:check && npm run test before submitting.


License

MIT — see LICENSE.

About

Integrate Claude Code capabilities into OpenClaw (formerly Clawdbot) using MCP. More info: https://openclaw.ai/

Resources

License

Contributing

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 96.8%
  • JavaScript 2.5%
  • Shell 0.7%