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.
Python agentaianthropicclaude-codecompressioncontext-engineeringcontext-windowcursorfastapilangchainllmmcpopenaiprompt-engineeringproxypythonragtoken-optimizationtokenstypescript
chore: apply ruff format + add CHANGELOG entry
Garm72ae0a9e032a
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 1ee141352..7b8f7ec18 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0## [Unreleased]+### Fixed+- **`headroom learn` no longer clobbers prior recommendations on re-run** —+ the marker block in `CLAUDE.md` / `MEMORY.md` is now merged with the+ prior block instead of wholesale-replaced. Sections re-surfaced by the+ new run win; sections not re-surfaced are carried forward so learnings+ accumulate across runs instead of disappearing. To fully rebuild the+ block, delete it manually and re-run. (#231)+### Added- **Telemetry stack & install-mode identity fields** — anonymous beacon nowreports `headroom_stack` (how Headroom is invoked: `proxy`, `wrap_claude`,diff --git a/tests/test_learn/test_writer.py b/tests/test_learn/test_writer.pyindex 18b4ea5ed..be38ac126 100644--- a/tests/test_learn/test_writer.py+++ b/tests/test_learn/test_writer.py@@ -154,7 +154,9 @@ class TestClaudeCodeWriter:)writer = ClaudeCodeWriter()- recs = [_rec(RecommendationTarget.MEMORY_FILE, "Related Codebases", "- web app at ~/Code/web")]+ recs = [+ _rec(RecommendationTarget.MEMORY_FILE, "Related Codebases", "- web app at ~/Code/web")+ ]writer.write(recs, proj, dry_run=False)content = memory_md.read_text()