Files
headroom-release[bot]andgithub-actions[bot] ce0460cfa8 chore: release 0.45.0 (#4724)
🤖 I have created a release *beep* *boop*
---


##
[0.45.0](https://github.com/headroomlabs-ai/headroom/compare/v0.44.0...v0.45.0)
(2026-11-22)


### Features

* **opencode:** add repeatable --extra-model flag for custom wrap-time
models
([#2364](https://github.com/headroomlabs-ai/headroom/issues/2364))
([66e0086](https://github.com/headroomlabs-ai/headroom/commit/66e0086952d4b311c9fe9b489fbd12d1d270fcde))
* **savings:** book modelled output savings per request, as a token and
dollar range
([#4878](https://github.com/headroomlabs-ai/headroom/issues/4878))
([00436a8](https://github.com/headroomlabs-ai/headroom/commit/00436a8b11b69f19e280ba0ce3f54f50094e4a5e))
* **shaper:** let an extension replace a level's steering text; default
to L3 ([#4877](https://github.com/headroomlabs-ai/headroom/issues/4877))
([a3afd43](https://github.com/headroomlabs-ai/headroom/commit/a3afd43e0cbd3ed4b2186419bcc8ac447d110e39))
* **telemetry:** split beacon sessions by harness, model and day
([#4881](https://github.com/headroomlabs-ai/headroom/issues/4881))
([ac932eb](https://github.com/headroomlabs-ai/headroom/commit/ac932eb7c43156e94088d21e6c1edf3dc14b233b))
* **tray:** opt-in system tray icon with savings counter, dashboard and
update alert
([#4726](https://github.com/headroomlabs-ai/headroom/issues/4726))
([e9301f3](https://github.com/headroomlabs-ai/headroom/commit/e9301f34c1296c1f1290ed590fe02cbfd991e3c1))


### Bug Fixes

* **benchmarks:** drop the duplicate protect_recent=0 table from the
proof harness
([#4754](https://github.com/headroomlabs-ai/headroom/issues/4754))
([a385ea8](https://github.com/headroomlabs-ai/headroom/commit/a385ea8e60a14c1511d82b21d518421af35deab2))
* **benchmarks:** refuse a dirty or non-git --worktree in codemode_ab
([#4736](https://github.com/headroomlabs-ai/headroom/issues/4736))
([6b7b635](https://github.com/headroomlabs-ai/headroom/commit/6b7b6358d526a833631798ea1b073e941775d89f))
* **binaries:** ignore tool binaries found via the current directory
([#4838](https://github.com/headroomlabs-ai/headroom/issues/4838))
([7a0f15f](https://github.com/headroomlabs-ai/headroom/commit/7a0f15f563d8a74e5496435c9f61fba9d72f3a0b))
* **cache:** exclude cold starts from TTL hit evidence
([#4728](https://github.com/headroomlabs-ai/headroom/issues/4728))
([93df7ae](https://github.com/headroomlabs-ai/headroom/commit/93df7ae4f725da790823084dca0a8ab6467bfcfe))
* **cache:** preserve complete CCR hashes across restarts
([#4820](https://github.com/headroomlabs-ai/headroom/issues/4820))
([e27f0d9](https://github.com/headroomlabs-ai/headroom/commit/e27f0d96cc3032d5f2c510ac97545553b867a697))
* **cache:** replay every parallel tool result
([#4818](https://github.com/headroomlabs-ai/headroom/issues/4818))
([973c12d](https://github.com/headroomlabs-ai/headroom/commit/973c12d2af9cc6a9b021516d0c92edee12c10ecb))
* **cache:** scope learned TTL cache to its source file
([#4727](https://github.com/headroomlabs-ai/headroom/issues/4727))
([acb58a0](https://github.com/headroomlabs-ai/headroom/commit/acb58a0c00c9972abb7044b6ff3aa1b4cfed8e64))
* **ccr:** send batch continuations to the upstream the batch was
submitted to
([#4848](https://github.com/headroomlabs-ai/headroom/issues/4848))
([5f82080](https://github.com/headroomlabs-ai/headroom/commit/5f82080329b41fa5dd556ed9c873d7d313f1a4f0))
* **ci:** keep alert rule and location out of the public CodeQL triage
issue ([#4863](https://github.com/headroomlabs-ai/headroom/issues/4863))
([047aadd](https://github.com/headroomlabs-ai/headroom/commit/047aadde868d38e27b5d6bc2d99dd21362fa0d53))
* **ci:** verify installer provenance in build workflows
([#4677](https://github.com/headroomlabs-ai/headroom/issues/4677))
([b235bc2](https://github.com/headroomlabs-ai/headroom/commit/b235bc2d27f0b15b2c5a364f853d52ab0b3ea003))
* **compression:** bound the JSON-block and truncation-banner scans
([#4845](https://github.com/headroomlabs-ai/headroom/issues/4845))
([bae62bc](https://github.com/headroomlabs-ai/headroom/commit/bae62bc87ba593df74f6a6109dc2317ba71b3216))
* **compress:** stop adding markers the caller did not ask for
([#4678](https://github.com/headroomlabs-ai/headroom/issues/4678))
([c21b081](https://github.com/headroomlabs-ai/headroom/commit/c21b0813bd1b041b1e3ca1d55a07a9498e61f181))
* **content-router:** keep list-form tool_result text blocks on separate
lines ([#4739](https://github.com/headroomlabs-ai/headroom/issues/4739))
([f4e3ad4](https://github.com/headroomlabs-ai/headroom/commit/f4e3ad4b1168755ccb27bd151b684ee65cf2d86f))
* **content-router:** protect cache_control markers nested in
tool_result content
([#4898](https://github.com/headroomlabs-ai/headroom/issues/4898))
([18067b1](https://github.com/headroomlabs-ai/headroom/commit/18067b1d19f6606bae3b4d6b50efeeaa48dc477e))
* **copilot:** keep new VS Code chats on the Local harness so they reach
the proxy
([#4899](https://github.com/headroomlabs-ai/headroom/issues/4899))
([0d203db](https://github.com/headroomlabs-ai/headroom/commit/0d203db6b814e62773bb08aa79f0c036ab9323af))
* **deps:** move the wrap E2E harness to npm 12.2.2 and drop the fixed
audit exceptions
([#4778](https://github.com/headroomlabs-ai/headroom/issues/4778))
([f6fbac3](https://github.com/headroomlabs-ai/headroom/commit/f6fbac3a4975f62a296656fb15f1d3e72270c445))
* **deps:** patch quinn-udp, rustix and opentelemetry-api advisories
([#4835](https://github.com/headroomlabs-ai/headroom/issues/4835))
([0368a87](https://github.com/headroomlabs-ai/headroom/commit/0368a872cdd5064b39888e13847200ff562ac192))
* **examples:** keep the macos launchagent running when reinstall is
declined
([#4734](https://github.com/headroomlabs-ai/headroom/issues/4734))
([02a2b56](https://github.com/headroomlabs-ai/headroom/commit/02a2b568d4526724c3d8a0a098c7fb601c6c9fbe))
* **examples:** validate the macos launchagent port as plain decimal
([#4733](https://github.com/headroomlabs-ai/headroom/issues/4733))
([a91c48a](https://github.com/headroomlabs-ai/headroom/commit/a91c48a3a4f89bd3892b5db9d08c0697e1a356ca))
* **gemini:** apply the request rate limit to Cloud Code and countTokens
([#4862](https://github.com/headroomlabs-ai/headroom/issues/4862))
([c2292ed](https://github.com/headroomlabs-ai/headroom/commit/c2292ed0c64679e4a67cccb096a93873c940032c))
* **kompress:** honour toin_read_only in the Kompress CCR store
([#4895](https://github.com/headroomlabs-ai/headroom/issues/4895))
([8da7e17](https://github.com/headroomlabs-ai/headroom/commit/8da7e17e4e1c3636031fd9ee25cb061a317419c9))
* **learn:** only fold real linked worktrees into their main checkout
([#4839](https://github.com/headroomlabs-ai/headroom/issues/4839))
([d2fb350](https://github.com/headroomlabs-ai/headroom/commit/d2fb350a3445d860e86f52739b5adfb24e73666c))
* **learn:** render non-string Bash commands without raising
([#4826](https://github.com/headroomlabs-ai/headroom/issues/4826))
([cfdeb1c](https://github.com/headroomlabs-ai/headroom/commit/cfdeb1c4667edb1caa923bf0b8cfa4fd994c5c76))
* **lossless:** never grep-fold Go, nginx, klog or access-log timestamps
([#4901](https://github.com/headroomlabs-ai/headroom/issues/4901))
([cf32846](https://github.com/headroomlabs-ai/headroom/commit/cf3284675eade1f4cee3358932d9c2f72562253f))
* **lossless:** never grep-fold Ruby Logger timestamps
([#4907](https://github.com/headroomlabs-ai/headroom/issues/4907))
([4a94500](https://github.com/headroomlabs-ai/headroom/commit/4a945007817022c9f797d811f475dc1172522b97))
* **mcp:** check Host and Origin on the Streamable HTTP transport
([#4852](https://github.com/headroomlabs-ai/headroom/issues/4852))
([70ba721](https://github.com/headroomlabs-ai/headroom/commit/70ba72138d6ab6862ac61494552c7dd71006cd5c))
* **memory:** dispatch the advertised memory_list tool
([#4830](https://github.com/headroomlabs-ai/headroom/issues/4830))
([0d91550](https://github.com/headroomlabs-ai/headroom/commit/0d9155019febfb0237f115edb8c5cd5448cf6bcb))
* **memory:** include older memories in agent sync
([#4832](https://github.com/headroomlabs-ai/headroom/issues/4832))
([a6a825c](https://github.com/headroomlabs-ai/headroom/commit/a6a825c55d665ef9c261bc627c30947a263133ec))
* **memory:** keep Neo4j relationship types to a single identifier
([#4837](https://github.com/headroomlabs-ai/headroom/issues/4837))
([b0a8c00](https://github.com/headroomlabs-ai/headroom/commit/b0a8c000caade71df451b4c1976fe402e12a2a6a))
* **memory:** return stored id from a background DirectMem0 save
([#4759](https://github.com/headroomlabs-ai/headroom/issues/4759))
([6665940](https://github.com/headroomlabs-ai/headroom/commit/6665940656bd7e1111e36ffd49f23c59615440de))
* **memory:** scope TrafficLearner's SQLite reads to its user_id
([#4850](https://github.com/headroomlabs-ai/headroom/issues/4850))
([9321a41](https://github.com/headroomlabs-ai/headroom/commit/9321a415a6f976b5350329c009f569d7a3f201a7))
* **memory:** validate embedding dimensions before writes
([#4831](https://github.com/headroomlabs-ai/headroom/issues/4831))
([cd6f438](https://github.com/headroomlabs-ai/headroom/commit/cd6f438fec0aa9495efa120585d24a3945a0a1b5))
* **oauth2:** stop following redirects from the token endpoint
([#4849](https://github.com/headroomlabs-ai/headroom/issues/4849))
([02dfdd8](https://github.com/headroomlabs-ai/headroom/commit/02dfdd8f892543848d35c07de235d7610a71f52d))
* **openclaw:** keep the Python launcher fallback off the working
directory
([#4843](https://github.com/headroomlabs-ai/headroom/issues/4843))
([acebf20](https://github.com/headroomlabs-ai/headroom/commit/acebf20b47efa6a31acd78e9f742b022e03192fb))
* **openclaw:** let the circuit breaker open on proxy failures
([#4755](https://github.com/headroomlabs-ai/headroom/issues/4755))
([1372f95](https://github.com/headroomlabs-ai/headroom/commit/1372f9552460c49dee0bd1fb58e9d79518f73d8c))
* **openclaw:** preserve assistant text blocks when tool arguments
change
([#4829](https://github.com/headroomlabs-ai/headroom/issues/4829))
([d077263](https://github.com/headroomlabs-ai/headroom/commit/d077263012e3cfa5113ea7ccee3ae9bd2dce594a))
* **openclaw:** return structured retrieval tool results
([#4707](https://github.com/headroomlabs-ai/headroom/issues/4707))
([e6b5777](https://github.com/headroomlabs-ai/headroom/commit/e6b5777806c53206ddea08ccede317e3e92971c6))
* **opencode:** default options-form https.request calls to https
([#4749](https://github.com/headroomlabs-ai/headroom/issues/4749))
([12b5fb7](https://github.com/headroomlabs-ai/headroom/commit/12b5fb7f2aaf031bd32ef3ba53a8ebad4401b987))
* **opencode:** do not break every request when the proxy URL is empty
or invalid
([#4750](https://github.com/headroomlabs-ai/headroom/issues/4750))
([318e8e0](https://github.com/headroomlabs-ai/headroom/commit/318e8e080848061dadb92d22c6accc6161c9063e))
* **opencode:** keep child process options when the args slot is null or
undefined
([#4748](https://github.com/headroomlabs-ai/headroom/issues/4748))
([9f2cc01](https://github.com/headroomlabs-ai/headroom/commit/9f2cc017863f540c61f8747b3c744a97776ebaf2))
* **opencode:** override effect to patched 4.0.0-beta.103
([#4762](https://github.com/headroomlabs-ai/headroom/issues/4762))
([19d439f](https://github.com/headroomlabs-ai/headroom/commit/19d439f7b0528846f96505203232841513f097d1))
* **opencode:** percent-encode the project name in x-headroom-project
([#4780](https://github.com/headroomlabs-ai/headroom/issues/4780))
([863b3c7](https://github.com/headroomlabs-ai/headroom/commit/863b3c7cc7979e7293f797be0c4bd4ab25595844))
* **opencode:** stop routing a host's bare /messages or /responses to
the proxy
([#4781](https://github.com/headroomlabs-ai/headroom/issues/4781))
([#4791](https://github.com/headroomlabs-ai/headroom/issues/4791))
([87c1293](https://github.com/headroomlabs-ai/headroom/commit/87c12931fbfecc62a8fad65eb2294cd95c417b2f))
* **opencode:** stop routing non-LLM hosts and paths to the proxy
([#4747](https://github.com/headroomlabs-ai/headroom/issues/4747))
([#4758](https://github.com/headroomlabs-ai/headroom/issues/4758))
([c48778c](https://github.com/headroomlabs-ai/headroom/commit/c48778c4ab6add83bc4d46bde9ba2c5bc11edbc3))
* **output-shaper:** don't add Responses instructions to a body already
steered in input
([#4937](https://github.com/headroomlabs-ai/headroom/issues/4937))
([3a8270b](https://github.com/headroomlabs-ai/headroom/commit/3a8270b836bc9ffa050eb7066a902ea936bc7ef2))
* **plugins:** keep the hook launcher's Python fallback off the project
dir ([#4842](https://github.com/headroomlabs-ai/headroom/issues/4842))
([c5d8f13](https://github.com/headroomlabs-ai/headroom/commit/c5d8f133606ffadbf4be8731dc1fed77e471f64f))
* **proxy:** bound brotli output per step and lossless inverse expansion
([#4861](https://github.com/headroomlabs-ai/headroom/issues/4861))
([5503383](https://github.com/headroomlabs-ai/headroom/commit/5503383befa19ecbfdd65604ff7a36b5f45b9d15))
* **proxy:** check x-headroom-base-url off the event loop in chat and
responses
([#4856](https://github.com/headroomlabs-ai/headroom/issues/4856))
([2f58877](https://github.com/headroomlabs-ai/headroom/commit/2f58877732eaae2849ab3019c0867674733bc53d))
* **proxy:** clamp /transformations/feed limit to [1, 100]
([ec2ab21](https://github.com/headroomlabs-ai/headroom/commit/ec2ab21844ac7dfbadeea1a5636b12b1a4699e26))
* **proxy:** clamp /transformations/feed limit to [1, 100]
([#4934](https://github.com/headroomlabs-ai/headroom/issues/4934))
([ec2ab21](https://github.com/headroomlabs-ai/headroom/commit/ec2ab21844ac7dfbadeea1a5636b12b1a4699e26))
* **proxy:** don't take Claude Code's "Tool loaded." note as the user
query ([#4714](https://github.com/headroomlabs-ai/headroom/issues/4714))
([dcd03b9](https://github.com/headroomlabs-ai/headroom/commit/dcd03b9b4c58340a5f4448fd4740045294e156f7))
* **proxy:** enforce HEADROOM_PROXY_TOKEN in the Rust front and listen
on loopback by default
([#4840](https://github.com/headroomlabs-ai/headroom/issues/4840))
([f5c4217](https://github.com/headroomlabs-ai/headroom/commit/f5c42176483a5e0fa3522fd1758a3cf3f65bb0a2))
* **proxy:** give the OpenAI Responses error frame its type
discriminator
([#4331](https://github.com/headroomlabs-ai/headroom/issues/4331))
([53a2521](https://github.com/headroomlabs-ai/headroom/commit/53a2521637ec6d71a5b53e11f5698ebef96d97b1))
* **proxy:** keep Copilot requests on Copilot when an extension advises
another provider
([#4894](https://github.com/headroomlabs-ai/headroom/issues/4894))
([998d710](https://github.com/headroomlabs-ai/headroom/commit/998d71080cb4ac8a8d6d6cd56c48c2c543443df5))
* **proxy:** keep credentials out of proxy logs and 400 debug dumps
([#4865](https://github.com/headroomlabs-ai/headroom/issues/4865))
([dffc4dc](https://github.com/headroomlabs-ai/headroom/commit/dffc4dcc57c6e6308cee3965855a5c7b692ca053))
* **proxy:** keep hop-by-hop request headers off upstream calls
([#4775](https://github.com/headroomlabs-ai/headroom/issues/4775))
([8f47a86](https://github.com/headroomlabs-ai/headroom/commit/8f47a8641055c89475806c2df825b70331d8ad36))
* **proxy:** keep relay tasks when the same WS handle re-registers
([#4904](https://github.com/headroomlabs-ai/headroom/issues/4904))
([f4691e8](https://github.com/headroomlabs-ai/headroom/commit/f4691e8ab10a237255922e8d0dee66cd0db05191))
* **proxy:** keep reserved openai tool names resident during tool search
deferral
([#4753](https://github.com/headroomlabs-ai/headroom/issues/4753))
([62f2a2d](https://github.com/headroomlabs-ai/headroom/commit/62f2a2decd5848100582c4e3d7219861f97f104f))
* **proxy:** keep settings.json mode and symlink in the cc-switch
reconciler
([#4844](https://github.com/headroomlabs-ai/headroom/issues/4844))
([3bae009](https://github.com/headroomlabs-ai/headroom/commit/3bae009c3fd9c2a730b98830e642ecb312878002))
* **proxy:** keep upstream credentials out of manifests, env and TOIN
([#4866](https://github.com/headroomlabs-ai/headroom/issues/4866))
([2e4ff6f](https://github.com/headroomlabs-ai/headroom/commit/2e4ff6f9c7ea2424278d8aecc791ac6dfb44a435))
* **proxy:** let an extension declare its install() fail-closed
([#4737](https://github.com/headroomlabs-ai/headroom/issues/4737))
([#4773](https://github.com/headroomlabs-ai/headroom/issues/4773))
([c05fbdd](https://github.com/headroomlabs-ai/headroom/commit/c05fbdddc873078dd97cb9ede841e75ef7ed0bef))
* **proxy:** log client-supplied model ids as one escaped token
([#4854](https://github.com/headroomlabs-ai/headroom/issues/4854))
([b9f6255](https://github.com/headroomlabs-ai/headroom/commit/b9f62553950f59f7467abb8e2e9c1477fcf924fa))
* **proxy:** make the Rust front's native Bedrock and Vertex routes
opt-in
([#4851](https://github.com/headroomlabs-ai/headroom/issues/4851))
([99021af](https://github.com/headroomlabs-ai/headroom/commit/99021af20a87bd1885e62f3607c9a5f234010fc7))
* **proxy:** pin non-ASCII upstream hosts by A-label and resolve
x-headroom-base-url once
([#4855](https://github.com/headroomlabs-ai/headroom/issues/4855))
([904e56a](https://github.com/headroomlabs-ai/headroom/commit/904e56a35769b601d0bfdd386f9aca0f6110612d))
* **proxy:** refuse a private x-headroom-base-url on the async chat and
responses path
([#4879](https://github.com/headroomlabs-ai/headroom/issues/4879))
([5023c84](https://github.com/headroomlabs-ai/headroom/commit/5023c84e527e28281dd73d1ba04184fe738aac0f))
* **proxy:** refuse HTTP requests from untrusted browser origins
([#4853](https://github.com/headroomlabs-ai/headroom/issues/4853))
([ab1d029](https://github.com/headroomlabs-ai/headroom/commit/ab1d0292df09dee1d97221d7e60fa0664fc9f0f9))
* **proxy:** reject a private x-headroom-base-url on chat and responses
with 400
([#4857](https://github.com/headroomlabs-ai/headroom/issues/4857))
([491afe9](https://github.com/headroomlabs-ai/headroom/commit/491afe98b11ccd601e8b7586b608b2ef940ee692))
* **proxy:** resolve the forwarded client from the right and keep
settings writes loopback-only
([#4847](https://github.com/headroomlabs-ai/headroom/issues/4847))
([e15e342](https://github.com/headroomlabs-ai/headroom/commit/e15e342d9bc1a8a3831c952d05029352013b69e0))
* **proxy:** retain final backend streaming usage
([#4814](https://github.com/headroomlabs-ai/headroom/issues/4814))
([93331f2](https://github.com/headroomlabs-ai/headroom/commit/93331f28742663d279b377da2fe41124de0a5a55))
* **proxy:** retry a TLS error only while the request is being written
([#4776](https://github.com/headroomlabs-ai/headroom/issues/4776))
([854a696](https://github.com/headroomlabs-ai/headroom/commit/854a69654498089bdc36fa3dc0034024702d6332))
* **proxy:** send operator extra headers only to a designated origin
([#4858](https://github.com/headroomlabs-ai/headroom/issues/4858))
([6d8121c](https://github.com/headroomlabs-ai/headroom/commit/6d8121cfd4362f21cbdff08aeb9eb4e90c05e2d2))
* **proxy:** stop a "*" origin setting from waiving the WebSocket Origin
check ([#4846](https://github.com/headroomlabs-ai/headroom/issues/4846))
([d9ae7ad](https://github.com/headroomlabs-ai/headroom/commit/d9ae7ad7219d19f32eec10d3dfd1ea2eb6331ff3))
* **proxy:** turn off the image stage when --compressor leaves out image
([#4723](https://github.com/headroomlabs-ai/headroom/issues/4723))
([8f04221](https://github.com/headroomlabs-ai/headroom/commit/8f04221b2d390e990b98061853c5d6aea9b15e6d))
* **router:** keep source code out of the prose (Kompress) fallbacks
([#4787](https://github.com/headroomlabs-ai/headroom/issues/4787))
([3aafdf2](https://github.com/headroomlabs-ai/headroom/commit/3aafdf2dcc95020af6affdbfaf837059a0748f3a))
* **sdk:** accept string contents and functionCall without args in the
Gemini adapter
([#4756](https://github.com/headroomlabs-ai/headroom/issues/4756))
([200c838](https://github.com/headroomlabs-ai/headroom/commit/200c838c7393d20ae56a0c338f832ed27133c398))
* **sdk:** encode the signature hash in client.telemetry.getTool
([#4772](https://github.com/headroomlabs-ai/headroom/issues/4772))
([3c66c91](https://github.com/headroomlabs-ai/headroom/commit/3c66c91eea3ad8cf77d7d66abe484cee876271eb))
* **sdk:** keep Gemini thought signatures and call ids through the
compress round trip
([#4777](https://github.com/headroomlabs-ai/headroom/issues/4777))
([622df29](https://github.com/headroomlabs-ai/headroom/commit/622df2962bf2b89d7708f2ec5726a2d50e419c4f))
* **sdk:** reject "." ".." and NUL plugin names like the python twin
([#4771](https://github.com/headroomlabs-ai/headroom/issues/4771))
([99ef4ee](https://github.com/headroomlabs-ai/headroom/commit/99ef4eec8279936131ef52512993d31bafb54b55))
* **sdk:** reject sharedcontext maxentries below 1
([#4743](https://github.com/headroomlabs-ai/headroom/issues/4743))
([4b6529f](https://github.com/headroomlabs-ai/headroom/commit/4b6529fc147698ca7bce6dfa993be49d1529f79b))
* **sdk:** throw typed proxy 4xx errors from compress instead of
retrying
([#4751](https://github.com/headroomlabs-ai/headroom/issues/4751))
([e602e4c](https://github.com/headroomlabs-ai/headroom/commit/e602e4cfb510f188e52cd1c81eb515f4d1b2634d))
* **smart-crusher:** keep container-shaped strings as strings in
lossless tables
([#4875](https://github.com/headroomlabs-ai/headroom/issues/4875))
([303f521](https://github.com/headroomlabs-ai/headroom/commit/303f521812bed4b189d628d8cf8f62b4b8e58e58))
* **sql:** stop granting anon read access to raw proxy telemetry
([#4867](https://github.com/headroomlabs-ai/headroom/issues/4867))
([b324efb](https://github.com/headroomlabs-ai/headroom/commit/b324efb1d4a01ce5a698f848527c0d55ec3cd1a4))
* **tag-protector:** make tag protection and restore linear in input
size ([#4841](https://github.com/headroomlabs-ai/headroom/issues/4841))
([c8b3d67](https://github.com/headroomlabs-ai/headroom/commit/c8b3d67715ab95429857832faaa3a871b465408c))
* **wrap:** match Serena's unset dashboard key instead of appending a
duplicate
([#4315](https://github.com/headroomlabs-ai/headroom/issues/4315))
([1da8930](https://github.com/headroomlabs-ai/headroom/commit/1da8930ab47a2fc5339ded97e5a41bfe6fc419eb))


### Performance Improvements

* **bm25:** lower batch allocations -- 93.4% less peak memory
([#4893](https://github.com/headroomlabs-ai/headroom/issues/4893))
([cb8414c](https://github.com/headroomlabs-ai/headroom/commit/cb8414cc73724903e3283a60ebf86b7c9b02d089))


### Dependencies

* bump pyo3 from 0.29.3 to 0.30.1
([#4811](https://github.com/headroomlabs-ai/headroom/issues/4811))
([5df3d94](https://github.com/headroomlabs-ai/headroom/commit/5df3d946ea4fafc9bd5296ad46f6e38b20197e8d))
* bump ruff from 0.17.3 to 0.17.4 in the pip-minor-patch group
([#4804](https://github.com/headroomlabs-ai/headroom/issues/4804))
([e89d2c2](https://github.com/headroomlabs-ai/headroom/commit/e89d2c2ab2545ce8378e9d5aa4dee4d593161ecb))
* bump the npm-minor-patch group across 3 directories with 10 updates
([#4813](https://github.com/headroomlabs-ai/headroom/issues/4813))
([6182b5f](https://github.com/headroomlabs-ai/headroom/commit/6182b5fe062b27de013b4e6fa71906b6c2c0d89f))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: headroom-release[bot] <352661243+headroom-release[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-21 17:25:16 -08:00
..
2026-11-21 17:25:16 -08:00

@headroom-ai/openclaw

Context compression plugin for OpenClaw. Compresses tool outputs, code, logs, and structured data — 70-90% token savings with zero LLM calls.

Tool-call normalization preserves provider metadata, including thought signatures, when restoring assistant turns after compression.

Install

Recommended one-command setup:

headroom wrap openclaw

Manual install:

pip install "headroom-ai[proxy]"
openclaw plugins install --dangerously-force-unsafe-install headroom-ai/openclaw

This plugin can auto-start a local headroom proxy when needed. OpenClaw treats process-launching plugins as unsafe by default, so --dangerously-force-unsafe-install is required even if you plan to use a remote proxy (the capability is declared at install time).

Local Development Install (Detection-Friendly)

Building from source requires Node.js ^22.18.0 || ^24.11.0 || >=26.0.0 for the tsup 9 toolchain. Use a supported Node release before running npm ci and npm run build. This is a source-build requirement; the published plugin uses the Node runtime supported by your OpenClaw host and does not run tsup during plugin loading.

If you are testing from this repo, run npm install/build from the plugin directory so local launcher detection aligns with runtime paths. These linked installs are supported:

cd plugins/openclaw
npm install
npm run build
openclaw plugins install --dangerously-force-unsafe-install --link .
openclaw plugins install --dangerously-force-unsafe-install --link dist

From the repo root, install the plugin directory explicitly:

openclaw plugins install --dangerously-force-unsafe-install --link ./plugins/openclaw

Or, from inside dist/:

cd plugins/openclaw/dist
openclaw plugins install --dangerously-force-unsafe-install --link .

Why this matters:

  • The plugin checks launchers in this order: PATH -> local npm bin -> global npm -> python.
  • "local npm bin" means plugins/openclaw/node_modules/.bin/headroom relative to the source checkout.
  • Using --link dist (or --link . from dist/) still keeps runtime code adjacent to the checkout, and launcher detection falls back to PATH/global/python if a local npm bin is not present under the installed root.
  • plugins/openclaw also carries a no-op hook shim so OpenClaw's hook-pack fallback treats the path as valid instead of emitting a misleading package.json missing openclaw.hooks warning.
  • If you install from a .tgz, local npm bin may not exist in the installed extension and detection will fall back to PATH/global/python.

Configure

Install automatically selects the contextEngine slot for headroom on current OpenClaw releases. If you need to switch back manually, set plugins.slots.contextEngine to "legacy" or another engine id.

{
  "plugins": {
    "entries": {
      "headroom": {
        "enabled": true,
        "config": {
          "proxyUrl": "http://127.0.0.1:8787"
        }
      }
    },
    "slots": {
      "contextEngine": "headroom"
    }
  }
}

proxyUrl is optional. If omitted, the plugin auto-detects on localhost:

  • http://127.0.0.1:<proxyPort>
  • http://localhost:<proxyPort>

Default proxyPort is 8787. Auto-start is opt-in; in production, prefer an externally managed proxy such as systemd with proxyUrl set and autoStart: false.

Upstream gateway routing

By default, the plugin also rewrites the built-in openai-codex provider base URL to a verified active Headroom proxy at runtime. That means Codex provider traffic flows through Headroom, so /stats can observe real upstream request and cache activity instead of only local context compression.

This does not replace Headroom's existing Codex routing rules. The proxy already decides between api.openai.com and chatgpt.com/backend-api/codex/responses based on ChatGPT auth. The plugin change only points OpenClaw's provider config at the active proxy in memory and preserves the rest of the provider config.

You can also route additional provider ids such as anthropic, github-copilot, google, or openrouter through the same proxy:

{
  "plugins": {
    "entries": {
      "headroom": {
        "enabled": true,
        "config": {
          "gatewayProviderIds": ["openai-codex", "anthropic", "github-copilot", "google", "openrouter"]
        }
      }
    }
  }
}

When gatewayProviderIds is set, it becomes the exact list the plugin rewrites in memory for the current gateway process.

For convenience, the plugin also accepts family aliases:

  • codex -> openai-codex
  • claude -> anthropic
  • copilot -> github-copilot
  • gemini -> google

When OpenClaw has already resolved a provider's upstream baseUrl, the plugin preserves protocol-specific path segments while swapping only the origin. That keeps provider families on the right proxy route:

  • Codex / ChatGPT backend: /backend-api
  • OpenAI-compatible providers: /v1 or /api/v1
  • GitHub Copilot Claude-family models: /anthropic
  • Gemini: /v1beta

GitHub Copilot is a special case because OpenClaw can route it through either OpenAI Responses or Anthropic Messages depending on the selected model. The plugin only rewrites Copilot when OpenClaw has already resolved the upstream baseUrl, so it can preserve the correct /v1 or /anthropic path instead of guessing.

The routing is intentionally lightweight and reversible:

  • the plugin does not persist provider baseUrl changes back to openclaw.json
  • disabling the plugin, clearing gatewayProviderIds, or restarting without Headroom restores OpenClaw's normal provider resolution
  • if you want durable provider rewrites, use headroom wrap openclaw instead of relying on plugin install side effects

If you need to disable that behavior:

{
  "plugins": {
    "entries": {
      "headroom": {
        "enabled": true,
        "config": {
          "routeCodexViaProxy": false
        }
      }
    }
  }
}

Local proxy (auto-start)

When proxyUrl points to localhost (or is omitted), the plugin will auto-start headroom proxy if no running proxy is detected. Launch order:

  1. headroom from PATH
  2. local npm bin (node_modules/.bin/headroom)
  3. global npm bin
  4. Python module (python -m headroom.cli proxy ...)

If pythonPath is set, it is tried first in the Python fallback step.

Docker-native Headroom installs intentionally leave pythonPath unset so this launcher order prefers the installed host headroom wrapper on PATH, which then runs Headroom in Docker.

Remote proxy (connect-only)

Point proxyUrl to any reachable Headroom instance:

{
  "config": {
    "proxyUrl": "https://headroom.example.com:8787"
  }
}

Remote URLs are connect-only — the plugin probes the URL at startup and fails fast if the proxy is not reachable. No subprocess is spawned for remote addresses.

Manual Proxy Setup

If you prefer to manage the proxy yourself (or are running a remote instance), start it before launching OpenClaw:

Python install:

pip install "headroom-ai[proxy]"
headroom proxy --host 127.0.0.1 --port 8787

NPM install:

npm install -g headroom-ai
headroom proxy --host 127.0.0.1 --port 8787

How It Works

Every time OpenClaw assembles context for the model, the plugin compresses tool outputs and large messages:

  • JSON arrays (tool outputs, search results) — statistical selection keeps anomalies, errors, boundaries
  • Code — AST-aware compression via tree-sitter
  • Logs — pattern deduplication, keeps errors and boundaries
  • Text — ML-based token compression

Compression is lossless via CCR (Compress-Cache-Retrieve): originals are stored and the agent gets a headroom_retrieve tool to access full details when needed.

Configuration Options

Option Default Description
proxyUrl auto-detected Optional URL of a Headroom proxy. Configured URLs are probe-gated before provider routing. Remote URLs (https://headroom.example.com) are connect-only.
proxyPort 8787 Port used for default auto-detect and optional local auto-start when proxyUrl is not set.
pythonPath auto-detected Optional Python executable override for Python fallback launcher.
autoStart false Opt-in auto-start for a local headroom proxy if not already running (local URLs only; ignored for remote proxies). Keep false when systemd owns the proxy.
startupTimeoutMs 20000 Time to wait for auto-started proxy to become healthy
requestTimeoutMs 2000 Maximum milliseconds to wait for a single compress() call. The SDK aborts the request at this deadline and the original messages are used as a fallback.
minContextChars 800 Skip proxy compression below this approximate 200-token context floor. Large single tool results still qualify; set to 0 to disable the gate.
circuitBreakerThreshold 3 Number of consecutive assemble() failures before the circuit breaker opens and all requests bypass the proxy. Counts every way the proxy can fail a call — connection errors, timeouts, 5xx responses, and results that come back with no token count. Prevents cascading failures when the proxy is unhealthy.
circuitBreakerCooldownMs 60000 How long (ms) the circuit breaker stays open after the threshold is reached. After the cool-down the breaker resets automatically and the next assemble() call re-probes the proxy by attempting a real compression.
routeCodexViaProxy true Rewrite OpenClaw's built-in openai-codex provider to use the active Headroom proxy in memory so upstream Codex requests pass through Headroom.
gatewayProviderIds [] Optional explicit list of OpenClaw provider ids to route through the active Headroom proxy in memory. Friendly aliases codex, claude, copilot, and gemini are also accepted. When set, this overrides the default openai-codex routing list.
announceCompression true Adds a static, cache-stable notice to the system prompt the first time a session compresses more than 100 tokens, then keeps it unchanged for the rest of the session. Set to false to guarantee Headroom never modifies the system prompt.
commitLogPath $HEADROOM_WORKSPACE_DIR/openclaw/commit-log.json, else ~/.headroom/openclaw/commit-log.json Where the plugin records each turn OpenClaw has accepted (one small marker file per turn, in a sibling commit-log.d/ directory), so a retried commit is answered as a duplicate even after a restart. Must be on a writable filesystem: on a read-only root (common in Kubernetes), point this or HEADROOM_WORKSPACE_DIR at a writable volume. While commits fail, OpenClaw 2026.9.9+ runs each later turn of the session on its legacy context path.

Comparison with lossless-claw

lossless-claw headroom
Compaction method LLM summarization (DAG) OpenClaw native compaction (delegated)
Cost of compaction Tokens (LLM calls) OpenClaw configuration-dependent
Best for Long conversations Tool-heavy agents with large outputs
Retrieval lcm_grep, lcm_expand headroom_retrieve (instant)

License

Apache-2.0