Forgeloop stops coding agents from spinning. Install it in any repo. When Claude, Codex, or any LLM agent starts thrashing on the same failure, Forgeloop pauses the run, preserves every artifact, and gives you a clean next step instead of a wasted API bill.
Forgeloop vendors into your repo and gives you:
- Fail-closed loops — repeated failures become a pause and a readable handoff, not an infinite retry
- A live dashboard — see what the agent is doing, what's blocking it, and what needs your attention
- Plain-file state — runtime status, questions, escalations, and blockers all live in your repo as markdown and JSON
- One-command proof — verify the whole system works before you trust it with real work
Works with Claude, Codex, or any LLM. Supports checklist-driven loops, structured task execution, and workflow packs.
On main / the v2 alpha track, you also get the live HUD, real-time event streams, the OpenClaw plugin, and a self-host proof harness. See design.md for the visual direction.
Agent runs fail. The question is what happens next.
Without Forgeloop, your agent retries the same broken test 40 times, burns through your API budget, and leaves you with nothing useful. With Forgeloop, when the agent hits a wall:
- it stops instead of retrying forever
- it preserves every artifact and the full failure trail
- it writes the blocking question so you can answer on your own time
- it pauses cleanly so you can resume from exactly where it stopped
Forgeloop is designed to fail closed, not spin.
When a loop crosses the repeated-failure threshold, Forgeloop:
- Stops retrying — no more wasted tokens
- Pauses the run — writes
[PAUSE]toREQUESTS.md - Drafts a handoff — a human-readable summary in
ESCALATIONS.md - Captures the blocker — the exact question in
QUESTIONS.md - Writes machine state —
.forgeloop/runtime-state.jsonfor tooling
Every piece of that chain is a plain file in your repo. You can read it, diff it, discuss it in a PR.
./install.sh /path/to/target-repo --wrapper
cd /path/to/target-repo
./forgeloop.sh evalsThe eval suite tests the things that actually matter:
- does it pause when failure repeats?
- does it escalate correctly?
- does the runtime state stay consistent?
- does auth failover work?
- does it behave the same in different repo layouts?
On the v2 alpha track, there's also a full end-to-end proof that spins up the real dashboard and drives it with a browser:
./forgeloop.sh self-host-proofSee evals/README.md for details.
In the target repo:
./forgeloop.sh serve
./forgeloop.sh evals
./forgeloop.sh self-host-proof # Optional V2 alpha release proof
./forgeloop.sh kickoff "<one paragraph project brief>" # Fresh repo path
./forgeloop.sh plan 1
./forgeloop.sh build 10
./forgeloop.sh workflow listFresh repos now treat PROMPT_intake.md + kickoff as part of the normal lifecycle: checklist plan / build stop early when the repo still only contains bootstrap templates and point you back to the intake flow before any LLM work starts.
For continuous operation:
./forgeloop.sh daemon 300That daemon is interval-based. It does not watch git in real time. It periodically checks the repo and control files, then decides whether to plan, build, pause, deploy, or ingest logs.
Forgeloop ships a real-time dashboard on top of the same file-backed state, so you can see and steer live runs without reading raw files:
./forgeloop.sh serve # start the dashboard
./forgeloop.sh self-host-proof # verify it end-to-endWhat it gives you:
- Live state — runtime status, blockers, questions, and ownership, updating in real time via SSE
- Interactive controls — pause, resume, replan, answer questions, and launch one-off runs from the browser
- No extra infrastructure — no Phoenix, no database, no Node asset pipeline. Served directly by Elixir.
- Same source of truth — reads and writes the same repo-local files as the CLI and daemon
The dashboard also exposes a versioned API at /api/schema that the OpenClaw plugin uses. See docs/openclaw.md for the plugin integration.
If you are working inside this repo directly:
cd elixir
mix forgeloop_v2.serve --repo ..Add these anywhere in REQUESTS.md:
[PAUSE]— pause the daemon until removed[REPLAN]— run a planning pass before continuing[WORKFLOW]— managed daemon path: run one configured workflow target viaFORGELOOP_DAEMON_WORKFLOW_NAMEandFORGELOOP_DAEMON_WORKFLOW_ACTION(forceFORGELOOP_DAEMON_RUNTIME=bashto stay on the legacy daemon path)[DEPLOY]— runFORGELOOP_DEPLOY_CMD[INGEST_LOGS]— analyze logs into a new request
[PAUSE] may also be inserted automatically by Forgeloop when it escalates a repeated failure or blocker.
Forgeloop gives you three execution lanes depending on how structured your repo is:
- Checklist lane —
IMPLEMENTATION_PLAN.mdwith./forgeloop.sh plan|build(default) - Tasks lane —
prd.jsonwith./forgeloop.sh tasks(opt-in) - Workflow lane — native workflow packs with
./forgeloop.sh workflow ...(experimental)
The checklist lane is the default. The dashboard, daemon, and OpenClaw plugin all surface the checklist as the canonical backlog. The tasks lane is supported but separate. The workflow lane is still manual-first and experimental.
See docs/workflows.md for the workflow-pack contract.
- Drop-in — vendors into any existing repo. No infrastructure changes, no new services to run.
- Saves money — stops burning API tokens on infinite retry loops
- Reviewable — every state change is a plain file you can diff and discuss
- Safe defaults —
FORGELOOP_AUTOPUSH=false, conservative escalation thresholds, explicit opt-in for anything destructive - Provider-resilient — routes between Claude and Codex with automatic auth/rate-limit failover
- Isolation-ready — designed for disposable VMs and containers when you run full-auto
The runtime source of truth lives in:
bin/loop.shbin/forgeloop-daemon.shbin/escalate.shlib/core.shlib/llm.sh
The operator contract is documented in:
docs/runtime-control.mddocs/workflows.mddocs/sandboxing.md
| Version | Status | Runtime | Pin to it |
|---|---|---|---|
| v1.0.0 | Stable | Bash | git checkout v1.0.0 |
main |
V2 alpha / development | Elixir + Bash | git checkout main |
Pin to v1.0.0 when you want the proven public release for active project work. Use main when you want to deliberately evaluate the richer V2 alpha operator stack: service, HUD, OpenClaw seam, managed daemon path, and self-host proof.
Beta is still future work after parity and release hardening; see docs/release-tracks.md and docs/elixir-parity-matrix.md before treating main as anything stronger than an alpha track. If you are iterating on the v2 alpha launch story or public/operator visuals, read design.md too.
Typical stable → main evaluation path inside an installed repo:
./forgeloop.sh upgrade --from /path/to/Forgeloop-kit --force
./forgeloop.sh evals
./forgeloop.sh self-host-proof
bash forgeloop/tests/run.shFor the full stable-to-alpha posture, fallback guidance, rollback path, and review checklist, read docs/v1-to-v2-upgrade.md.
The v2 alpha track is built on an Elixir foundation in elixir/. It powers the live dashboard, the managed daemon, and disposable-worktree isolation — while the stable bash runtime stays available as a fallback.
Three Elixir surfaces ship today:
mix forgeloop_v2.serve --repo ..— the dashboard and API servicemix forgeloop_v2.daemon --repo ..— the managed daemon (checklist, workflows, deploy/ingest)mix forgeloop_v2.babysit build --repo ..— one-off runs in disposable git worktrees
All three surfaces read and write the same repo-local files. The Elixir layer does not introduce a separate database or state store.
Coexistence: bash and Elixir share the same ownership claim file (.forgeloop/v2/active-runtime.json). Running both as simultaneous active controllers is unsupported. Use FORGELOOP_DAEMON_RUNTIME=bash to stay on the legacy daemon path.
When v2 reaches feature parity, it will be tagged v2.0.0-beta.1. See elixir/README.md, docs/v2-roadmap.md, and docs/elixir-parity-matrix.md for the current scope.
.forgeloop/runtime-state.json is the machine-readable source of truth.
statusis the coarse operator state (running,blocked,paused,awaiting-human,recovered,idle)transitioncarries the detailed lifecycle step (planning,building,retrying,escalated,completed, etc.)surfacetells you which surface wrote the state (loop,daemon, etc.)modetells you which run mode is active (build,plan,tasks,daemon, etc.)
If you use auto-permissions / full-auto mode, treat the VM or container as the security boundary.
Disposable git worktrees are now part of the experimental self-hosting story in Elixir, but they are still a repo-internal hygiene boundary inside that VM/container, not a replacement for it.
- Guide:
docs/sandboxing.md - GCP runner helper:
ops/gcp/provision.sh
Quick provision example:
OPENAI_API_KEY=... ANTHROPIC_API_KEY=... \
ops/gcp/provision.sh --name forgeloop-runner \
--project <gcp-project> --zone us-central1-aForgeloop vendors into ./forgeloop and writes the control surfaces at repo root:
AGENTS.mdPROMPT_intake.mdPROMPT_plan.mdPROMPT_build.mdPROMPT_tasks.mdIMPLEMENTATION_PLAN.mdREQUESTS.mdQUESTIONS.mdSTATUS.mdCHANGELOG.mdsystem/knowledge/*system/experts/*
That gives agents and operators a consistent repo-local operating surface instead of ad hoc prompt glue.
These are real capabilities, but they are not the lead story.
Forgeloop includes Skills tooling (skillforge, sync-skills, repo-local skills/) so repeated workflows can become reusable procedures for Codex / Claude Code.
./forgeloop.sh sync-skills
./forgeloop.sh sync-skills --allSession hooks can load and capture durable repo-local knowledge:
./forgeloop.sh session-start
./forgeloop.sh session-endFor greenfield projects, start with the reusable repo-local intake prompt and stay checklist-first by default.
- Hand
PROMPT_intake.mddirectly to any LLM/agentic system, or - Render a shareable prompt file with:
./forgeloop.sh kickoff "<one paragraph project brief>"That generated prompt should produce docs/*, specs/*, and IMPLEMENTATION_PLAN.md by default. Ask for prd.json only when you intentionally want the tasks lane, and only seed workflow packs when you explicitly want the experimental workflow lane.
If the repo still only contains the installed bootstrap templates, ./forgeloop.sh plan and ./forgeloop.sh build now stop early with explicit guidance back to PROMPT_intake.md / kickoff instead of spending a low-signal checklist iteration.
If you want machine-readable task execution instead of the default markdown checklist:
Phase-1 note: this lane is still optional and is not the canonical backlog surfaced by the loopback service/UI yet.
./forgeloop.sh tasks 10Turn runtime logs into new requests:
./forgeloop.sh ingest-logs --file /path/to/logs.txtor configure [INGEST_LOGS] in REQUESTS.md for daemon-driven ingestion.
Install into another repo from this repo:
./install.sh /path/to/target-repo --wrapperIf the kit is already vendored:
./forgeloop/install.sh --wrapperUpgrade an existing vendored repo:
./forgeloop.sh upgrade --from /path/to/newer-forgeloop-kit --forceKey top-level paths in this repo:
bin/— loop runtime, daemon, escalation, sync, kickoff, ingestionlib/— shared runtime helpers and LLM routingdocs/— operator docsevals/— public proof suitetemplates/— installed repo surfacestests/— broader regression suiteops/gcp/— dedicated runner provisioning
Landing page: https://forgeloop.zakelfassi.com