Claude Code Source Leaked: 12-Layer Harness Architecture Breakdown

What Happened On the night of March 31, 2026, the complete internal source code of Claude Code v2.1.88 was leaked to GitHub. This wasn’t a routine open-source release. While Claude Code is publicly distributed, the published package ships a single bundled file. The internal TypeScript source was never meant to be public. What leaked was the complete internal source — 40+ tool definitions, multi-agent coordination, memory systems, permission controls, and more. ...

2026年4月1日 · 4 分钟 · BeastXA

Claude Code 源码泄露全解析:12 层 Harness 架构拆解

发生了什么 2026 年 3 月 31 日深夜,Claude Code v2.1.88 的完整内部源码被泄露到 GitHub。 Claude Code 对外发布的是打包后的单文件,内部 TypeScript 源码从未公开。这次泄露的是完整的内部源码,包含 40+ 工具定义、多 Agent 协作架构、记忆系统、权限控制等核心实现。 泄露后 24 小时内,相关讨论在开发者社区迅速发酵,引发了广泛关注。 这是 AI 编程工具领域迄今为止最大规模的源码泄露事件。 源码里有什么:12 层 Harness 架构 Claude Code 的核心不是模型本身,而是围绕模型构建的 Harness(线束)工程。源码揭示了 12 层递进式架构,每一层都在基础 Agent 循环之上叠加生产级能力: 第 1 层:工具系统(Tool System) 源码中定义了 40+ 工具,远超公开文档: 工具类别 包含 说明 文件操作 FileRead/FileWrite/FileEdit 基础读写编辑 搜索 Grep/Glob/WebSearch/WebFetch 本地+网络搜索 执行 Bash/PowerShell/REPL 命令执行 Agent AgentTool/TaskCreate/TaskStop 子 Agent 管理 团队 TeamCreate/TeamDelete/SendMessage 多 Agent 协作 MCP MCPTool/McpAuth/ListMcpResources MCP 协议集成 计划 EnterPlanMode/ExitPlanMode 规划模式切换 技能 SkillTool/ToolSearch 技能加载和搜索 每个工具都有完整的权限控制、输入校验和错误处理。 ...

2026年4月1日 · 2 分钟 · BeastXA