Claude Code
Claude Code is the default agent runtime in matic and the reference implementation of the AgentRuntimeAdapter contract that every agent uses for inference and tool access. This section explains how matic spawns, configures, constrains, and communicates with Claude Code, from initial process creation through worktree-scoped execution and output normalization. Although agents can use other runtimes, their identity, memory, experience, and probes remain the same; the pages here focus specifically on how matic drives Claude Code.
Adapter
Adapter explains how the Claude Code adapter implements the full AgentRuntimeAdapter interface, including environment preparation, tool provisioning, agent materialization, invocation, streaming, output normalization, and canonical error mapping.
CLAUDE.md Injection
CLAUDE.md Injection covers how matic assembles persona, skills, work item spec, retrieved memory, evaluated policies, runtime state, and signal payload into Claude Code-native instructions through CLAUDE.md injection.
Hooks Integration
Hooks Integration documents the execution hooks matic applies around Claude Code, including pre-invocation policy gates, mid-execution guardrail checks, post-execution normalization, and the recovery paths triggered by failures.
MCP Surface
MCP Surface describes the tool surface that matic provisions for Claude Code, including capability registration, credential provisioning, the manifest format exposed at invocation time, and tool-unavailability handling.
Permission Policy
Permission Policy explains how org-level roles and declarative policies constrain Claude Code at invocation time, including task acceptance, sandbox behavior, budget exhaustion, and audit trail recording.
Spawning and Lifecycle
Spawning and Lifecycle walks through the runtime lifecycle for a Claude Code agent, from archetype inheritance and probe initialization through onboarding, engagement, learning, assessment, and idle states.
Worktree Isolation
Worktree Isolation details how matic creates a dedicated git worktree per task, constrains Claude Code's file and git operations to that boundary, and stages workspace outputs through wip-assets/, artifacts/, and delivery/.