Documentation Index
Fetch the complete documentation index at: https://mintlify.com/headroomlabs-ai/headroom/llms.txt
Use this file to discover all available pages before exploring further.
headroom wrap is the fastest path to context savings for AI coding agents. One command starts the local proxy, configures the right environment variables for the target agent, and launches it — no manual env-var juggling, no config file edits.
Wrapping Claude Code
Wrap Claude Code
claude with ANTHROPIC_BASE_URL pointing at the proxy.Verify setup
Supported agents
Compatibility matrix
| Agent | headroom wrap | Notes |
|---|---|---|
| Claude Code | ✅ | --memory · --code-graph · --1m · --tool-search |
| Codex | ✅ | Shares memory with Claude |
| Cursor | Manual setup | Starts proxy and prints base URLs for Cursor settings |
| Aider | ✅ | Starts proxy + launches |
| Copilot CLI | ✅ | Starts proxy + launches |
| OpenClaw | ✅ | Installs as ContextEngine plugin |
| OpenCode | ✅ | Injects config · starts proxy + launches |
| Cline | ✅ | Starts proxy + injects config |
| Continue | ✅ | Starts proxy + injects config |
| Goose | ✅ | Starts proxy + launches |
| OpenHands | ✅ | Starts proxy + launches |
| Mistral Vibe | ✅ | Starts proxy + launches |
| Cortex Code | Library only | 60–65 % savings (library mode; no wrap) |
headroom proxy without a dedicated wrap command. MCP-native agents: headroom mcp install.
Flags
Common flags
| Flag | Description |
|---|---|
--port PORT | Proxy port (default: 8787) |
--no-context-tool | Skip installing the CLI context tool (RTK or lean-ctx) |
--memory | Enable persistent memory |
--code-graph | Index the current project and watch for live reindexing |
--1m | Enable 1M context window for Claude Code (entitled subscription users) |
--tool-search VALUE | Set ENABLE_TOOL_SEARCH for Claude Code tool deferral (true, false, auto, auto:N) |
--learn | Enable live traffic learning (implies --memory) |
--no-proxy | Skip starting a new proxy if one is already running |
Context tool selection
headroom wrap installs a CLI context tool alongside the agent. Two tools are supported:
HEADROOM_CONTEXT_TOOL=rtk (default) or HEADROOM_CONTEXT_TOOL=lean-ctx before running wrap. The value is inherited by the proxy subprocess.
Undoing a wrap
headroom unwrap reverses the config changes made by wrap: removes the proxy-routing env vars from agent config files, restores backups where available, and optionally stops the local proxy.
unwrap only reverses durable config changes. Agents that are launched ephemerally (Aider, Goose, OpenHands, Vibe) don’t write persistent config, so no unwrap is needed — just stop the process.headroom doctor
- Proxy reachability on the configured port
- Compression pipeline initialization
- Context tool installation status
- Memory backend (if enabled)
- API key presence for the configured provider
GitHub Copilot subscription mode
Headroom can route GitHub Copilot CLI subscription traffic through the local proxy, applying the same compression pipeline before forwarding to GitHub Copilot’s hosted API.COPILOT_PROVIDER_API_URL=... during launch.
GitHub Enterprise
For GitHub Enterprise Server or custom-domain Copilot deployments, set the deployment domain before launching:github.com/enterprises/your-enterprise, do not set an enterprise-domain override. Headroom uses GitHub’s normal token-exchange endpoint and the Copilot API endpoint advertised for the signed-in account.
Passing extra arguments to the agent
Use-- to pass flags through to the wrapped agent:
Custom proxy port
Cursor manual setup
headroom wrap cursor starts the proxy and prints the base URLs to paste into Cursor’s model settings. Cursor reads model endpoints from its settings UI, so the wrap command cannot rewrite Cursor configuration directly.