File 2604.14228, required reading
Dive into Claude Code: The Design Space of Today's and Future AI Agent Systems
Jiacheng Liu, Xiaohan Zhao, Xinyi Shang, Zhiqiang Shen
In brief
A teardown of Claude Code's architecture from its public source, compared with two open-source agent systems, OpenClaw and Hermes Agent.
The paper, in plain English
The authors analyze Claude Code's publicly available source and compare it with two open-source agent systems, OpenClaw and Hermes Agent, which answer many of the same design questions.
They identify five values that drive the architecture: human decision authority; safety, security and privacy; reliable execution; capability amplification; and contextual adaptability. These are traced through thirteen design principles down to implementation choices.
The core is a simple while-loop: call the model, run tools, repeat. Most of the code lives around that loop: a permission system with seven modes and an ML-based classifier, a five-layer compaction pipeline for context, four extensibility mechanisms (MCP, plugins, skills and hooks), subagent delegation, and append-oriented session storage.
Across systems, the same questions get different answers: Claude Code emphasizes per-action safety, OpenClaw perimeter-level access, and Hermes per-action approvals across many surfaces. The paper ends with six open design directions.
How to apply it
- 1.Keep the agent loop boring. Put your engineering effort into permissions, context compaction and extension points.
- 2.Decide early whether safety is per action or at the perimeter; it shapes your whole UX.
- 3.Treat session storage as append-only so runs are auditable and resumable.
- 4.Use the thirteen principles as a design review checklist for your own agent.
Key results
Quoted from the abstractThe core of the system is a simple while-loop that calls the model, runs tools, and repeats.
Most of the code, however, lives in the systems around this loop: a permission system with seven modes and an ML-based classifier, a five-layer compaction pipeline for context management, four extensibility mechanisms (MCP, plugins, skills, and hooks), a subagent delegation and orchestration mechanism, and append-oriented session storage.
Claude Code emphasizes per-action safety, OpenClaw emphasizes perimeter-level access, and Hermes renders per-action approvals across many surfaces.
Original abstractShowHide
Claude Code is an agentic coding tool that can run shell commands, edit files, and call external services on behalf of the user. This study describes its architecture by analyzing the publicly available source code and comparing it with two independent open-source AI agent systems, OpenClaw and Hermes Agent, that answer many of similar or even the same design questions. Our analysis identifies five human values, philosophies, and needs that motivate the architecture: human decision authority, safety, security, and privacy, reliable execution, capability amplification, and contextual adaptability. We then trace them through thirteen design principles to implementation choices. The core of the system is a simple while-loop that calls the model, runs tools, and repeats. Most of the code, however, lives in the systems around this loop: a permission system with seven modes and an ML-based classifier, a five-layer compaction pipeline for context management, four extensibility mechanisms (MCP, plugins, skills, and hooks), a subagent delegation and orchestration mechanism, and append-oriented session storage. Comparisons with OpenClaw and Hermes Agent show that the same design questions produce different answers across three deployment contexts. Claude Code emphasizes per-action safety, OpenClaw emphasizes perimeter-level access, and Hermes renders per-action approvals across many surfaces. At the runtime layer, Claude Code uses a single CLI loop, OpenClaw embeds the runtime within a gateway control plane, and Hermes uses one process whose role is set by its entry point. At the context and extension layer, Claude Code extends the context window, OpenClaw registers gateway-wide capabilities, and Hermes provides pluggable memory and model backends. We finally identify six open design directions for future agent systems, grounded in recent empirical, architectural, and policy literature.
Ask the paper
Questions are answered from the full text, with the passages quoted. This goes live once the AI key is connected; until then you'll get a note saying so.
Ask a question about Dive into Claude Code: The Design Space of Today's and Future AI Agent Systems. Answers will come from the full paper and quote the passages they use.
Filed nearby
- 2609.2423421 Sep 2026The Work Behind Delegation: A Framework for Supervising AI Coding AgentsDevelopers increasingly supervise delegated work from coding agents. The paper offers a framework for the work involved in that supervision.Coding agents3 citedCoding agents21 Sep 20263
- 2607.019042 Jul 2026AI Writes Faster Than Humans Can Review: A Longitudinal Study of an Enterprise 2x MandateA case study of an enterprise mandate to double merged PRs per engineer with AI, followed over time.Coding agents5 citedCoding agents2 Jul 20265
- 2604.2077922 Apr 2026SWE-chat: Coding Agent Interactions From Real Users in the WildSWE-chat is a living dataset of almost 18,000 real coding-agent sessions from open-source developers, with code authorship tracked between human and agent.Coding agents75 citedMust-readCoding agents22 Apr 202675