Skip to main content

Setup

Install the Claude Code CLI:
npm install -g @anthropic-ai/claude-code
Authenticate:
claude auth

Configuration

executor_config:
  executor_type: CLAUDE
  yolo_mode: false

YOLO Mode

By default, Claude Code asks for confirmation before running commands. YOLO mode skips these prompts for fully autonomous execution:
executor_config:
  executor_type: CLAUDE
  yolo_mode: true
  yolo_allowlist:
    - /path/to/your/repo
YOLO mode gives the AI unrestricted command execution in the worktree. Only enable it for repositories you trust. The yolo_allowlist restricts which repo paths are allowed.

How Draft Uses Claude Code

When a ticket executes, Draft runs:
claude --headless --prompt "Implement the following ticket: ..."
The prompt includes:
  • Ticket title and description
  • Relevant context from the codebase
  • Instructions from the goal
Claude Code then:
  1. Reads the codebase in the worktree
  2. Plans the implementation
  3. Makes code changes
  4. Exits when done

Log Streaming

Job logs are streamed in real-time to the UI via WebSocket. You can watch Claude Code’s reasoning and actions as they happen.

Troubleshooting

If Claude Code fails with a “nested session” error when spawned from within Claude Code, Draft automatically strips the CLAUDECODE and CLAUDE_CODE_ENTRYPOINT environment variables to prevent this.
Run claude auth to re-authenticate. Ensure your API key or OAuth session is valid.
If the agent exits without making changes, the ticket moves to BLOCKED with reason “no changes”. This usually means the instructions need to be more specific.