# Claude Code的设计空间：简单AI循环与复杂外围系统

- 来源：Rohan Paul (@rohanpaul_ai)
- 发布时间：2026-06-16 18:11
- AIHOT 分数：52
- AIHOT 链接：https://aihot.virxact.com/items/cmqgi0woi00q8slevuaklx97u
- 原文链接：https://x.com/rohanpaul_ai/status/2066826040186737066

## AI 摘要

论文分析Claude Code，其有效工作核心并非复杂AI大脑，而是简单AI循环——调用模型、执行已批准工具、回传结果、重复——被精心构建的外围系统（工具、安全、记忆、权限、恢复）包裹。作者研究公开TypeScript源码，主agent循环代码量极小，大量代码来自harness（常规软件），负责定义工具、权限、记忆及故障处理。上下文管理是主要设计挑战，采用多层压缩或总结旧信息避免模型空间耗尽。论文强调能运行shell命令和编辑文件的编码智能体不能等同于带插件的聊天机器人，每个动作都有副作用，需要明确边界约束。

## 正文

The paper is saying that Claude Code works well not because it has a complex AI brain， but because a simple AI loop is surrounded by a huge， carefully built system for tools， safety， memory， permissions， and recovery.

The authors studied the public TypeScript source and found that the main agent loop is very small： call the model， run approved tools， add results back， and repeat.

What takes up most of the system is the harness， meaning the regular software around the model that decides what tools exist， what actions are allowed， what gets remembered， and what happens when things fail.

They also show that context management is a major design problem， so Claude Code uses several layers to shrink or summarize older information before the model runs out of space.

autonomy does not remove infrastructure， it increases the burden on infrastructure.

A coding agent that can run shell commands and edit files cannot be treated like a chatbot with plugins， because every action has side effects and every side effect needs a boundary.

----

Link - arxiv. org/abs/2604.14228

Title： "Dive into Claude Code： The Design Space of Today's and Future AI Agent Systems"
