Claude Harness
Claude Harness provides interactive source code analysis, guided walkthroughs, and deep architectural exploration of Anthropic's Claude Code CLI across 1,900+ files.
Last verified:
What is Claude Harness?
Claude Harness is an interactive source code analysis tool that provides guided walkthroughs of Anthropic's official Claude Code CLI tool. It offers a deep dive into the internals of Claude Code, analyzing over 1,902 source files and 514k+ lines of TypeScript code. Claude Harness breaks down Claude Code's architecture into 35 core modules, including agent-loop.ts, utility functions, UI components, services, tool implementations, and slash commands.
Key features include comprehensive architecture visualization showing how the CLI entry point connects to the LLM engine, detailed deep dive articles on specific systems like the query engine and tool system, and code examples from actual Claude Code source files. Claude Harness tracks an analysis roadmap covering foundation and startup, agent core loop, tool library, and terminal UI rendering.
Claude Harness is designed for software engineers, AI researchers, and developers who want to understand how Claude Code works under the hood, particularly those building their own AI coding tools or studying agentic architecture patterns.
Claude Harness pricing
Pricing model: Freemium
The website does not display any pricing information. The tool appears to be freely accessible as there are no paywalls, subscription plans, or pricing tiers mentioned on claude-harness.dev. No free tier limitations or paid plan features are specified.
Claude Harness pros
- Analyzes 1,902+ source files comprehensively
- Covers 514k+ lines of TypeScript code
- Identifies 35 core modules clearly
- Shows actual source code examples like agent-loop.ts
- Provides interactive source code analysis
- Offers guided walkthroughs of Claude Code internals
- Visualizes architecture from CLI entry to LLM engine
- Deep dives into query engine lifecycle
- Explains 40+ tool system with permission evaluation
- Tracks analysis roadmap with clear phases
- Breaks down 140 Ink UI components
- Documents 50+ slash command implementations
- Shows async-generator-driven streaming query loop
- Explains six-layer permission evaluation pipeline
- Free access to Claude Code source analysis
Claude Harness cons
- Only analyzes Claude Code, not other AI tools
- No pricing information available on website
- No FAQ section visible on the site
- Limited to TypeScript/TypeScript-based codebase
- No downloadable documentation or PDFs
- No community forum or discussion platform
- Analysis may become outdated as Claude Code updates
- No interactive Q&A feature for specific questions
Frequently asked questions about Claude Harness
What is claude-harness?
claude-harness is an interactive source code analysis tool that provides guided walkthroughs of Anthropic's official Claude Code CLI tool. It performs deep dives into the internals of Claude Code, analyzing over 1,902 source files and 514k+ lines of TypeScript to help users understand how the AI CLI is built.
How many source files does the tool analyze?
The tool analyzes 1,902+ source files containing 514k+ lines of TypeScript code across 35 core modules including utils, components, services, tools, and commands.
What core modules are covered?
The tool covers 35 core modules including utils (564 files, 181.0k LOC), components (389 files with ~140 Ink UI components, 81.9k LOC), services (130 files, 53.8k LOC), tools (184 files with ~40 tools, 51.0k LOC), and commands (207 files with ~50 commands, 26.7k LOC).
What deep dive articles are available?
Three deep dive articles are available: (1) The Big Picture covering how a 512,000-Line AI CLI is built from CLI entry point to LLM engine, (2) The Query Engine tracing the complete lifecycle of a conversation through the async-generator-driven streaming query loop, and (3) The Tool System explaining how AI safely interacts with the outside world through 40+ tools with a six-layer permission evaluation pipeline.
What is the analysis roadmap?
The analysis roadmap has four phases: (01) Foundation & Startup covering CLI entry, config loading, and auth flow; (02) Agent Core Loop covering prompt building, API interaction, and tool scheduling; (03) Tool Library covering file operations, Bash execution, and AST analysis; (04) Terminal UI Rendering covering Ink component tree, streaming output, and interaction handling.
Who is this tool for?
This tool is for software engineers, AI researchers, and developers who want to understand Claude Code's architecture. It's especially valuable for developers building their own AI coding tools, those studying agentic architecture patterns, and anyone interested in how large-scale AI CLIs are constructed.
Is the source analysis updated?
Yes, the website shows v0.2.29 source analysis is updated, indicating the tool tracks Claude Code version updates and maintains current analysis of the codebase.
How does the agent loop work?
The agent loop follows three steps: (1) Gather context and tools via getAvailableTools(ctx), (2) Call Claude API with callClaude(ctx, tools), and (3) Handle tool calls by executing them with executeTools(ctx, response.calls) or return the response text if no tool calls are needed. This runs in an infinite loop until completion.
What is the tool system's permission evaluation?
The tool system includes a six-layer permission evaluation pipeline that governs how the 40+ tools in Claude Code safely interact with the outside world, from type definitions through concurrent execution to permission checks.
Is there a cost to use claude-harness?
The website does not display any pricing information, paywalls, or subscription requirements. The tool appears to be freely accessible for interactive source code analysis of Claude Code.