How does Codebuff actually work?
Codebuff runs multiple agents, each tuned for a specific task.
The Orchestrator
The main agent ("Buffy") runs on Claude Opus 4.5. It reads your prompt, gathers context, and spawns subagents. The orchestrator is available in several variants:
base2- Default mode orchestratorbase2-lite- Lite mode (faster, cheaper)base2-max- Max mode (best-of-N selection)base2-plan- Plan mode (no file writes)
Subagents
- File Picker (Gemini 2.0 Flash) - finds relevant files
- Code Searcher - grep-style pattern matching
- Researcher (Grok 4 Fast) - web and docs lookup
- Thinker (GPT-5.1, Gemini 2.5 Pro) - works through hard problems
- Editor (GPT-5.1, Claude Opus 4.5) - writes and modifies code
- Reviewer (Claude Sonnet 4.5) - catches bugs and style issues
- Commander (Grok 4 Fast or Claude Sonnet 4.5) - runs terminal commands
Best-of-N Selection (Max Mode)
In Max mode, Codebuff spawns multiple editors with different strategies. A selector compares the outputs and picks the best one.
The Pipeline
- Tree-sitter scans your repo and builds a code map
- File pickers and searchers find relevant code
- Thinkers analyze the problem if needed
- Editors generate changes
- Reviewers check for issues; commanders run tests
The server is stateless. It streams requests to model providers (Anthropic, OpenAI, Google, xAI) over websockets. Your code stays local; only relevant context is sent.