本文由 AI 分析生成
建立時間: 2026-03-31 來源: https://x.com/AlchainHust/status/2038944798816505991
Summary
A second analysis of the Claude Code source code leak (same event as the YukerX thread), focused on harness engineering as a discipline. The author’s conclusion: Claude Code’s quality is 60% model capability, 40% harness engineering. Key systems examined include the four-layer permission pipeline, a memory system that deliberately never stores code facts (only user preferences), 9-segment structured context compression, and a multi-agent swarm with mailbox-based async communication running in git worktrees.
對 Claude Code 源碼洩露的第二篇分析(與 YukerX 文章記錄同一事件),聚焦於 harness engineering 作為一門學科。作者結論:Claude Code 的品質 60% 來自模型能力,40% 來自 harness 工程。重點考察了四層權限管道、刻意從不儲存程式碼事實(只存使用者偏好)的記憶系統、9 段結構化上下文壓縮,以及基於郵箱異步通信在 git worktrees 中運行的多 agent 蜂群。
Key Points
- Permission pipeline: 4 layers — existing rules, low-risk skip, read-only whitelist, then Claude Sonnet (temperature=0) safety classifier; circuit breaker after 3 consecutive or 20 total denials
- Memory deliberately excludes code: “code changes, but memories don’t auto-update” — storing code locations creates stale misguidance; only human preferences and judgments are stored
- autoDream: triggers when >24h since last consolidation AND >5 new sessions accumulated; background agent distills session transcripts
- Context compression: 9-segment structured extraction; user messages MUST be preserved completely because any correction in message 3 affects all subsequent behavior
- Multi-agent: each agent has a mailbox file for async communication; permission requests bubble up to leader rather than interrupting user; each agent works in isolated git worktree
- Internal vs. external: internal build has explicit anti-false-claim instruction (“test failed = say it failed”), Verification Agent A/B test, no code comments by default
- Easter egg: src/buddy/ directory contains an unreleased virtual pet system — 18 species, 6 eye styles, full rarity system; code comment: “Mulberry32, good enough for picking ducks”
Insights
The “never store code facts in memory” design decision is the most counter-intuitive but logically sound choice: memories are persistent across sessions but code is not. Storing “function X is in file Y line 30” creates a time-bomb. The principle — memory stores human judgment, code facts are always read from source — is a template for any long-lived agent system where the environment changes faster than the memory update cycle.
Connections
Raw Excerpt
“Claude Code好用,60%靠模型能力,40%靠harness工程。模型能力决定了它能不能做,harness决定了它做得好不好、稳不稳、安不安全。”