DISCOVER THE FUTURE OF AI AGENTSarrow_forward

Claude Code Deobfuscated Source

calendar_todayAdded Apr 23, 2026
categoryDocs, Tutorials & Resources
codeOpen Source
TypeScriptNode.jsMulti-Agent SystemModel Context ProtocolAI AgentsCLIDocs, Tutorials & ResourcesDeveloper Tools & CodingEducation & Research ResourcesSecurity & Privacy

Deobfuscated TypeScript source code of Anthropic Claude Code CLI v2.1.76, restoring 1,884 files and 5,000+ modules, covering the complete tool system, multi-agent coordination, and TUI architecture, for educational and research purposes only.

This project is a reverse engineering achievement of Anthropic's official @anthropic-ai/claude-code v2.1.76, deobfuscating the ~12MB single-file bundled cli.js into 1,884 readable TypeScript/TSX source files (covering 5,066 bundled modules, totaling ~35MB).

The project fully exposes Claude Code's internal architecture design: including 40+ tool implementations (e.g., Bash, file read/write, LSP, WebFetch), 88+ slash command registries, a multi-agent coordination pattern based on coordinator/, and a TUI rendering mechanism built with React + Ink. At the build level, it reveals the engineering practices of using the Bun bundler combined with bun:bundle feature() for compile-time dead code elimination (DCE) and React Compiler for component optimization.

Feature gating is controlled via feature() macros, including PROACTIVE/KAIROS (proactive agent), AGENT_TRIGGERS (scheduled/remote agent execution), MONITOR_TOOL (real-time monitoring), and ABLATION_BASELINE (A/B testing). Some tools (REPLTool, SuggestBackgroundPRTool, Chrome MCP, sandbox-runtime) are restricted to USER_TYPE === 'ant' only.

The tool system follows a unified interface (Tool from Tool.ts), using Zod input validation with lazySchema() lazy initialization, canUseTool() permission hooks with caching, and concurrent file edit protection based on timestamp + content change detection. State management uses AppStateStore (Zustand-like reactive state) and QueryEngine (session/message history/compression management), with sessions persisted in JSONL format.

Note that this is an unofficial third-party restoration by kill136 (Wang Bingjie). It lacks source files for about 10 Anthropic internal-exclusive tools (e.g., REPLTool, TungstenTool, SuggestBackgroundPRTool, VerifyPlanExecutionTool) and some type definitions. The original entry URL claude-code-open now returns 404. It serves solely as an architecture research and secondary development reference, not as a standalone tool to replace the official CLI. The legal compliance of such deobfuscation/reverse engineering under Anthropic's ToS remains unclear.

Related Projects

View All arrow_forward

STAY UPDATED

Get the latest AI tools and trends delivered straight to your inbox. No spam, just intelligence.

rocket_launch