클로드 코드 탐구: 현재와 미래 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와의 비교를 통해 이의 포괄적인 아키텍처를 설명합니다. 우리의 분석은 해당 아키텍처의 동기가 되는 다섯 가지 인간의 가치, 철학, 필요 조건(인간의 결정 권한, 안전 및 보안, 신뢰할 수 있는 실행, 능력 증폭, 맥락 적응성)을 식별하고, 이를 13가지 설계 원칙을 통해 구체적인 구현 선택으로 추적합니다. 시스템의 핵심은 모델을 호출하고 도구를 실행하며 이를 반복하는 단순한 while-loop입니다. 그러나 코드의 대부분은 이 루프를 둘러싼 시스템, 즉 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.