You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/docs/persistent-installs.mdx
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -133,6 +133,20 @@ The Python-native `headroom wrap ...` flow checks for a matching persistent depl
133
133
134
134
The Docker-native host wrapper does **not** yet reuse or recover persistent profiles automatically; it still starts a fresh proxy container unless you opt into `--no-proxy`.
135
135
136
+
## Claude Code VSCode extension caveat
137
+
138
+
Persistent Claude deployments default to `ENABLE_TOOL_SEARCH=true` because the
139
+
standalone Claude CLI benefits from deferred tool schemas.
140
+
141
+
Anthropic's VSCode extension currently does not render those deferred-tool content
142
+
blocks correctly through Headroom and can show `unsupported content type` in the
143
+
webview. If your persistent install targets Claude Code inside VSCode, edit
144
+
`~/.headroom/deploy/<profile>/manifest.json`, set
145
+
`tool_envs.claude.ENABLE_TOOL_SEARCH` to `"false"`, then restart the deployment.
146
+
147
+
Keep `ENABLE_TOOL_SEARCH=true` for the standalone `claude` CLI unless you hit the
148
+
same renderer limitation there.
149
+
136
150
## Docker-native relationship
137
151
138
152
The Docker-native host wrapper and the Python install CLI solve different layers of the runtime story:
The old LLMLingua proxy toggles are no longer part of the CLI. Headroom's proxy compression path uses ContentRouter plus the current built-in compressors, including Kompress where applicable.
115
115
</Callout>
116
116
117
+
## Savings profiles
118
+
119
+
The proxy uses a **savings profile** to control compression behavior — which messages get compressed, how aggressively, and whether to prioritize provider prefix-cache stability or raw savings. Only the env var survives across related tools (`headroom wrap` passes it to the proxy it launches).
120
+
121
+
```bash
122
+
# Switch to a different profile
123
+
HEADROOM_SAVINGS_PROFILE=agent-90 headroom proxy
124
+
```
125
+
126
+
### Built-in profiles
127
+
128
+
| Profile | Target savings | proxy_mode | force_kompress | Best for |
|`balanced`| 70% |`token`| No | General-purpose moderate compression |
133
+
|`general`|~60% (emergent) |`token`| No | Non-coding chat, little code in context |
134
+
135
+
**`coding` (default)** — Optimizes for coding-agent workloads with Anthropic. Uses **cache mode** (`proxy_mode="cache"`): compresses only the newest delta in each turn so the provider's prefix-cache is never busted. User messages are compressed, system prompts preserved (hottest cache). Protects the 2 most recent turns verbatim. Lossless-first with lossy fallback; tool search and cross-turn dedup enabled. This is the profile that `headroom wrap` uses.
136
+
137
+
**`agent-90`** — Forces ML-based (Kompress) compression with a 10% keep-ratio, ignoring the lossless path. Compresses both user and system messages. Designed for non-coding or cost-sensitive workloads where maximum compression is the goal.
138
+
139
+
**`balanced`** — Token-mode compression with a 30% keep-ratio. Uses the standard lossless pipeline (does not force Kompress). Protects 4 recent turns. A safe general-purpose profile.
140
+
141
+
**`general`** — Token-mode compression for non-coding conversations. No turn protection (`protect_recent=0` — nothing code-positional to preserve) and does not compress user or system messages. Uses the standard lossless pipeline.
142
+
143
+
### Profiles override CLI flags
144
+
145
+
A profile's `proxy_mode` setting overrides the `--mode` flag. The `coding` profile sets `proxy_mode="cache"`, so `--mode token` has **no effect** when coding is active:
146
+
147
+
```bash
148
+
# These are equivalent — coding's cache mode always wins
149
+
headroom proxy
150
+
headroom proxy --mode token # --mode token is silently overridden
151
+
```
152
+
153
+
To run in token mode, switch to a profile that uses it:
Profile defaults are applied only when the corresponding env var is not already set. You can start from a named profile and override individual settings:
For permanent custom profiles, see the profile definitions in `headroom/agent_savings.py`. Each profile is an `AgentSavingsProfile` dataclass with fields for compression mode, target ratio, turn protection, and pipeline toggles.
0 commit comments