Get Free Shipping on orders over $49
Loop Engineering with Claude Code : Build verifiable AI agent loops with explicit contracts, durable state, and a path to graphs - Thomas De Vos

Loop Engineering with Claude Code

Build verifiable AI agent loops with explicit contracts, durable state, and a path to graphs

By: Thomas De Vos

eBook | 23 December 2026

At a Glance

eBook


RRP $54.99

$52.79

or 4 interest-free payments of $13.20 with

 or 

Available: 23rd December 2026

Preorder. Download available after release.

Build secure, verifiable AI agent loops with Claude Code using explicit contracts, durable state, independent verification, recovery, budgets, and a practical path from bounded loops to production graphs.

Key Features

  • Build bounded Claude Code loops with explicit contracts and stop conditions
  • Add durable state, independent verification, recovery, and budget controls
  • Build PatchPilot, a repository-repair case study, into bounded loops and explicit graphs

Book Description

Persistent AI agents need more than prompts and retries. They need explicit goals, inspectable state, trustworthy context, enforceable policies, independent verification, recovery paths, and clear human ownership. Loop Engineering with Claude Code shows how to design these controls as one coherent operating model. You will start by defining an eight-field loop contract covering trigger, goal, context, action, verifier, state, policy, and stop condition. Through the cumulative PatchPilot case study, you will turn that contract into goal-based, time-based, and proactive Claude Code loops; add selective context retrieval, durable memory, tools and MCP, reusable skills, hooks, checkpoints, evals, and budget-aware recovery; then introduce specialised agents and programmatic orchestration with the Claude Agent SDK. The final chapters show how to run loops as operational services, recognise when branching and approvals require an explicit graph, and establish ownership, rollout controls, telemetry, and governance. By the end, you will be able to design agent loops that record inspectable evidence for continuation, stopping, retries, recovery and escalation to a human.

What you will learn

  • Write an explicit eight-field contract for a Claude Code loop
  • Compile selective, inspectable context for each agent run
  • Design durable memory with provenance and poisoning defences
  • Secure tools, MCP access, permissions, and network boundaries
  • Build resumable state, checkpoints, and independent verification
  • Create eval suites and promote improvements without overfitting
  • Control retries, rollback, escalation, and autonomy budgets
  • Refactor complex loops into explicit, governable graphs

Who this book is for

This book is for software engineers, platform engineers, AI application engineers, technical leads, and engineering managers who use coding agents and want to design controlled,longer-running agent workflows. Readers should be comfortable with Git, terminal commands, tests, pull requests, and reading Python. Familiarity with Claude Code or another coding agent is useful; TypeScript appears selectively, while the main examples use Python.

on

More in Artificial Intelligence

AI That Pays for Itself - Christopher Edwards

eBOOK

The AI Advantage - Christopher Sappenfield

eBOOK

RRP $14.29

$12.99

The Fifth Revolution - Matthew Byrne

eBOOK

RRP $17.59

$15.99

Crunch Time : Career Pathways in the Age of AI - Illah Nourbakhsh

eBOOK