Reading Group July 2026 - Loop Engineering

This session provides an in-depth exploration of Loop Engineering, a paradigm shift from manual AI prompting to designing autonomous systems that orchestrate AI agents. Speakers share practical experiences, from building production-grade platforms with automated code generation and adversarial AI reviews to experimental loop structures and foundational infrastructure layers. Key discussions address challenges like managing token costs, preventing agent chaos, and implementing robust verification mechanisms for industrializing software development.

5 min read
Reading Group July 2026 - Loop Engineering
source: https://www.youtube.com/watch?v=-DrnzIBASbg

This session explored the paradigm shift towards Loop Engineering, moving beyond turn-by-turn prompting to designing autonomous systems that orchestrate AI agents. The discussion emphasized industrializing software development by building sophisticated control systems that discover work, delegate tasks, verify results, persist state, and make decisions autonomously.

Evolution of AI Engineering Paradigms

Sparsh Jain outlined the progression of AI interaction and development:

  • Prompt Engineering: Initial focus on defining prompts for basic input-output. Problems arose with complex workflows.
  • Context Engineering: Providing models with tools and instructions, aiming for automated software development, but still requiring human verification at each turn.
  • Harness Engineering: Equipping models with external environments and scaffolding (like Claude Code) to perform cognitive planning and generate full features. Still, human verification after each turn was necessary.
  • Loop Engineering: The current frontier, where the feedback loop itself becomes intelligent, capable of verifying and optimizing outcomes, leading to fully automated feature generation and software factories. The shift moves verification from humans to the system’s feedback loop.

Real-World Application: Arthur’s Automated Development Journey

Arthur Coleman shared his extensive experience building a production-grade platform using AI agents since January 1st, resulting in 109,895 lines of code primarily written by Claude. His journey evolved through several stages:

  • Initial Approach: Simple vibe coding led to immediate issues with regression, as Claude would break existing code while fixing new requests.
  • Harness Evolution: Incremental additions included regression testing, architectural plans, validation tests (e.g., ensuring variables weren’t hardcoded), and formal ticket management. A significant challenge was epics growing unexpectedly due to AI errors.
  • QA Platform Development: Arthur built a comprehensive QA harness, integrating various open-source code packages for maintainability and quality control across development steps. Initial deployment of this harness, however, broke his push process, highlighting integration challenges.
  • Adversarial AI Review: A key innovation was implementing a “dialectic” review process where Gemini adversarially reviews Claude’s code for architectural and implementation details, followed by Fable for big-picture assessment, leading to significantly better code quality.
  • Challenges & Optimization Goals: Despite a 14-step automated process, it remained painful and error-prone, requiring extensive manual intervention. Arthur aims for a self-evolving platform. His primary optimization goal is “code right first time, every time,” alongside other quality metrics like instrumentation, adherence to hexagonal and miso-level architectures, clean code, documentation, and self-checking mechanisms.
  • Lessons Learned: Clearly define optimization targets and “quality”; identify and track failure modes; leverage existing components; create detailed plans with clear success metrics and enforcement mechanisms; anticipate multiple loops and the surge of QA tickets during loop development.

Experimental Approaches: Valdimar’s Toy Loops

Valdimar Eggertsson presented his experiments automating human-in-the-loop tasks using open-code (an open-source Claude-like system) on the Deep Software Engineering benchmark (real GitHub issues):

  • Coding Agents as Controllers: He views coding agents as controllers steering a system towards a goal, making observations, receiving test feedback, and taking actions.
  • Inner Loops: Implemented a preparation/exploration phase where a permission-locked agent reads the repository and writes a machine-readable plan. This was followed by an implementation loop of repairing, verifying, and reviewing using an independent reviewer agent.
  • Outer Loops: An “outer loop” was conceptualized to automate the entire process: a webhook listens for GitHub issues, triggering the coding agent loop. An audit agent discovers issues on a schedule and persists learnings for continuous improvement.
  • Key Takeaways: Emphasized independent verification/review, machine-readable plans, and machine-readable tests/goals for effective loop engineering.

Building Blocks for Loop Infrastructure: Sparsh’s Insights

Sparsh Jain highlighted the foundational layers necessary for robust loop-based infrastructure:

  • Observability Layer: Provides both zoomed-out and zoomed-in views of system operations, enabling agents to understand current states.
  • Evaluation (Eval) Layer: Crucial for measuring system improvement over time, communicating metrics in an LLM-friendly way.
  • Looping Infrastructure: Built on top of observability and eval layers, initially focusing on LLM-based inner loops and progressing to deterministic outer loops.
  • Pitfall: More agents do not automatically lead to better output; the quality of the eval layer is paramount. Strong “rebuttal variants” (agents verifying assumptions upfront) can significantly reduce downstream errors, even if it incurs higher initial token costs.

Open Discussion: Token Costs and Agent Stability

The session concluded with an open discussion on critical challenges:

  • Token Cost Debate: A major concern given the potential for agents to run uncontrolled. Suggestions included using cheaper open-source models (e.g., DeepSeek Flush), carefully configuring loop breaking conditions, and monitoring token usage per workflow (SLAs/SLIs). It was noted that while costs can be high, the value derived often justifies it, especially when considering automated verification steps like preliminary assumption rebuttals that prevent costlier downstream failures.
  • Preventing Agent Chaos: Strategies included limiting the number of agents per layer (e.g., max two for frontend, backend, database) to prevent generative technology from spiraling into confusion. Emphasizing clear scaffolding and domain-specific prompt engineering (e.g., for a real estate agent) helps constrain agent behavior. Human intervention remains crucial for highly complex tasks where LLMs might hallucinate or produce convincing but incorrect reports.
  • Claude’s goal Command: The goal command in Claude Code potentially offers a built-in feature for defining and verifying specific objectives, often involving smaller sub-agents for verification. While useful for daily tasks, it might not fully encompass persistent state and continuous learning required for advanced loop engineering.

Share post

Stay In The Loop! Subscribe to Our Newsletter.

Get updates straight to your inbox. No spam, just useful content.

Recommended for You

Field Guide to Fable — Thariq Shihipar, Anthropic

Field Guide to Fable — Thariq Shihipar, Anthropic

Thariq Shihipar from Anthropic introduces Fable, their newest model, as a major leap forward, emphasizing "capability overhang" where tool use unlocks unprecedented intelligence. He provides a "field guide" on working with Fable, discussing evolving prompt engineering, advanced tool interactions (like HTML reports), and strategies for identifying project unknowns. He concludes by challenging the necessity of traditional tradeoffs, advocating for ambitious development that is both good, fast, and cheap, and urging AI engineers to prove the transformative power of AI.

Build Agents That Run for Hours (Without Losing the Plot) — Ash Prabaker & Andrew Wilson, Anthropic

Build Agents That Run for Hours (Without Losing the Plot) — Ash Prabaker & Andrew Wilson, Anthropic

Explore advanced techniques for building long-running AI agents, moving beyond simple loops. Learn why self-evaluation fails and adversarial evaluators succeed, how to manage context with structured handoffs instead of just compaction, and how to use negotiated 'sprint contracts' and detailed rubrics to build and test complex, full-stack applications autonomously.