Remote OpenClaw Blog
Building Workflows: OpenClaw Dispatch vs Native Claude Code
7 min read ·
Remote OpenClaw Blog
7 min read ·
If you are building automation with OpenClaw, you will quickly encounter two paths: OpenClaw Dispatch and Claude Code. They sound similar — both involve AI doing work on your behalf — but they solve fundamentally different problems. Choosing the wrong one for your use case wastes time and produces brittle workflows.
This guide explains the architectural differences, shows you when each tool is the right choice, and walks through how to combine them for serious production automation. For the full Dispatch reference, see the Claude Dispatch guide.
The simplest way to understand the difference:
Dispatch tells Claude Code (or any other model endpoint) what to do and when. Claude Code does the actual thinking and acting. They are different layers of the same automation stack, not alternatives to each other.
The confusion comes from the fact that both can be used independently. You can run Dispatch workflows that use simple local models instead of Claude Code. You can use Claude Code interactively without Dispatch at all. But the most powerful setups combine them.
Dispatch is OpenClaw's built-in workflow engine. It provides:
A Dispatch workflow definition looks something like this:
{
"name": "daily-repo-summary",
"trigger": { "cron": "0 8 * * 1-5" },
"steps": [
{
"name": "pull-recent-commits",
"tool": "git-log",
"params": { "since": "24h", "repo": "/path/to/repo" }
},
{
"name": "summarize",
"model": "glm-4.7-flash",
"prompt": "Summarize these commits into a concise daily report: {{steps.pull-recent-commits.output}}"
},
{
"name": "send-report",
"tool": "send-message",
"params": { "channel": "team-updates", "content": "{{steps.summarize.output}}" }
}
]
}
Dispatch does not need Claude Code. It can use any model endpoint — Ollama, OpenRouter, or direct API calls. Claude Code is one possible execution backend, not a requirement.
Claude Code is Anthropic's CLI for Claude. It provides an interactive environment where Claude can:
The key architectural difference from Dispatch: Claude Code is session-based and interactive. It starts, you collaborate with it, and it ends when the session is done. There is no persistent scheduling, no automatic triggers, no state management between sessions (beyond what you manually save).
Claude Code excels at complex, open-ended tasks that require reasoning, adaptation, and human feedback within a session. Dispatch excels at repetitive, predictable tasks that run on a schedule without human involvement. See the full Claude Code guide for setup and usage details.
Use Dispatch when your automation meets these criteria:
Common Dispatch use cases for OpenClaw operators:
Marketplace
Free skills and AI personas for OpenClaw — browse the marketplace.
Browse the Marketplace →Use Claude Code when your work meets these criteria:
Common Claude Code use cases:
The most powerful pattern is using both tools together. Here is how:
Build and test your workflow interactively in Claude Code. Once it works reliably, convert the steps into a Dispatch workflow definition. This gives you the best of both: rapid iteration during development and reliable unattended execution in production.
A Dispatch workflow runs a simple cron schedule, but one step requires complex reasoning — analyzing a codebase, writing a nuanced summary, or making a judgment call. That step invokes Claude Code as a tool, passing in the necessary context and receiving the result back into the workflow.
When a Dispatch workflow fails, the error notification triggers a Claude Code session that automatically investigates the failure — reading logs, checking system state, and either fixing the issue or generating a detailed incident report for human review.
For the full workflow automation guide, including more patterns and configuration examples, see the dedicated resource.
This workflow runs every morning at 8 AM, pulls yesterday's git commits and completed tasks, generates a summary, and posts it to a team channel. Every step is predictable and repeatable — pure Dispatch territory.
When you open a pull request and want AI review, you start a Claude Code session, point it at the PR diff, and collaborate interactively on code quality, potential bugs, and improvement suggestions. This requires real-time reasoning and benefits from human feedback — pure Claude Code territory.
Dispatch triggers a weekly cron job that collects dependency versions, checks for known CVEs, and scans configuration files. If potential issues are found, the workflow invokes Claude Code to analyze the findings, assess severity, and draft remediation recommendations. The results are compiled into a report and sent to the team.
Use OpenClaw Dispatch when you need persistent, scheduled automation that runs unattended — daily reports, recurring data pulls, periodic system checks. Use Claude Code when you need interactive, session-based work where you are actively collaborating with the AI on code, debugging, or exploration. Dispatch is for automation that runs while you sleep. Claude Code is for work you do while sitting at the keyboard.
Yes. Dispatch can invoke Claude Code as a tool within a workflow. This is useful when a scheduled task requires code-level intelligence — for example, a daily cron job that uses Claude Code to review pull requests, generate reports from code analysis, or run automated tests. Dispatch handles the scheduling and orchestration while Claude Code handles the code-aware reasoning.
The Dispatch feature is included in OpenClaw at no additional cost. However, every Dispatch workflow execution consumes model tokens. If you are using a paid API provider like OpenRouter or Anthropic's API, those token costs apply to Dispatch runs just like they apply to interactive sessions. With local Ollama models, Dispatch runs are effectively free beyond your hardware costs.
Dispatch supports configurable retry logic, error notifications, and fallback actions. You can set a workflow to retry a specific number of times with backoff intervals, send a notification on failure, or trigger an alternative workflow. Without explicit error handling configured, failed workflows log the error and stop. Production deployments should always include retry and notification settings.