Anatomy of /goal loops: a Ralph loop plus a verifier judge, doable in ~20 lines with Agents SDK
RobertTLange · x · 2026-11-28
RobertTLange breaks down how /goal loops in Codex, Claude Code and Pi work: it's just a Ralph loop plus a verifier judge. The goal is persisted and re-read every turn, a worker acts (edit code, run checks), then the harness runs a judge/verifier agent against the target and feeds failure reasons back into the next turn until met or abandoned via token budget/iteration caps. The bare Ralph loop simply reuses the same prompt every turn. He shows the whole mechanism can be built in 20 lines with the OpenAI Agents SDK, with sample worker/auditor agent code.
More from coding & agent
- Codex cuts Responses API data usage by ~80%, a 7.48MB thread now costs 930KB — charliermarsh · 2026-11-28
- Developer ditches 10 tmux Claude Code sessions for Grok Bots 'manager' workflow — JustinPBarnett · 2026-11-28
- Dev's Neon audit of 40 days of Claude logs: 'a third of commits were guardrails', removal gave 4x throughput — nptacek · 2026-11-28
- After testing many 'brain' solutions, Notion plus MCP makes the best universal context store — eptwts · 2026-11-28
- ARTEX: Hundreds of CISOs Draft Agentic Offensive Security Framework in 4 Days — cyb3rops · 2026-11-28
- ElevenLabs shows how to build outbound voice agents that cut healthcare no-shows — Aiden_Tech_Ai · 2026-11-28