Claude Code, the agent harness
📖 4 min readUpdated 2026-04-18
Claude Code is Anthropic's official CLI agent. Claude, packaged with a harness that handles tool use, MCP, permissions, hooks, skills, and memory. It's the canonical starting point for autonomous work.
What it is, technically
A terminal application. You run claude in any directory; you get an interactive session with Claude (or automation-ready non-interactive mode). It has:
- A permission system for tool use
- Built-in tools (Read, Write, Edit, Bash, Glob, Grep, etc.)
- MCP client support (configure servers, call their tools)
- Hooks for event-driven automation
- Skills (named, invokable prompts)
- Persistent memory across sessions
- Sub-agent delegation
- Headless mode (for scripts, cron, CI)
Why it's the canonical harness
- It's maintained by the model maker. Tool-use changes in Claude ship with matching harness changes.
- The permission model is real. Not a checkbox, a structured allow/deny system that plays well with autonomy.
- MCP is first-class. Add an MCP server, it just works.
- Hooks and skills are composable. You can build sophisticated workflows without leaving the harness.
- Open format. Configs are JSON files you can check into a repo.
Install and first run
# Install
npm install -g @anthropic-ai/claude-code
# (or equivalent for your package manager)
# Run
claude
First run prompts you to authenticate. After that, you're in.
The surface area of this section
When to use Claude Code vs, a custom harness
Use Claude Code when:
- You want to move fast
- You're building personal productivity or internal tools
- You benefit from the ecosystem (MCPs, skills, plugins)
Build a custom harness when:
- You're embedding an agent inside a product you ship (users don't have terminals)
- You need tight control over every turn for evaluation purposes
- You're bridging multiple model providers and want a vendor-neutral layer