Skip to content

v2.8.0 — Windows support

Choose a tag to compare

@Abhi902 Abhi902 released this 28 Sep 06:27
· 13 commits to main since this release

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 the Scripts\ venv layout, uv tool trampolines, and pip's headroom.exe launchers. The doctor, the hooks, hcat and 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.exe into %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.
  • hcat: output is UTF-8 on every platform, and piping it into head no longer prints a BrokenPipeError.
  • Known caveat: Windows resolves a bare command name from the project directory before PATH. So a headroom.exe committed to a repo you open would be spawned by the bundled entry. The doctor and the session probe flag such a file, and --fix adds 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, leaves settings.json untouched, 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 /doctor no longer reports "1 fixable" forever.
  • Working uvx-style MCP accepted. SessionStart no longer flags a working uvx-style MCP registration as broken.
  • Gate and hcat agree. The Read gate asks hcat --toon-check whether it will really compress a file, so it never denies a Read that hcat would then refuse.
  • hcat time 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-latest and windows-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 tool and pip layouts, doctor --fix end 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_compress call.

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