Ralph
Stop cleaning up after your AI coding agent.
Ralph supervises Claude Code (and other agents soon) to actually finish what they start. When Claude loses track, declares "done" prematurely, or forgets earlier decisions -- Ralph catches it.
Who This Is For
- You use Claude Code or similar AI coding tools
- You're building real projects, not just experimenting
- You've been frustrated by half-finished AI output
- You want better results, even if it costs more tokens
Quick Start
-
Install and initialize
pipx install ralph-loop ralph init
-
Describe what you want built (in PROMPT.md)
# Goal Add a contact form that emails submissions to me. # Success Criteria - [ ] Form has name, email, message fields - [ ] Validates email format before sending - [ ] Shows success message after submission - [ ] Emails go to contact@mysite.com
-
Let Ralph supervise the build
ralph runRalph keeps Claude working until all criteria are actually met. Verified 3 times to make sure nothing was missed.
How It Works
Claude Code is powerful, but on bigger tasks it can:
- Lose context as the conversation grows
- Forget decisions made earlier in the session
- Declare "done" when things clearly aren't
Ralph solves this by breaking big tasks into fresh-context chunks.
After each chunk, Ralph:
- Saves what Claude learned and accomplished (so nothing is lost)
- Starts a fresh session (so context stays clean)
- Hands off the state (so Claude picks up where it left off)
When Claude says "done", Ralph doesn't just trust it. It verifies 3 times with fresh eyes. If anything was missed, work continues.
Result: Tasks that used to fail halfway through now complete reliably.
The Tradeoff
Ralph uses more tokens than running Claude directly. Each rotation is a fresh API call, and verification adds more.
But: You'll spend less time debugging, less time re-prompting, and less time cleaning up half-finished work. For many tasks, the extra tokens are worth it.
Commands
| Command | Description |
|---|---|
ralph init |
Initialize Ralph in the current directory |
ralph run |
Supervise Claude until the goal is complete |
ralph inspect |
Inspect a running Ralph session |
ralph status |
Show current progress |
ralph reset |
Start fresh |
ralph history |
View logs from previous sessions |
ralph --version |
Show installed version |
ralph --about |
Show comprehensive explanation (useful for AI agents) |
Configuration
The .ralph/ directory contains local state and should not be committed:
# .gitignore
.ralph/
Documentation
- Getting Started - Full setup guide
- Writing Effective Prompts - Get better results
- Troubleshooting - When things go wrong
- Full Documentation - Everything else
Built By
Ralph was created by Ilja Weber to solve my own frustrations with AI coding agents declaring "done" too early.
Follow for updates:
License
MIT
Metadata
Release files for ralph-loop 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ralph_loop-0.6.0.tar.gz | 2.0 MB | With provenance | Details for ralph_loop-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ralph_loop-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for ralph_loop-0.6.0-py3-none-any.whl |
Total release size: 2.0 MB
Release files / ralph_loop-0.6.0.tar.gz
| Download URL | ralph_loop-0.6.0.tar.gz |
|---|---|
| Size | 2.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0ad8f1ca6ddb9e098133130e853f061475896fffecfb41f3f2b59eb20459eb20
|
|
BLAKE2b-256 checksum How to use checksums |
36fc0c0e67b06f4357faed4b2e3e2c1403fa3e50300ef4c30bdd3779e43a89f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 18, 2026.
Transparency logRelease files / ralph_loop-0.6.0-py3-none-any.whl
| Download URL | ralph_loop-0.6.0-py3-none-any.whl |
|---|---|
| Size | 57.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b9e40c4b70e47e7ede8832f33f8c5962db5293a898ef7ca4d91b588ef4ea2a49
|
|
BLAKE2b-256 checksum How to use checksums |
430150b09af145523b3a1d744e15b73de70cd8a518cfcf75c53c31e4649327a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 18, 2026.
Transparency logSecurity for ralph-loop 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for ralph_loop-0.6.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 18, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.