Claude Code

Anthropic's official AI coding agent with extended thinking, plugins, and subagents.

Key Features

Extended Thinking

See Claude's reasoning process in real-time. Watch as it analyzes code, considers options, and explains its approach before taking action.

Plugins & Skills

Extend capabilities with plugins. Load specialized skills for frameworks, languages, or custom workflows.

Subagents

Spawn specialized agents for focused tasks. Create a code reviewer, documentation writer, or test generator that runs in parallel.

File Checkpointing

Every user message creates a checkpoint. Undo file changes to any point in the conversation with a single action.

Setup

Installation

bash
# Install Claude Code CLI
curl -fsSL https://claude.ai/install.sh | bash

# Verify installation
claude --version

Authentication

Choose one authentication method:

Option A: API Key (Recommended)
Set your Anthropic API key as an environment variable. Best for automated setups.
bash
# Add to your shell profile (~/.zshrc or ~/.bashrc)
export ANTHROPIC_API_KEY=sk-ant-your-key-here

# Then start the bridge
broski
Option B: OAuth Login
Use browser-based authentication. Convenient for personal use.
bash
# Authenticate via browser
claude login

# Then start the bridge
broski

Permission Modes

Claude Code has different permission modes that control how it handles file edits and shell commands:

ModeFile EditsShell CommandsUse Case
defaultAskAskSafe exploration, review each change
acceptEditsAuto-approveAskTrust file changes, review commands
planBlockedBlockedRead-only analysis, no modifications
bypassPermissionsAuto-approveAuto-approveFull trust, automated workflows
Use bypassPermissions only in trusted environments. The agent can execute any command without confirmation.

Built-in Tools

ToolDescriptionPermission Required
ReadRead file contents with optional line rangeSafe
WriteCreate new files (requires prior read)Approval
EditString replacement in existing filesApproval
BashExecute shell commands with timeoutApproval
GlobFind files matching pattern (e.g., **/*.ts)Safe
GrepRegex search in file contentsSafe
WebFetchFetch web page contentsSafe
WebSearchSearch the web for documentationSafe
TaskSpawn subagents for parallel workSafe
TodoReadRead current task listSafe
TodoWriteUpdate task listSafe

Subagents

Define specialized agents for focused tasks in your project's .claude/ directory:

.claude/settings.json
{
  "agents": {
    "code-reviewer": {
      "description": "Expert code review focusing on security and best practices",
      "prompt": "Review code for security vulnerabilities, performance issues, and best practices",
      "tools": ["Read", "Grep", "Glob"],
      "model": "sonnet"
    },
    "test-writer": {
      "description": "Generate comprehensive test cases",
      "prompt": "Write thorough unit and integration tests",
      "tools": ["Read", "Write", "Glob"],
      "model": "sonnet"
    }
  }
}

MCP Configuration

Add MCP servers to extend Claude Code's capabilities:

~/.claude.json
{
  "mcpServers": {
    "filesystem": {
      "type": "stdio",
      "command": "npx",
      "args": ["@modelcontextprotocol/server-filesystem"],
      "env": {
        "ALLOWED_PATHS": "/Users/me/projects"
      }
    },
    "github": {
      "type": "stdio",
      "command": "npx",
      "args": ["@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_TOKEN": "ghp_your_token_here"
      }
    }
  }
}
MCP tools appear with a prefix like mcp__filesystem__list_files. You can allow or block specific MCP tools in your settings.

Session Storage

Claude Code stores sessions as JSONL files on your computer:

~/.claude/projects/[project-path-encoded]/[session-id].jsonl
FeatureDescription
ResumeContinue any previous conversation
ForkBranch from any message (creates new file)
DeleteRemove session files to free space
TranscriptFull history with tool calls and results

Troubleshooting

Authentication Failures

Auth not configured
No valid authentication found. Ensure ANTHROPIC_API_KEY is set or run claude login.
bash
# Check if API key is set
echo $ANTHROPIC_API_KEY

# If empty, add to your shell profile:
echo 'export ANTHROPIC_API_KEY=sk-ant-your-key' >> ~/.zshrc
source ~/.zshrc

# Or re-authenticate:
claude logout
claude login

Rate Limiting

Rate limit exceeded
Too many requests. The bridge will automatically retry with backoff.

Check your usage at the Anthropic Console. Higher tier plans have increased rate limits.

Context Length

Context too long
Conversation exceeds model context window.

Start a new session or use the summarize feature to compact the conversation. Long sessions with many file operations can hit context limits.

Tool Permission Denied

Tool not allowed
The requested tool is disabled in your configuration.
~/.claude/settings.json
{
  "allowedTools": ["Read", "Write", "Edit", "Bash", "Glob", "Grep"],
  "disallowedTools": []
}

Next