Skip to content

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

fix(cli): resolve duplicate --code-aware flag breaking proxy import

chopratejas5dd2ac5e516b
diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json
index 1d6c46d37..db46f1ed6 100644
--- a/.claude-plugin/marketplace.json
+++ b/.claude-plugin/marketplace.json
@@ -5,14 +5,14 @@
},
"metadata": {
"description": "Headroom marketplace for Claude Code and GitHub Copilot CLI plugins.",
- "version": "0.21.5"
+ "version": "0.21.7"
},
"plugins": [
{
"name": "headroom",
"source": "./plugins/headroom-agent-hooks",
"description": "Headroom startup hooks for Claude Code and GitHub Copilot CLI.",
- "version": "0.21.5",
+ "version": "0.21.7",
"author": {
"name": "Headroom Contributors",
"url": "https://github.com/chopratejas/headroom"
diff --git a/.github/plugin/marketplace.json b/.github/plugin/marketplace.json
index 1d6c46d37..db46f1ed6 100644
--- a/.github/plugin/marketplace.json
+++ b/.github/plugin/marketplace.json
@@ -5,14 +5,14 @@
},
"metadata": {
"description": "Headroom marketplace for Claude Code and GitHub Copilot CLI plugins.",
- "version": "0.21.5"
+ "version": "0.21.7"
},
"plugins": [
{
"name": "headroom",
"source": "./plugins/headroom-agent-hooks",
"description": "Headroom startup hooks for Claude Code and GitHub Copilot CLI.",
- "version": "0.21.5",
+ "version": "0.21.7",
"author": {
"name": "Headroom Contributors",
"url": "https://github.com/chopratejas/headroom"
diff --git a/headroom/cli/proxy.py b/headroom/cli/proxy.py
index 3222e7c7c..f0a8989d9 100644
--- a/headroom/cli/proxy.py
+++ b/headroom/cli/proxy.py
@@ -104,14 +104,6 @@ def _get_env_bool(name: str, default: bool) -> bool:
@click.option("--no-optimize", is_flag=True, help="Disable optimization (passthrough mode)")
@click.option("--no-cache", is_flag=True, help="Disable semantic caching")
@click.option("--no-rate-limit", is_flag=True, help="Disable rate limiting")
- "--code-aware",
- is_flag=True,
- help=(
- "Enable code-aware compression in the proxy (env: HEADROOM_CODE_AWARE_ENABLED). "
- "Code-aware remains off by default."
- ),
-)
@click.option(
"--proxy-extension",
"proxy_extension",
@@ -391,7 +383,6 @@ def proxy(
no_optimize: bool,
no_cache: bool,
no_rate_limit: bool,
- code_aware: bool,
proxy_extension: tuple[str, ...],
no_subscription_tracking: bool,
subscription_poll_interval: int | None,
@@ -572,7 +563,6 @@ def proxy(
),
# Code graph: live file watcher for incremental reindexing
code_graph_watcher=code_graph,
- code_aware_enabled=code_aware or _get_env_bool("HEADROOM_CODE_AWARE_ENABLED", False),
# Read lifecycle: ON by default (use --no-read-lifecycle to disable)
read_lifecycle=not no_read_lifecycle,
# Memory System (Multi-Provider with auto-detection)
diff --git a/plugins/headroom-agent-hooks/.claude-plugin/plugin.json b/plugins/headroom-agent-hooks/.claude-plugin/plugin.json
index eda3fff15..b8418c954 100644
--- a/plugins/headroom-agent-hooks/.claude-plugin/plugin.json
+++ b/plugins/headroom-agent-hooks/.claude-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "headroom",
- "version": "0.21.5",
+ "version": "0.21.7",
"description": "Headroom startup hooks for Claude Code and GitHub Copilot CLI.",
"author": {
"name": "Headroom Contributors",
diff --git a/plugins/headroom-agent-hooks/.github/plugin/plugin.json b/plugins/headroom-agent-hooks/.github/plugin/plugin.json
index 7aa1a7019..60ee77725 100644
--- a/plugins/headroom-agent-hooks/.github/plugin/plugin.json
+++ b/plugins/headroom-agent-hooks/.github/plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "headroom",
- "version": "0.21.5",
+ "version": "0.21.7",
"description": "Headroom startup hooks for Claude Code and GitHub Copilot CLI.",
"author": {
"name": "Headroom Contributors",
diff --git a/tests/test_cli_proxy_env.py b/tests/test_cli_proxy_env.py
index 7d5186aad..f3129a01c 100644
--- a/tests/test_cli_proxy_env.py
+++ b/tests/test_cli_proxy_env.py
@@ -84,7 +84,7 @@ class TestCLIProxyEnvVars:
"""HEADROOM_CODE_AWARE_ENABLED env var should be passed to ProxyConfig."""
captured_config = {}
- def mock_run_server(config):
+ def mock_run_server(config, **kwargs):
captured_config["config"] = config
with patch("headroom.proxy.server.run_server", mock_run_server):
@@ -102,7 +102,7 @@ class TestCLIProxyEnvVars:
"""Without HEADROOM_CODE_AWARE_ENABLED, code-aware stays disabled in the wrapper."""
captured_config = {}
- def mock_run_server(config):
+ def mock_run_server(config, **kwargs):
captured_config["config"] = config
env = {k: v for k, v in os.environ.items() if k != "HEADROOM_CODE_AWARE_ENABLED"}
@@ -124,7 +124,7 @@ class TestCLIProxyEnvVars:
"""--code-aware should enable code-aware compression in the wrapper."""
captured_config = {}
- def mock_run_server(config):
+ def mock_run_server(config, **kwargs):
captured_config["config"] = config
with patch("headroom.proxy.server.run_server", mock_run_server):
@@ -137,7 +137,7 @@ class TestCLIProxyEnvVars:
"""--code-aware should win over HEADROOM_CODE_AWARE_ENABLED=false."""
captured_config = {}
- def mock_run_server(config):
+ def mock_run_server(config, **kwargs):
captured_config["config"] = config
with patch("headroom.proxy.server.run_server", mock_run_server):