looply
looply does not write your code. Your coding agent does — Claude Code, or whichever
one you already use. looply is the harness around it: it decides what the agent works
on, refuses the paths you named, runs your checks, has a second agent prove the change
against the task, and then keeps it or throws it away.
Your code never leaves your machine.
npx looply-cli init # read the repo, ask the few things it cannot infer
npx looply-cli doctor # run every check once — no agent calls, no cost
npx looply-cli scan # fill the queue with findings tied to a file and a line
npx looply-cli verify # confirm each finding against the code as it stands
npx looply-cli run --hours 4
The two-key rule
A round commits only if both keys turn:
|
|
| Key one |
your own checks — typecheck, tests, build — in the order you wrote them |
| Key two |
a second agent reads the diff against the task. It did not write the code, and it never sees the first agent's account of what it did. |
Either one fails and the work is discarded, the tree is cleaned, and the task goes back
in the queue carrying the reason — so the next attempt starts knowing what went wrong
with the last one.
This exists because of a measured failure. An earlier version of this harness ran 166
unattended rounds and kept all 166, because the checks it ran were the same checks the
agent had already run before finishing. A green build is not evidence. A prover that
never rejects anything is not checking.
What one round is
pick → implement → check → prove → keep or discard
- pick — the top item whose premise still holds. If the code moved under it, it goes
back through verification first: an item describing a bug somebody already fixed is
worse than no item at all.
- implement — your agent, starting at the file and line the item already located.
- check — your gates, cheapest first, stopping at the first failure.
- prove — the second agent.
- keep or discard — a commit on the run branch with a trailer naming only the checks
that actually ran, or nothing at all.
Rails
Name the paths the agent must never touch. looply reports what it finds there and
refuses the edit; a task that genuinely needs one becomes a question, for that one file,
once.
rails:
forbidden_paths: ["prisma/", "src/auth/", "src/modules/payments/"]
prod_patterns: [herokuapp, amazonaws, ".render.com"]
exemptions: ask # or never
A railed path or a reachable production database aborts the round before a single
check runs. That is a different thing from a failing check, and it is reported
differently.
Commands
| command |
what it is for |
costs |
looply |
where you are, and the single most useful next step |
— |
looply init |
profile the project and write .looply/config.yaml |
— |
looply doctor |
validate the config and run every check once |
— |
looply scan |
read the code through several lenses and fill the queue |
agent |
looply verify |
confirm draft items against the code, so a run can pick them |
agent |
looply run --hours N |
work the queue for N hours |
agent |
looply run --dry-run |
print exactly what a run would do |
— |
looply status |
what it is doing right now |
— |
looply report |
what a finished run actually did |
— |
looply pair |
connect this machine to your phone |
— |
looply daemon |
stay connected so the phone can drive it |
— |
looply agent --json |
machine-readable state, for other tools |
— |
doctor and --dry-run cost nothing. Use them rather than starting a run to find out
the config is wrong.
Using a different agent
The prompt is written to the agent's stdin, never onto a command line, so a
multi-line prompt and a diff full of quotes are not your problem:
agent:
command: "claude -p --dangerously-skip-permissions"
output_format_flag: "--output-format" # "" if your agent has no such flag
The agent runs contained: it inherits no PATH and no environment, which is
the point — but it means a provider outside your project has to be named, or it
cannot start at all. Two keys do that, and skipping them produces exactly two
failures, both measured:
agent:
# Where the binary lives. Without it every lens reports
# "'claude' is not recognized as an internal or external command".
runtime: ["/home/you/.local/bin"]
# Names only — the VALUE comes from the environment the daemon holds, so no
# key is ever written into this file. Without it a provider that keeps its
# login in a credential store answers "Not logged in · Please run /login",
# because looply will not grant an agent a credential store.
env: ["CLAUDE_CODE_OAUTH_TOKEN"]
Confirm both with looply doctor --provider, which spends one model call and
tells you whether the process actually started, answered, or hung.
Requirements
- Node 20 or newer
- A git repository with a clean working tree — a run refuses to start otherwise, because
the first discard would destroy uncommitted work
- At least one check of your own that exits non-zero when it fails. Without one there is
nothing for the first key to turn.
What it is not
- Not a coding agent. It drives the one you already use and is worth nothing without it.
- Not a replacement for review. It narrows what you review and shows its working.
- Not free. Every round is agent time, and a check that rejects work has still been paid for.
Documentation
https://looply-agent-app.web.app/docs/
MIT © vuedale