Sandbox
@wquguru/harness-books

Books on Claude Code and Codex harness design

This repository contains two books about harness engineering: one focused on Claude Code, the other comparing Claude Code and Codex. The books describe the control plane, query loop, tools, permissions, context governance, recovery, and verification that keep an agent system bounded and accountable.

3,080 stars364 forksPythonUpdated 5mo ago
Who it's for

Builders who want to study how Claude Code and Codex organize agent work and local governance.

What it delivers

You can think about agent workflows as a control system instead of a loose prompt chain.

What it does

Claude Code design guide

Book 1 explains runtime structure, including prompt control, query loops, tool permissions, context budgeting, recovery, and multi-agent verification.

Claude Code vs Codex comparison

Book 2 compares how the two systems place control across prompts, loops, sandboxes, skills, hooks, and local rules.

Local build scripts

`tools/book-kit` builds the Honkit books and assembles the unified Pages site.

Locale-aware output

Each book has locale files and exported build output for the site and PDF flow.

How to get it

  1. 1Build the two locale-aware Honkit sites and then assemble the unified Pages site
    python3 tools/book-kit/build_honkit.py book1-claude-code
    python3 tools/book-kit/build_honkit.py book1-claude-code --locale en
    python3 tools/book-kit/build_honkit.py book2-comparing
    python3 tools/book-kit/build_honkit.py book2-comparing --locale en
    python3 tools/book-kit/build_pages_site.py

README

Harness Books

中文 README

Read Online About AgentWay

Two books on harness engineering. They pursue the same engineering question: once a code-writing model is placed inside terminals, repositories, permission systems, and team workflows, what keeps the overall system bounded, continuous, and accountable for consequences?

Harness Engineering: A Design Guide to Claude Code
Harness Engineering: A Design Guide to Claude Code
Read online · Download PDF
The Harness Design Philosophies of Claude Code and Codex
The Harness Design Philosophies of Claude Code and Codex
Read online · Download PDF

These books are not meant to walk line by line through the source code. They focus on how a harness organizes constraints and execution, and how an inherently unstable model can be folded into a sustainable engineering order. Prompt layering, query loops, permission decisions, context governance, failure recovery, multi-agent verification, local rules, and team institutions together form the organ system of a harness. The real danger is not that a model occasionally says something wrong, but that the system has no structure for handling consequences.

Core Claims

  • Harness engineering is about how constraint structures organize execution.
  • Once a code-writing model enters a real engineering environment, the main problem is no longer answer quality but behavioral consequences.
  • Prompts, tools, permissions, state, recovery, verification, and institutions are not accessories around the system. They are organs in the same control structure.
  • When comparing agent systems, the key question is not the feature checklist but where order is actually placed.
  • If a team cannot turn individual experience into reusable rules, it will struggle to turn an agent into a stable system.

What The Two Books Focus On

Book 1: A Design Guide to Claude Code

The first book uses Claude Code as the observation target and concentrates on runtime structure. Its concern is why a system eventually has to grow components such as a control plane, query loop, tool permissions, context governance, recovery paths, multi-agent verification, and team rules.

Start with Book 1 if these are the questions you care about:

  • Why harness engineering is not just prompt engineering at a larger scale
  • Why prompts are fundamentally part of the control plane rather than a chat box
  • Why model mistakes should be treated as a runtime norm rather than an exceptional event
  • Why multi-agent work and verification should not be blended into one vague mechanism
  • How a team can solidify personal experience into reusable engineering institutions

Book 2: Comparing Claude Code and Codex

The second book places Claude Code and Codex side by side and asks where each harness places order. One path starts from runtime discipline; the other starts from a more structured control layer. Both systems can work, but they distribute authority differently.

Start with Book 2 if you care more about system choice, architectural judgment, or what to learn when building your own harness:

  • What the biggest control-plane divergence is between Claude Code and Codex
  • How to align the roles of query loops, threads, rollouts, and state
  • What governance roles are played by permissions, sandboxes, and policy languages
  • How skills, hooks, and local rules encode organizational habits into the system
  • If you want to build your own harness, who to learn from first and which layer to study first

Suggested Reading Paths

  • Want the full frame first: read Book 1, then Book 2.
  • Already familiar with coding-agent tools and want the architectural split directly: start with Book 2.
  • Only want the conclusions: read Book 1 Chapter 9 plus Book 2 Chapter 7.
Full Table of Contents

Book 1 — Harness Engineering: A Design Guide to Claude Code

Book 2 — The Harness Design Philosophies of Claude Code and Codex

Want To Keep Practicing? Try AgentWay

AgentWay AgentWay is a related but separate practice platform. Harness Books explains control structures, engineering judgments, and architectural divergences. AgentWay is where these ideas continue into training paths, drills, project exercises, and agent PoCs.

Local Build

Build the two locale-aware Honkit sites and then assemble the unified Pages site:

python3 tools/book-kit/build_honkit.py book1-claude-code
python3 tools/book-kit/build_honkit.py book1-claude-code --locale en
python3 tools/book-kit/build_honkit.py book2-comparing
python3 tools/book-kit/build_honkit.py book2-comparing --locale en
python3 tools/book-kit/build_pages_site.py

Final output is written to dist/.


Keywords: Harness Engineering, Claude Code guide, Claude Code vs Codex, AI coding agent, control plane, query loop, agent recovery, agent verification, local governance, approval policy

Files in the repo

Repository payload12 top-level entries
  • .claude
  • .codex
  • .github
  • assets
  • book1-claude-code
  • book2-comparing
  • tools
  • .gitignore
  • AGENTS.md
  • CLAUDE.md
  • README.md
  • README.zh-CN.md

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More tutorials & guides

shareAI-lab/
learn-claude-code

Bash is all you need - A nano claude code–like 「agent harness」, built from 0 to 1

77k
luongnv89/
claude-howto
luongnv89/claude-howtoTutorials & Guides

A visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.

41k
agentskills/
agentskills
agentskills/agentskillsTutorials & Guides

Specification and documentation for Agent Skills

25k