A systematic learning and teaching project on coding agent harness engineering, built from public documentation, peer-reviewed papers, open-source teaching projects, and clean-room analysis.
This project contains NO Anthropic private/leaked source code. It is built solely from public documentation, open-source teaching projects, academic papers, and clean-room reimplementation reasoning.
This project studies the engineering structure of coding agents like Claude Code, Codex, and OpenCode. It is not a reimplementation of any product. It is a learning resource that covers the full harness engineering design space:
Agent Product = Model (intelligence) + Harness (operational environment)
Harness = Tools + Knowledge + Observation + Action Interfaces + Permissions
- DO: Read and learn from official public documentation, open-source teaching projects, academic papers, and personal project experience.
- DO: Write clean-room teaching examples that demonstrate harness concepts.
- DO NOT: Copy, use, or disseminate any private/leaked/patched/broken source code from Anthropic or any other vendor.
- DO NOT: Learn from or reference repositories labeled as "leaked source", "unlocked enterprise", "crack", "bypass", or "patched binary."
- DO NOT: Claim this project represents Claude Code internals.
docs/00-overview.md # What is harness engineering?
│
├── docs/01-agent-loop.md # The while-loop
├── docs/02-tool-use.md # Tool registry & executor
├── docs/03-permission-and-sandbox.md # Permission guard & sandbox
├── docs/04-context-management.md # Token budget & compaction
├── docs/05-memory-system.md # Long-term memory
├── docs/06-mcp-protocol.md # MCP client/server
├── docs/07-skill-loading.md # SKILL.md & progressive disclosure
├── docs/08-hooks-and-lifecycle.md # Hook system
├── docs/09-subagents-and-worktree.md # Subagent & isolation
├── docs/10-trace-and-observability.md # Audit log & debugging
│
└── docs/11-cty-cli-case-study.md # Real project mapping
Each doc chapter covers: core concepts → engineering structure → minimal implementation → common pitfalls → mapping to cty-cli → interview talking points.
claude-code-harness-engineering-skill/
SKILL.md # Agent Skill format — when/how to use this skill
README.md # This file
docs/ # 12 technical deep-dive chapters
00-overview.md
01-agent-loop.md
02-tool-use.md
03-permission-and-sandbox.md
04-context-management.md
05-memory-system.md
06-mcp-protocol.md
07-skill-loading.md
08-hooks-and-lifecycle.md
09-subagents-and-worktree.md
10-trace-and-observability.md
11-cty-cli-case-study.md
examples/ # Clean-room teaching examples (Python)
minimal_loop.py # Minimal agent loop
tool_registry.py # Tool registry & dispatch
path_guard.py # Path permission guard
memory_jsonl.py # JSONL-based memory
skill_loader.py # Progressive skill loading
mcp_tool_stub.py # MCP tool protocol stub
checklists/ # Design, security, and interview checklists
coding-agent-design-checklist.md
security-checklist.md
memory-checklist.md
mcp-checklist.md
interview-talking-points.md
references/ # Source catalog and reading notes
source-notes.md # Actual reading notes from research phase
open-source-projects.md # Categorized project/paper reference list
.gitignore
cty-cli is my personal coding agent CLI project. This skill serves as a companion learning resource:
- Read
docs/11-cty-cli-case-study.mdfor a read-only mapping analysis: what cty-cli has implemented, what can be strengthened, and future directions. - Use the checklists to audit cty-cli's design decisions.
- Study the examples to understand each harness module in isolation before integrating it into cty-cli.
This project does not modify cty-cli source code. It is a separate, independent learning project.
This project is built from the following public sources (see
references/source-notes.md for detailed reading notes):
- learn-claude-code — Primary reference: 20-lesson progressive harness engineering curriculum
- Liu et al. (2026) — "Dive into Claude Code: The Design Space of Today's and Future AI Agent Systems" (arXiv:2604.14228)
- Chatlatanagulchai et al. (2025) — "On the Use of Agentic Coding Manifests" (arXiv:2509.14744)
- Saha et al. (2026) — "Under the Hood of SKILL.md: Semantic Supply-chain Attacks" (arXiv:2605.11418)
- Holzbauer et al. (2026) — "Context Matters: Repository-Aware Security Analysis of the Agent Skill Ecosystem" (arXiv:2603.16572)
Full reference catalog: references/open-source-projects.md.
MIT License.
This project is an independent learning resource. It is not affiliated with, endorsed by, or sponsored by Anthropic PBC, OpenAI, Google, or any other organization whose products are discussed. All trademarks belong to their respective owners.