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

  1. You write the spec. PROMPT.md says what done means and how to check it. This is the one thing you approve. Nobody is asked to read a diff.

  2. 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 --long and 10 with --thorough. Wall-clock timeboxes also apply.

  3. Each commit is rebased onto your local main. The agent resolves conflicts. If it cannot, the engine falls back to a merge commit.

  4. main is pushed to origin/main. It is a plain push, never forced. If origin/main moved first, the push fails and the work rebases again.

  5. 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/opus for planning and review, claude/sonnet for development and claude/haiku for 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 --init creates the config and a starter PROMPT.md. Delete the starter marker at the top of PROMPT.md; Ralph Workflow refuses to run until you do.

  • ralph --diagnose checks that the claude CLI is on your PATH. 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 to AGENTS.md, CLAUDE.md, its policy files, its skill bundle and .gitignore. Nothing checks for committed secrets.

  • If the checkout that holds main has uncommitted or untracked files in the way, they are saved under refs/ralph-reclaim/ (kept up to 30 days) and removed. Set auto_integrate_reclaim_target_worktree = false under [general] in ralph-workflow.toml to 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 local main.

  • Telemetry is on by default (RALPH_DISABLE_TELEMETRY=1 turns it off), and Ralph Workflow checks PyPI for updates (RALPH_DISABLE_UPDATE_CHECK=1).

Next reading