Repository navigation
v2.8.0 — Windows support
The plugin now runs on Windows under Git for Windows (#9). This release also hardens the doctor on every platform.
⚠️ Updating from v2.7.4 or earlier? Run the doctor once
/headroom-usage-indicator:doctor --fix
v2.8 spawns the bundled MCP by the bare name headroom. That change is what makes Windows work, and it removes the old launcher's ~/.headroom-venv fallback. If an earlier doctor bootstrapped your engine there, it is not on your PATH. --fix shims it into ~/.local/bin and registers it as a user-scoped MCP by absolute path, so it connects without a shell-rc edit. Until you run it, a dead MCP looks exactly like an idle badge.
Windows
- Prerequisite: Git for Windows (Git Bash). Claude Code runs hooks and the status line through it.
- One engine resolver (
scripts/lib/engine-resolve.sh) finds the engine in theScripts\venv layout,uv tooltrampolines, and pip'sheadroom.exelaunchers. The doctor, the hooks,hcatand the session probe all use it, so they always agree on which engine they mean. - The doctor:
- Bootstraps a venv with
py -3/python. - Shims
headroom.exeinto%USERPROFILE%\.local\bin. - Writes the status line through
Git\bin\bash.exe. - Tells you the one Path entry to add.
- On Windows on ARM, detects the wheel-tag mismatch and points you to the x64 Python.
- Bootstraps a venv with
hcat: output is UTF-8 on every platform, and piping it intoheadno longer prints aBrokenPipeError.- Known caveat: Windows resolves a bare command name from the project directory before
PATH. So aheadroom.execommitted to a repo you open would be spawned by the bundled entry. The doctor and the session probe flag such a file, and--fixadds an absolute-path registration next to the bundled one.
The doctor won't persist a project's own headroom
The shim and the user-scoped MCP registration outlive the project the doctor runs in. --fix now refuses a headroom that resolves inside the current project or through a relative path, which is where a repo's own HCAT_PYTHON, UV_TOOL_DIR or PATH settings would steer it. It names the setting that pointed there. An existing registration that already works is judged first, by actually starting it, and left alone.
Other fixes
- Windows-syntax status lines are no longer mangled. A custom status line written for a native spawner (
node C:\...\sl.js,..\tools\sl.cmd,%APPDATA%\sl.js) is no longer chained into the bash badge, where bash would strip its backslashes. The doctor refuses the merge, leavessettings.jsonuntouched, and tells you how to rewrite it. Bash-legal backslashes still pass:printf '\n',date +%H, jq/awk escapes,grep 1\.2\.3, single-quoted regexes. - Fixable-forever message gone. After a successful
--fix, a plain/doctorno longer reports "1 fixable" forever. - Working
uvx-style MCP accepted. SessionStart no longer flags a workinguvx-style MCP registration as broken. - Gate and
hcatagree. The Read gate askshcat --toon-checkwhether it will really compress a file, so it never denies a Read thathcatwould then refuse. hcattime limit.hcat's default time limit is now 90s. The old 120s never fired, because the Bash tool's own 120s kill always won.
How it was tested
- Review: 42 review rounds (8 reviewers each for the last ten). Every fix has a regression test, and each test was checked by removing its fix and confirming the test then fails.
- CI:
ubuntu-latest,macos-latestandwindows-latest, each with a real engine installed.- Ubuntu and macOS: 1215 tests pass, 0 fail.
- Windows: the runner exercises the resolver against genuine venv,
uv tooland pip layouts,doctor --fixend to end, and a shell-less bare-name MCP spawn. Windows failures are ratcheted by name against.github/windows-known-failures.txt, so the list can only shrink. - Fixture floors fail the build if coverage silently drops.
- Mac end-to-end: a sandboxed install and a live Claude Code session, including a real
headroom_compresscall.
Still unverified: Claude Code itself on a real Windows machine (hooks firing, the status-line spawn, the /plugin connected mark). CI runs the scripts on a Windows runner, but it cannot run Claude Code itself. If the badge doesn't render for you on Windows, please paste your statusLine.command into #9.
Tests: 556 → 1215 pass / 0 fail (POSIX), shellcheck clean.
Full diff: v2.7.4...v2.8.0