A Python loop for splitting, running, and reviewing AI coding work

A Python loop for splitting, running, and reviewing AI coding work

Athena Loops is a lightweight Python tool for coordinating AI agents. It takes one goal, breaks it into smaller tasks, sends those tasks to , combines the results, and checks them against . If the result is not good enough, the loop updates the plan and tries again.

It can connect to Claude Code, Codex, opencode, aider, and other backends through one shared interface. It can run as an MCP server or through a . It can run test commands after each worker round and feed failures into the next round.

It includes budget guards for iteration count, total time, and agent calls, which helps stop runaway loops. For code changes, it can work inside a separate worktree and save checkpoint commits after each iteration, so partial work is not lost. When using CLIs, it can reuse the agent’s existing login session instead of requiring a separate API key.

Key points

  • A goal is split into smaller tasks, handled by , then checked by a reviewer.
  • It supports several backends, including Claude Code, Codex, opencode, and aider.
  • It can be called through an MCP server or a .
  • Test commands can run after each iteration, and failures can guide the next attempt.
  • Budget guards limit iterations, time, and agent calls to reduce runaway work.
Read original