ChatPaper.aiChatPaper

クラウド・コードの探求:現代および未来のAIエージェントシステムの設計空間

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

April 14, 2026
著者: Jiacheng Liu, Xiaohan Zhao, Xinyi Shang, Zhiqiang Shen
cs.AI

要旨

Claude Codeは、ユーザーに代わってシェルコマンドの実行、ファイルの編集、外部サービスの呼び出しが可能なエージェント型コーディングツールである。本研究では、公開されているTypeScriptソースコードを分析し、さらに異なるデプロイメントコンテキストから同じ設計課題に異なる解答を与える独立オープンソースAIエージェントシステムであるOpenClawとの比較を通じて、その包括的なアーキテクチャを記述する。分析により、アーキテクチャの動機となる5つの人間的価値・哲学・ニーズ(人間の意思決定権限、安全性とセキュリティ、信頼性の高い実行、能力増幅、文脈適応性)を特定し、それらが13の設計原則を経て具体的な実装選択に至る経路を追跡する。システムの核心は、モデル呼び出し、ツール実行、繰り返しから成る単純なwhileループである。しかしコードの大部分はこのループを支える周辺システムに存在する:7つのモードとMLベース分類器を備えた許可システム、文脈管理のための5段階圧縮パイプライン、4つの拡張性メカニズム(MCP、プラグイン、スキル、フック)、作業ツリー分離を伴うサブエージェント委譲機構、追記型セッションストレージである。マルチチャネル個人用アシスタントゲートウェイであるOpenClawとの比較により、同じ設計課題がデプロイメントコンテキストの変化に応じて異なる建築的解答を生むことが明らかになった:アクション単位の安全性分類から境界レベルアクセス制御へ、単一CLIループからゲートウェイ制御プレーン内埋め込みランタイムへ、文脈ウィンドウ拡張からゲートウェイ全体の機能登録へ。最後に、近年の実証研究・建築学・政策文献に基づき、将来のエージェントシステムに向けた6つの未解決設計課題を提示する。
English
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 comprehensive architecture by analyzing the publicly available TypeScript source code and further comparing it with OpenClaw, an independent open-source AI agent system that answers many of the same design questions from a different deployment context. Our analysis identifies five human values, philosophies, and needs that motivate the architecture (human decision authority, safety and security, reliable execution, capability amplification, and contextual adaptability) and traces them through thirteen design principles to specific 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 mechanism with worktree isolation, and append-oriented session storage. A comparison with OpenClaw, a multi-channel personal assistant gateway, shows that the same recurring design questions produce different architectural answers when the deployment context changes: from per-action safety classification to perimeter-level access control, from a single CLI loop to an embedded runtime within a gateway control plane, and from context-window extensions to gateway-wide capability registration. We finally identify six open design directions for future agent systems, grounded in recent empirical, architectural, and policy literature.
PDF60April 18, 2026