Claude Code Engine

Anthropic's official agentic coding CLI, integrated into QuantumReef. Claude Code brings deep reasoning, extended thinking, and native computer-use capabilities to your QuantumReef workspace.

Overview

Claude Code is Anthropic's terminal-native AI coding agent. It operates directly in your shell, reads and writes files, executes commands, and reasons through complex multi-step programming tasks. QuantumReef wraps Claude Code via its non-interactive --print mode and structured JSON output, surfacing its output inside the unified QuantumReef session UI.

Unlike engines that run a persistent server, Claude Code is invoked per-prompt as a subprocess. QuantumReef manages the subprocess lifecycle, captures stdout/stderr streams, and maps the output to QuantumReef's standard message and tool-call schema.

Anthropic API key required

Claude Code requires an ANTHROPIC_API_KEY environment variable. Claude Max subscribers can authenticate via the Anthropic Console OAuth flow instead.

How QuantumReef Wraps Claude Code

QuantumReef's ClaudeCodeClient adapter invokes Claude Code in non-interactive JSON mode for each prompt:

bash
claude --print --output-format json \
  --model claude-opus-4-5 \
  --max-turns 10 \
  --allowedTools "Bash,Read,Write,Edit,Glob,Grep,WebFetch" \
  "Your prompt here"

The JSON output is streamed line-by-line into QuantumReef's message bus. Each JSON event maps to a QuantumReef message type: text, tool_call, tool_result, or error. The MCP Tools Panel renders tool calls in real-time as they stream in, even before the subprocess exits.

Session Continuity

Claude Code maintains a conversation context file at ~/.claude/projects/{project-id}/. QuantumReef reads this directory to restore previous conversation turns when you resume a session, giving the illusion of a persistent connection while using Claude Code's stateless invocation model.

Installation

Install Claude Code

bash
# Install globally via npm
npm install -g @anthropic-ai/claude-code

# Verify installation
claude --version

# Authenticate (opens browser for OAuth)
claude auth login

Set API Key (alternative to OAuth)

bash
export ANTHROPIC_API_KEY=sk-ant-api03-...

# Add to your shell profile for persistence
echo 'export ANTHROPIC_API_KEY=sk-ant-api03-...' >> ~/.zshrc

Enable in QuantumReef

Navigate to Settings → Engines → Claude Code and toggle the engine on. QuantumReef will auto-detect the claude binary from your PATH. You can override the binary path if you use a version manager.

Configuration

SettingDefaultDescription
Modelclaude-opus-4-5Anthropic model to use. claude-sonnet-4-5 is faster and cheaper.
Max Turns10Maximum agentic turns before halting. Increase for complex tasks.
Allowed ToolsAllComma-separated list of permitted tool names
Working DirectoryWorkspace rootThe directory Claude Code operates in
Max Tokens8192Maximum output tokens per turn
Extended ThinkingfalseEnable Claude's extended reasoning mode (higher cost)

Claude Code Config File

~/.claude/settings.json
{
  "model": "claude-opus-4-5",
  "permissions": {
    "allow": [
      "Bash(git:*)",
      "Bash(npm:*)",
      "Read(**)",
      "Write(src/**)",
      "Edit(src/**)"
    ],
    "deny": [
      "Bash(rm -rf:*)",
      "WebFetch(https://suspicious-domain.com:*)"
    ]
  },
  "env": {
    "NODE_ENV": "development"
  }
}

Permissions & Safety

Claude Code has a granular permissions system. QuantumReef surfaces permission prompts in the MCP Tools Panel so you can review and approve each requested action without switching to the terminal.

Permission ModeBehaviour
allowExecute without prompting
denyBlock the action silently
promptAsk in QuantumReef's permission dialog before executing
localreadonlyAllow reads from local filesystem only; block writes and network

Bash tool scope

The Bash tool can run arbitrary shell commands. Use pattern-based allow/deny rules in settings.json to restrict what commands Claude Code may execute in your environment.

Use Cases

Use CaseWhy Claude Code Excels
Complex refactoringExtended thinking reasons through large-scale changes step by step
Documentation generationStrong prose quality; integrates reading and writing in one pass
Bug investigationMulti-turn agentic loops dig through stack traces, logs, and source
Greenfield projectsScaffolds entire project structures with consistent style
PR review assistanceReads diffs via Bash, cross-references issues, writes review comments

Extended Thinking for architecture

Enable Extended Thinking (--extended-thinking) when asking Claude Code to design system architecture or evaluate complex trade-offs. The additional reasoning budget produces significantly more nuanced recommendations.

Limitations

  • No persistent server — each prompt spawns a new process (slight startup latency ~300ms)
  • Session history size is bounded by Claude's context window (200K tokens for Opus)
  • MCP server support is available but requires manual configuration in settings.json
  • Consciousness Panel is not available for Claude Code sessions (RovoDev exclusive)
  • Fractal Agent Orchestration is not supported — use RovoDev for multi-agent workflows