Caveman Code is a terminal coding agent, forked from pi-code, whose defining trait is that the model answers in a compressed "caveman" register: terse technical fragments with no filler or hedging. Because the agent reads its own context back on every turn, shorter replies compound into lower token use across a session. On a 25-task MicroBench run with gpt-5.5 at xhigh reasoning (2026-05-18), it used 524k fresh tokens against 1,010k for Codex CLI with a pass rate of 14/25 versus 15/25; the raw CSV, logs, and a reproduction command are included.
Four compression layers are always on. Caveman Mode shapes the model's reply at lite, full, or ultra levels. Tool Budgets cap output lines per tool (bash 80, read 300, grep 120), strip ANSI, collapse blank lines, and extract JSON and XML semantically. Read Dedup fingerprints files per session so re-reads return a stub. An optional RTK binary pipes bash output through an external Rust compressor. Across 10 tool-output fixtures the aggregate reduction is 86%.
The agent it ships inside supports 20+ providers (OAuth for Claude Pro/Max, ChatGPT Plus/Pro, GitHub Copilot, Gemini, Antigravity, and Vertex; API keys for Anthropic, OpenAI, Azure, Bedrock, Mistral, Groq, xAI, OpenRouter, and others), a read-only plan mode, an autonomous goal loop, up to 7 worktree-isolated subagents, an architect/editor model split, session branching with shadow-git checkpoints, and persistent memory via cavemem. Configuration formats for settings, commands, skills, agents, and .mcp.json are a superset of Claude Code's. Development is frozen as of August 2026; the installed caveman binary shadows the CLI from the caveman repository.
Features
- Caveman Mode: adjustable reply compression via /caveman [lite|full|ultra|off]
- Tool output budgets: per-tool line caps, ANSI stripping, blank-line collapse, and semantic JSON/XML extraction
- Read dedup: per-session file fingerprints so repeated reads cost a stub instead of the bytes
- Goal loop: caveman goal start runs an autonomous loop with a per-iteration cost ledger, checkpoints, and ranked termination conditions
- Plan mode: /plan restricts the model to read, grep, find, and ls; /act executes the saved plan
- Subagents: up to 7 parallel worktree-isolated agents defined as frontmatter files in .cave/agents/
- Provider coverage: six OAuth flows plus API keys and custom OpenAI-, Anthropic-, or Google-compatible endpoints
- MCP support: stdio, Streamable HTTP, and in-process transports; OAuth 2.1 with PKCE; can itself run as an MCP server
- Sessions: JSONL sessions with /tree branching, /checkpoint and /rollback for code and conversation together
- Recipes and daemon: ten built-in YAML workflows; caveman serve and attach keep sessions in SQLite across SSH drops
- SDK: createAgentSession for embedding the agent in TypeScript, plus an HTTP/WS SDK for a running daemon
Integrates with
Alternatives
Aider
Command-line LLM pair programmer that maps your repo, edits files, and auto-commits each change to git
Claude Code
Terminal-based agentic coding tool that reads your codebase and runs tasks through natural-language commands
Codex
Lightweight coding agent that runs in your terminal
OpenCode
Open-source AI coding agent that runs in the terminal, an IDE, or a desktop app