The most latest version of the Codebuff client can be found on the npm page.
Run codebuff --version to make sure you're on the latest version.
Note: Codebuff should automatically install the latest version. If you're still having issues, see below.
Codebuff not updating
If you see the npm install run but Codebuff still isn't at the latest version, this is most likely an issue with npm's cache. Try running npm cache clean --force and then npm install -g codebuff.
Install failed
If npm install -g codebuff gave you an error regarding permissions, try using setting the owner of that directory to your user.
Mac/Linux: sudo chown -R $(whoami) <directory>
Windows: cmd takeown /F <directory> /R /D Y
Otherwise, try reinstalling node with nvm or fnm. Then run the codebuff install command again.
Accessing Your Chat History
Your conversation history with Codebuff is stored locally (and nowhere else) at ~/.config/manicode/projects/<your-project-name>/chats.
If you need help, we'd love if you include a copy of your recent chats for us to help you troubleshoot!
Common Issues
Connection Issues
If you see a message like this:
bash
/Users/<youruser>/Library/pnpm/global/5/.pnpm/codebuff@someversion/node_modules/codebuff/dist/common/websockets/websocket-client.js:158
reject(new Error(`Websocket message with txid ${txid} timed out.`)); ^
Error: Websocket message with txid 32 timed out.
at Timeout._onTimeout (/Users/<youruser>/Library/pnpm/global/5/.pnpm/codebuff@someversion/node_modules/codebuff/dist/common/websockets/websocket-client.js:158:28)
at listOnTimeout (node:internal/timers:594:17)
at process.processTimers (node:internal/timers:529:7)
Node.js v22.12.0
it means you're having connection issues. In that case, try:
Check your internet connection.
Try logging out and back in with logout followed by login.
Endless Auto-Updates
If Codebuff keeps trying to update itself in an endless loop, there could be several potential causes. Below are known issues and their solutions:
Conflicting Node/npm Installations (Homebrew vs. nvm)
One common cause is having conflicting Node/npm installations on your system, particularly between Homebrew and nvm. Here's how to diagnose and fix this:
Check your Node and npm paths:
bash
which node
which npm
If these point to Homebrew paths (e.g., /opt/homebrew/bin/) instead of nvm paths (e.g., ~/.nvm/versions/), that's the issue.
Check what packages depend on Node through Homebrew:
bash
brew uninstall node
This will show you any packages that depend on Node.
If you don't need those packages anymore, you can uninstall them. This will automatically remove Node as a dependency.
After this cleanup, your which node and which npm commands should point to your nvm installation, and Codebuff should work as expected.
Command Not Found
If you see "command not found" when trying to run Codebuff:
Ensure Codebuff is installed globally: npm install -g codebuff
Check that your PATH includes npm's global bin directory
Try running which codebuff to verify the installation location
It means you have a directory named .codebuff-SOMEHASH in your node_modules directory. This is a temporary directory created by npm when installing packages. You can safely delete this directory and try again:
Contact us at support@codebuff.com – please note we prioritize paying users, but we'll likely reply within a week.
How does Codebuff actually work?
Codebuff starts by running through the source files in all subdirectories and parsing them with tree-sitter. We use this information to help find relevant files to you requests.
We have a stateless server that passes messages along to Anthropic, OpenAI, or Gemini and websockets to ferry data back and forth to clients. It effectively acts as a proxy between the client and our LLM providers.
We use a fast model to pick the relevant files, and we load them into context Claude Sonnet responds with the right edit. This main agent can also delegate to other agents, as when it does its planning step, or when searching for files.
What models do you use?
We use multiple models to get better results: Gemini 2.5 Pro for deep thinking, Claude Sonnet for most implementation work, Gemini Flash for quick tasks. We also use a speculative decoding model from Relace AI for fast file rewrites. We use o3-mini as a file editing fallback, and gpt-4o-mini for some trivial tasks. In other words, we carefully pick the best models for each job.
We have several modes which change the model setup to achieve different goals:
--lite: Uses Gemini 2.5 Flash Thinking instead of Sonnet (~1/5 the cost). It also pulls fewer files, meaning that the context cost will be smaller.
--max: Uses a hybrid approach with Gemini 2.5 Pro + Sonnet to better handle complex problems and pulls more files on your codebase.
--experimental: Uses cutting-edge experimental features and the most advanced models available (like Gemini 2.5 Pro Experimental). This mode is for users who want to try the latest AI capabilities, though it may be less stable.
Working with Large Projects
In general, Codebuff works quite well in larger projects. For example, we've pulled Codebuff into the VSCode repo (millions of lines of code) and have had no issues in our testing. That said, if you're noticing Codebuff getting stuck/forgetting context too soon or using a ton of credits, here are some tips to help you mitigate those issues.
Directory-Based Approach
When working with large codebases, you can start Codebuff from specific directories to maintain focus:
bash
cd backend
codebuff
This helps Codebuff concentrate on relevant files and provide more targeted assistance.
Knowledge Organization
For large projects:
Create separate knowledge.md files in key directories, like so:
Cost: Codebuff is one third the cost of Claude Code for equivalent tasks and even less for back-and-forth conversation
Codebase Analysis: Codebuff pulls more context from scanning your entire codebase, rather than file-by-file. Codebuff also blends different models based on their strengths to provide more accurate results.
Staying in Flow: Codebuff requires fewer confirmation prompts for file edits and command execution.
Focused changes: Codebuff does just what you asked for, while Claude Code will often get carried away editing more and more files.
When to Choose Claude Code
Claude Code might be a better choice if you:
Can't use an intermediary provider, need to use the API directly from Anthropic
Feature Comparison
Feature
Codebuff
Claude Code
CLI-based interaction
✅
✅
Natural language commands
✅
✅
Autonomous test execution
✅
✅
Deep, targeted context awareness
✅
❌
Large context window
✅ (200k - 1M)
✅ (200k)
Fast diff edits (no full rewrites)
✅
❌
Accuracy at scale
✅
❌
Cost
$
$$$
Polished UI
❌
✅
Minimal interruptions
✅
❌
Summary
Both Codebuff and Claude Code are powerful AI coding assistants that can significantly boost your productivity. Codebuff offers more flexible pricing and performance options, while Claude Code provides direct integration with Anthropic's ecosystem.
Configuration
Codebuff can be configured using a codebuff.json file in your project root. This file allows you to customize various aspects of how codebuff operates in your project.
Why configure codebuff?
Configuring codebuff helps you create a seamless development environment where codebuff becomes your central development hub. Instead of juggling multiple terminal windows and manually starting various services, you can let codebuff manage your entire development workflow.
Startup Processes
You can configure startup processes, which will run in the background every time codebuff starts! When you use this feature, codebuff will automatically:
Start your development processes:
Servers (frontend, backend, etc.)
Launch your database
Run any other necessary background services
Manage all these processes for you
Read the logs and outputs and automatically handle any errors that arise
This means you can start your day with a single codebuff command, write code with codebuff's assistance, and when you're done, closing codebuff will cleanly shut down all your development processes. No more scattered terminal windows or forgotten running processes!
Configuration Schema
The configuration file follows this structure:
json
// Defines the overall Codebuff configuration file (e.g., codebuff.json). This schema defines the top-level structure of the configuration. This schema can be found at https://www.codebuff.com/config
{
// (optional): Does nothing. Put any thing you want here!
"description": any | undefined,
// (optional): An array of startup processes.
"startupProcesses": [
// Defines a single startup process.
{
// A user-friendly name for the process. Should be one word and unique.
"name": string,
// The actual shell command to execute.
"command": string,
// (optional): The working directory from which to run the command.
"cwd": string | undefined,
// (optional): Whether this process should be run, default: true
"enabled": boolean | undefined,
// (optional): Path to write the process's stdout. If not specified, stderr is not stored.
"stdoutFile": string | undefined,
// (optional): Path to write the process's stderr. If not specified, stderr will be put into the stdoutFile.
"stderrFile": string | undefined
}
] | undefined,
// (optional): An array of commands to run on file changes.
"fileChangeHooks": [
// Defines a single file change hook.
{
// A user-friendly name for the hook. Should be one word and unique.
"name": string,
// The actual shell command to execute.
"command": string,
// (optional): The working directory from which to run the command.
"cwd": string | undefined,
// (optional): Glob pattern to match files.
"filePattern": string | undefined,
// (optional): Whether this command should be run, default: true
"enabled": boolean | undefined
}
] | undefined,
// (optional): Maximum number of turns agent will take before being forced to end, default: 12
"maxAgentSteps": number
}
Example Configuration
Here's an example configuration file that starts a development server and database: