The architect-loop Claude Code agent loop fuses research-backed architecture with cross-vendor autonomy: Claude Fable 5 acts as the architect — designing the spec, locking the gates, and judging build results — while GPT-5.5 Codex serves as the parallel builder and researcher, assembling code and running tasks without supervision. The loop runs on your flat-rate Claude Code and ChatGPT plans, no API keys, no token billing, and zero global install overhead. It enables a slice-based, judgment-driven agent workflow that standardizes how high-trust AI software is drafted, iterated, and merged — before you commit to building for real.
[[CONCEPT: Claude as architect, Codex as builder — discipline and speed locked together in one loop]]
What is the architect-loop Claude Code agent loop?
The architect-loop is a rigorous agent framework linking two skills: Claude Fable 5 as the architect, and GPT-5.5 Codex as the builder and researcher. Its architecture is simple but strict: architects design and judge, builders execute and report. The entire loop runs on ordinary paid plans for Claude Code (Fable) and ChatGPT (Codex) — you bring your own subscriptions, but you never worry about API keys, usage spikes, or accidental bills.
The workflow is governed by atomic “slices,” each split by Fable into 1–4 parallel “lanes,” each mapping to a disjoint file set. Before any builder starts, Fable writes specs and acceptance gates — gating test/criteria files are committed read-only, and any builder that tries to alter a gate file fails automatically. Builders get complete isolation: each runs in its own git worktree, with the loop enforcing parallelism but separating state and preventing cross-contamination. After building, Fable alone judges the results by running gate commands and reading the diff, then merges passing lanes. All state lives in the Git repo: no shadow memory, no leaking context.
Direct source: DanMcInerney/architect-loop.
Takeaway: The architect-loop Claude Code agent loop is a slot-in framework for safe, high-discipline AI agent workflows, built to run on everyday AI dev subscriptions — with a workflow boundary that’s easy to reason about.
How does Claude Fable work as the architect in the loop?
Claude Fable’s sole job is discipline: spec the work slice, define gates that freeze acceptance, and judge results in a fully fresh session before merging. Fable never writes code. Instead, it authors a text spec for one “slice” (fix, refactor, or feature), then splits that slice into 1–4 “lanes” — sets of files guaranteed to be disjoint. For each lane, Fable commits acceptance gates as read-only files: these can be any test, command, or checklist that expresses the intent and constraints of the change.
No builder can start work until the acceptance gates are locked. Crucially, if a builder attempts to edit a gate file, the slice fails immediately. This approach enforces clear up-front definition (no shifting requirements mid-flight) and guarantees that only results meeting the explicit spec can pass.
Once builders have reported their output, Fable resumes — in a new session — to judge. It doesn’t take build claims at face value (all builder claims are “hearsay”). It runs the gate commands directly and compares the result to the spec’s original intent, only merging what passes both automated and spec intent tests.
Takeaway: Fable enforces discipline, clarity, and repeatability by locking every spec and gate before the build — and by judging only with fresh eyes. No drift, no hidden context bleed, no silent merges.
What role does GPT-5.5 Codex play as the builder and researcher?
GPT-5.5 Codex is the hands and eyes: each builder spins up in its own git worktree and lane, building exactly and only what is in the spec for that lane. Each builder operates fully isolated — no shared memory, no side channels, no accidental leaks. Before touching code, a builder is required to “argue” with the spec: it must push back on ambiguities or gaps and refuse silent compliance (which would mean hidden errors). Silent agreement is considered a defect.
During the build, Codex handles everything: code generation, file edits, running prescribed commands, and all the autonomous web research needed to bridge knowledge gaps. At no point can Codex edit the acceptance gates (they are hard locked), and it cannot directly commit to the repo. Instead, raw results are presented back to the loop, which then waits for Fable judgment.
Concurrency is first-class: every lane gets its own Codex process, running in parallel, so a four-lane slice runs builds 4× faster — but with zero risk of race or interference.
Takeaway: Codex gets autonomy and full sandboxing, but cannot cross the boundaries set by Fable — leading to faster, safer, and more independently reliable agent builds.
How to install and run the architect-loop with Claude Code and Codex CLI today?
You can run the architect-loop Claude Code agent loop immediately, using only your current paid subscriptions (Claude Code for Fable, ChatGPT for Codex) — no new API keys, no per-token billing, and no global system install. The install pattern is strict: the loop installs to the current repo only (not a system-wide package). This means each project can localize its own agent workflow; no conflicts, no security cross-talk.
Setup requires four steps:
-
Provision subscriptions:
- Claude Code: any paid plan, required for Fable sessions.
- ChatGPT: pro plan required for Codex CLI. Both are flat-rate; usage has no per-token bill.
-
Install the Codex CLI:
- Install and authenticate Codex CLI for GPT-5.5, signed into your ChatGPT plan.
# Install Codex CLI (run as per GPT-5.5 docs)
pip install codex-cli
codex login
# Sanity check: codex version
-
Clone and install architect-loop in your target repo:
- Architect-loop installs in your repo, not globally.
git clone
cd architect-loop
# Follow any provided setup script or requirements.txt
-
Run a work block:
- Each block includes a short Fable session (judgment, not code-writing), followed by the spec, lane allocation, gates, builder dispatch, and judgment/integration cycle.
# From the repo root
./architect-loop run
# or the designated entrypoint as per repo docs
The workflow:
- Fable judges results from the previous work block
- Specs the next slice, splits into up to 4 lanes
- Commits the acceptance gates
- Spawns parallel Codex builders
- Waits for Codex results, then re-enters Fable judgment
Note on subscriptions:
You must have paid accounts — flat-rate, no API keys needed, no per-token surcharges. The loop design avoids new billing surprises by design.
Takeaway: Setup is repo-local and fast — as soon as your subs are active and you’ve cloned the repo, you’re running.
[[DIAGRAM: how Claude Fable specs and judges, while Codex builds in parallel in isolated lanes, all constrained by read-only gates, with state in Git only]]
What are the benefits of this cross-vendor agent loop for AI software development?
The architect-loop Claude Code agent loop delivers measurable advantages rooted in agent research:
- Efficiency: Slices split into parallel lanes mean up to 4× build concurrency with guaranteed isolation. No need to wait for serial loops.
- Cost control: Fixed-rate, existing Claude Code and ChatGPT subscriptions — never a surprise, never a spike, no new API keys.
- Provable modularity: Each build lane is disjoint (file boundaries are explicit), so builder errors or stuck runs can’t infect others.
- Acceptance gates: Locked, read-only gates enforce spec compliance. Defects are caught before merge, and passing tests alone aren’t enough — only intent-aligned diffs are allowed.
- Disciplined judgment: Only Fable merges, and only after isolated, cross-context review — so context drift and fatigue errors are sharply reduced.
- PRD feedback loop: If you’re still deciding what to build or want defensible requirements, the cited agent reports feed a living PRD before you commit downstream.
Takeaway: The cross-vendor architect-loop establishes a new standard: reliable, zero-incremental-bill agent loops for safely automating software delivery.
What are best practices and limitations when using the architect-loop framework?
Best practices:
- Draft precise, minimal specs and acceptance gates before dispatch. The more explicit they are, the less builder argument needed.
- Encourage builder “argument”: Codex should push back if the spec is underspecified (silent compliance hides defects).
- Keep Fable sessions short and focused: only judgment and spec creation, never code drafting.
- Rely on sandboxed git worktrees: Each lane’s full isolation is non-negotiable — never collapse lanes unless needed.
Current limitations:
- Only one work block runs at a time; true asynchronous “loops” await future workflow features.
- Fable does not write code — its session is judgment and spec only.
- Paid plans are compulsory for both Claude Code and ChatGPT; free-tier users can’t participate.
- Builders can’t edit (or even attempt to edit) acceptance gate files, so over-constraining gates will cause false fails.
- The only memory is the repo itself (short structured ToC, index files, git history); nothing stored outside the repo.
Takeaway: Use the framework for hard, uncertain software phases — but recognize that throughput bottlenecks and judgment boundaries are intentional, trading speed for auditability.
Closing
The architect-loop Claude Code agent loop marks a step change in how autonomous AI workflows compose and ship real software. By assigning disciplined architectural judgment to Claude Fable and parallel, sandboxed engineering to GPT-5.5 Codex — all on your existing subscriptions — it enables cross-vendor, evidence-backed delivery with zero token bill anxiety. You get slices that are gated, parallel, and safe; you get code judged in isolation, before integration; and you keep a defensible, auditable history of every step. For builders still exploring options, or teams that demand structure before scale, it’s an agent loop designed for trust first. Try it in your own repo, run a short block, and see where a gated, cross-vendor AI workflow can take your next project.
Top comments (0)