Overview
Claude Code (claude) provides intelligent code generation, debugging, and refactoring capabilities with deep codebase understanding.
Claude Code is the most feature-complete agent in Maestro, supporting session resume, plan mode, image input, and comprehensive usage statistics.
Installation
Authenticate
Run Claude Code once to authenticate:Follow the prompts to sign in with your Anthropic account.
Capabilities
Claude Code provides the most comprehensive feature set of any Maestro-supported agent:Resume existing sessions with
--resume flagPlan mode with
--permission-mode plan (read-only access)Structured JSON output with
--output-format stream-jsonPersistent session IDs for conversation continuity
Attach screenshots, diagrams, and images
Send images via
--input-format stream-json on resumed sessionsBuilt-in commands like
/help, /compact, /resetSession history stored in
~/.claude/projects/Real-time cost information in USD
Token counts for input and output
Streaming reasoning/thinking content
Receive merged context from other sessions
Export conversation context for transfer
src/main/agents/capabilities.ts:121
Command-Line Arguments
Maestro uses these base arguments for all Claude Code sessions:Run in batch/headless mode (no interactive TUI)
Enable detailed logging output
Output format for structured parsing
Auto-approve all file operations (required by Maestro)
Resume Mode
To resume an existing session:Claude session ID to resume
Plan Mode (Read-Only)
For read-only analysis without file modifications:Set to
plan for read-only modesrc/main/agents/definitions.ts:125
Session Storage
Claude Code stores session history in:conversation.json- Full conversation historymetadata.json- Session metadata and configurationfiles/- Created/modified files during the session
src/main/storage/claude-code-session-storage.ts
Output Format
Claude Code outputs newline-delimited JSON events:src/main/parsers/claude-code-parser.ts
Slash Commands
Claude Code supports these built-in commands:/help
/help
Display available slash commands and usage information
/compact
/compact
Switch to compact output mode (less verbose)
/reset
/reset
Clear conversation history and start fresh
/context
/context
Show current context window usage
Error Patterns
Common error patterns Maestro detects:Pattern:
Invalid API keySolution: Re-authenticate with claude commandPattern:
rate limit exceededSolution: Wait before retrying or upgrade your Anthropic planPattern:
context length exceededSolution: Start a new session or use /reset to clear contextPattern:
permission deniedSolution: Check file permissions in working directorysrc/main/parsers/error-patterns.ts
Usage with Maestro Features
Auto Run
Fully supported - Claude Code works with playbooks and automated workflows
Group Chat
Participate in multi-agent group chats with other providers
Context Grooming
Export and merge conversation context between sessions
Session Discovery
Import existing Claude sessions from
~/.claude/projects/Context Window
Claude Code uses Claude 3.5 Sonnet or Claude 4 models with:- Context Window: 200,000 tokens
- Output Limit: ~8,000 tokens per response
src/renderer/utils/contextUsage.ts:15
Best Practices
Enable Plan Mode for Analysis
Use read-only mode when you only need code analysis without modifications
Troubleshooting
Claude Code not detected
Claude Code not detected
Verify installation:If not found, reinstall:
Authentication failed
Authentication failed
Re-authenticate:
Session resume fails
Session resume fails
Check session exists:Session IDs are case-sensitive and must match exactly.