Claude Code Automation for Real Repo Work¶
If you are searching for Claude Code automation, you probably want Claude Code to keep working while you are away, and you want that work to end up somewhere useful.
Ralph Workflow is one answer. It lands coding-agent work directly on main, automatically, with no pull requests. It is a free and open-source CLI (AGPL-3.0-or-later) that runs the Claude Code you already have, on your own machine.
This page says plainly what it does around Claude Code, what it does not do, and what is not built yet.
What Ralph Workflow does around Claude Code¶
You write the spec.
PROMPT.mdsays what done means and how to check it. This is the one thing you approve. Nobody is asked to read a diff.Claude Code plans, builds and commits. Ralph Workflow runs a loop of planning, development and commit for a set number of developer cycles: 2 by default, 1 with
--quick, 5 with--longand 10 with--thorough. Wall-clock timeboxes also apply.Each commit is rebased onto your local
main. The agent resolves conflicts. If it cannot, the engine falls back to a merge commit.mainis pushed toorigin/main. It is a plain push, never forced. Iforigin/mainmoved first, the push fails and the work rebases again.The agent reviews its own work, after the push. That review can loop back to fix things in new commits. It is an agent review, not an executed check.
There is no pull request at any step, and nobody merges by hand.
What it does not do yet¶
Today the push runs without checks. Claude Code is asked to run the checks in PROMPT.md, but nothing enforces them. Your CI runs after the push, on main, and Ralph Workflow does not read its results.
The gate will run your suite and acceptance checks on the exact commit that will land, before every push. It is our top engineering priority and it has not shipped. Until it does, we do not call any push verified. Start on a repository where a bad commit costs one git revert.
How Ralph Workflow runs Claude Code¶
Your account. Claude Code uses whatever login or API key you signed it in with, so its usage is billed to you. Ralph Workflow makes no model calls of its own and is not a model provider.
No permission prompts. Ralph Workflow starts Claude Code with
--dangerously-skip-permissions, so it can run commands and edit files on your machine without asking. Use a machine, container or VM you are willing to hand to the agent.Models per job. The default config uses Claude for every job:
claude/opusfor planning and review,claude/sonnetfor development andclaude/haikufor commit messages. You can change these in the[agent_chains]section of~/.config/ralph-workflow.toml.Caps limit cycles and time, not money. Pick the cycle count with your bill in mind.
What a good spec looks like¶
The spec is where your judgment goes, so make it specific. For example:
# Goal
Reject empty project names in the CLI create command before any files are written.
Keep the rest of the flow unchanged.
## Acceptance criteria
- An empty or whitespace-only name fails with a clear error
- No project files are created for an invalid name
- Valid names behave exactly as before
## How to check
- Run the existing test suite; it must pass
- Add tests for the empty and whitespace-only cases
Remember that the agent is asked to run those checks. Nothing enforces them until the gate ships.
Your first run¶
Before you start, have Claude Code installed and signed in on your machine.
pipx install ralph-workflow
cd /path/to/your/project
ralph --init
ralph --diagnose
$EDITOR PROMPT.md
ralph
ralph --initcreates the config and a starterPROMPT.md. Delete the starter marker at the top ofPROMPT.md; Ralph Workflow refuses to run until you do.ralph --diagnosechecks that theclaudeCLI is on yourPATH. It does not check that you are signed in.
When the run ends, check what landed on origin/main against the spec. Run your checks yourself or watch CI on main. If a commit is wrong, git revert it.
Before you install¶
Ralph Workflow pushes your whole local
main, including commits you had not pushed yet and the engine’s own commits toAGENTS.md,CLAUDE.md, its policy files, its skill bundle and.gitignore. Nothing checks for committed secrets.If the checkout that holds
mainhas uncommitted or untracked files in the way, they are saved underrefs/ralph-reclaim/(kept up to 30 days) and removed. Setauto_integrate_reclaim_target_worktree = falseunder[general]inralph-workflow.tomlto make it refuse and retry instead.If your forge requires pull requests on
main, the push is rejected. The run carries on and the commits stay on your localmain.Telemetry is on by default (
RALPH_DISABLE_TELEMETRY=1turns it off), and Ralph Workflow checks PyPI for updates (RALPH_DISABLE_UPDATE_CHECK=1).
Next reading¶
Getting Started — the fuller first-run walkthrough
Ralph Workflow vs Claude Code — when to drive Claude Code yourself instead
Claude Code Approval Mode Is Not an Unattended Workflow — where approval goes when there are no permission prompts
When Ralph Workflow Fits, and When It Does Not — which tasks to start with
Source on GitHub — read the engine, or report first-run friction (Codeberg mirror)