Self-correcting
coding agents

Run AI coding agents in an actor-critic feedback loop.
Actor executes. Critic evaluates. Loop until done.

git diff + stdout feedback
Actor
Executes task
Critic
Evaluates work
LOOP

You've seen this before

The agent says "Done!" — but it's not done. Half the requirements are missing. Tests don't pass. You fix it manually, run again, and repeat.

You've become the feedback loop.

agent output
$ claude "add user authentication"
Task completed successfully!
$ npm test
12 tests failed
auth.test.js: "password hashing not implemented"
session.test.js: "logout handler undefined"
$ claude "you forgot password hashing"
Task completed successfully!
$ npm test
8 tests failed
# repeat forever...
codeloops
$ codeloops --prompt "add user authentication"
iteration 1
actor executing task...
actor completed
critic reviewing git diff...
critic CONTINUE — missing password hashing
iteration 2
actor applying feedback...
actor completed
critic reviewing git diff...
critic CONTINUE — logout handler missing
iteration 3
actor applying feedback...
actor completed
critic reviewing git diff...
critic DONE — all requirements met
Session complete in 3 iterations

Let agents check each other

Codeloops runs a second agent as a critic that reviews every change. If something's missing, it sends feedback. The loop continues until the work is actually done.

  • Actor executes your task
  • Critic reviews the git diff
  • Loop until requirements are met

Three commands to your first loop

Clone, build, run. No config files, no setup wizard, no account required.

1

Clone & build

Requires Rust toolchain

2

Write a prompt

Plain text in prompt.md

3

Run codeloops

Watch the loop work

quickstart
# Install
$ git clone https://github.com/silvabyte/codeloops
$ cd codeloops && cargo build --release
Compiling codeloops v0.5.1
Finished release target in 42.3s
# Create a prompt
$ echo "add input validation to user signup" > prompt.md
# Run the loop
$ ./target/release/codeloops
actor executing task...
critic evaluating...
Session complete

Stupid Simple Features

Mix and match agents

Use different agents for actor and critic roles. Claude writes code, OpenCode reviews. Or any combination.

claude
opencode
cursor

prompt.md

Just write a prompt and run.

Rust-powered

Fast startup. Minimal memory. No runtime.

Full session history

Every iteration logged to JSONL. Review what happened, debug issues, analyze patterns.

"iteration": 3, "decision": "DONE", "feedback": "All requirements met"

Built-in Web UI

Browse sessions, view diffs, track iterations. One command: codeloops ui

Ready to close the loop?

Star on GitHub, read the docs, or just clone and build.