A unified stack for agents that ship features overnight. Threads give you the structure, Ralph loops give you the autonomy, verification keeps it honest.
Two ideas are rewiring how engineers drive AI agents: Ralph Wiggum loops and thread-based engineering.
Ralph is the how-to for keeping an agent running by itself. Threads are the how-to for scaling and measuring that autonomy. Stitched together, they're a working system for building software without a human in the seat.
Thread-based engineering supplies the skeleton. Your mental model is threads: base, parallel, chained, fusion, big, and long-duration. Every thread type has its own job.
Ralph loops drive the L-threads. The stop hook pattern, the completion promise, and verification-first development turn long autonomous runs into something you can actually trust.
Verification is what keeps the whole thing standing. Without it, threads bail too early and loops grind forever.
Thread Types × Verification → Reliable Autonomous Work ↓Ralph Loops = Implementation of L-Threads ↓Result: Features shipping while you sleep
Boris Cherny's rule is one sentence: always give Claude a way to verify its work.
It shows up at every layer of the unified model:
Thread Type
Verification Method
Base
Manual review
P-Threads
Parallel reviews, consensus
C-Threads
Phase-by-phase validation
F-Threads
Compare multiple outputs
B-Threads
Sub-agent verification
L-Threads
Automated tests + stop hooks
One thing matters more than the others. The longer a thread runs, the more its verification has to run itself. Nobody reviews a 26-hour L-thread by hand. The system has to check itself.
Keep state outside the agent. This is especially important for L-threads:
## Progress: User Dashboard### Completed- [x] Set up test infrastructure- [x] Implement metrics API endpoint- [x] Create metrics display component### In Progress- [ ] Implement activity feed### Remaining- [ ] Add export functionality- [ ] Performance optimization
The agent rewrites this file while it works. If the context window fills up and the agent restarts, it reads the progress file and picks up where it stopped.
Any thread that touches UI needs screenshot-based verification on top of the test suite:
Workflow extension for UI work:1. Complete implementation2. Take screenshots of affected components3. Review each screenshot for visual issues4. Rename verified screenshots with "verified_" prefix5. Do NOT output completion promise yet6. Run one more loop to confirm all screenshots verified7. Only then output "complete"
That is what forces visual review. Claude has no way to skip the screenshot check and still call the work done.
Loom is an environment built for agents rather than humans. It wires Ralph loops together into reactive systems.
Level 1: Single Ralph loop (L-thread) Level 2: Multiple parallel Ralph loops (P-threads of L-threads) Level 3: Orchestrated chains of loops (B-threads containing L-threads) Level 4: Autonomous product systems (agents that ship, observe, and iterate)
At Level 4, agents:
Ship behind feature flags
Deploy without code review
Observe analytics
Decide if changes worked
Iterate automatically
This is the Z-thread endpoint. Zero human input. Full autonomy.
Cause: Impossible task or missing completion promise Fix: Set max iterations. Add explicit completion criteria. Make sure the agent knows when to output the promise.