Skip to content
Loop Engineering Tools

Loop Engineering Guides

Practical guides on Loop Engineering: what it is, how to build a first loop, how to use checkers, and how to keep repeated agent work safe and budget-aware.

Concept
What Is Loop Engineering?

Loop Engineering is the practice of designing the loop around an AI agent: what it reads, who receives the work, how the result is checked, what gets remembered, and when the loop stops or runs again.

Read guide
Starter
Build Your First Loop

Start with one small loop you can personally review. Pick one discovery source, one outcome, one validation step, one checker, one stop rule, and one place to save the run note.

Read guide
Cost
Token-rich vs Token-poor Loops in Loop Engineering

Token-rich loops pass large context into every iteration. Token-poor loops pass summaries, retrieved memory, or scoped observations to reduce cost.

Read guide
Safety
How to Stop Agent Loops Safely

Safe loops define hard stop rules before execution: max iterations, budget caps, repeated failure limits, and human approval gates.

Read guide
Safety
Goodhart’s Law for AI Agents

When a validation metric becomes the target, an agent may optimize the metric instead of the real goal. Good loop design adds boundaries against shortcuts.

Read guide
Concept
Open vs Closed Agent Loops

Closed loops have clear validation and stop rules. Open loops explore uncertain tasks and need stronger human supervision.

Read guide
Memory
Memory for Agent Loops

Long-running loops need memory strategy: what to keep, what to summarize, what to retrieve, and what to forget.

Read guide
Runtime
Ralphify and RALPH.md for Loop Engineering

Ralphify is an experimental open-source loop runtime. RALPH.md-style exports can help describe loop goals, commands, boundaries, and fallback rules, but they should be treated as experimental.

Read guide
Concept
Context Engineering vs Loop Engineering

Context Engineering focuses on what information an agent receives. Loop Engineering focuses on how the agent iterates, validates, stops, and reports.

Read guide
Concept
Agent Harness vs Loop Engineering

An agent harness is the system that validates, authorizes, executes, records, and returns observations for the actions a model proposes. Loop engineering decides how that harness iterates: the goal, validation, stop rule, budget, and feedback.

Read guide
Runtime
Run Any Loop Template with continuous-claude

Every loop template here maps directly to a continuous-claude run. The template's objective, validation, and boundaries become the task prompt; the suggested max iterations become --max-runs; you add --max-cost and --max-duration caps, then run.

Read guide
Tools
Worktree Orchestrators Compared

Worktree orchestrators run several coding agents at once, each in an isolated git worktree, so parallel work does not collide. They differ in supported agents, diff/review UX, merge flow, and license.

Read guide
Tools
Claude Code /goal vs Codex /goal

Both keep an agent working toward a goal with validation and a stop condition. Claude Code /goal frames a single goal with explicit boundaries and a max-iteration line; Codex /goal frames an objective with a “Done when” block and explicit stop conditions. The structure differs more than the intent.

Read guide
Concept
AGENTS.md vs SKILL.md vs RALPH.md

AGENTS.md holds durable project rules and validation commands. SKILL.md packages a reusable workflow with triggers and steps. RALPH.md is an experimental loop definition for Ralphify-style runtimes. They are complementary, not competing.

Read guide
Tools
continuous-claude vs GitHub Actions for Loops

continuous-claude runs an autonomous agent loop with cost, time, and iteration caps. A GitHub Actions workflow runs your validation on a schedule or trigger but does not run an autonomous agent. Use Actions to validate; use continuous-claude (with caps and human approval) to iterate.

Read guide
Tools
Claude Code: /goal vs /loop vs Stop Hook

All three keep a Claude Code session running between prompts. /goal starts the next turn when the previous finishes and stops when a fast model confirms your condition is met. /loop re-runs on a time interval. A Stop hook fires after every turn and stops when your own script or prompt decides.

Read guide