claudeers.
// Developer Tools

headroom

Know your headroom. Context window usage bar for Claude Code.

Slowing down
67/100
last commit 4 months ago
last release none
releases 0
open issues 0
// star history

Install with your AI

Paste into Claude Code, Cursor, or any agent — it reads the repo and wires the tool into your project.

Install and set up headroom (git-clone project) into my current project.
Found on https://claudeers.com/headroom-2
Repo: https://github.com/henchmarketing-rgb/headroom
Homepage/docs: https://henchmarketing.online
Detected install method: git-clone → git clone https://github.com/henchmarketing-rgb/headroom
Category: devtools. Platforms: api.
Read the repo's README for exact setup and env vars, then install it and wire it into my project.

Claudeers Health Verdict:
slowing; community-verified: false. Confirm the source before running anything.
// or clone
git clone https://github.com/henchmarketing-rgb/headroom

// compatibility

Platformsapi
Operating systems
AI compatibilityclaude
LicenseMIT
Pricingopen-source
LanguageShell

headroom

headroom

You're deep in a session. Claude starts dropping earlier context. Compaction fires mid-turn and takes work in progress with it. You had no warning. Claude Code gives you nothing on context usage.

headroom fixes that. A live bar in your statusline, updated after every tool call.

████████░░ 78.3%

Now you can see the window filling up. Pace the session, decide when to /compact, or start fresh before things go sideways.

Reads your actual session JSONL, not an estimate. Tracks the model you're running (not the env var), so it stays accurate when you switch mid-session. Per-directory, so multiple Claude Code windows don't bleed into each other.


Install

curl -fsSL https://raw.githubusercontent.com/henchmarketing-rgb/headroom/main/install.sh | bash

Restart Claude Code to activate.

Requires: Python 3, Claude Code


How it works

A PostToolUse hook fires after every Bash, Agent, or Write call. It finds the most recently modified session JSONL in your project directory, reads the last token usage entry, and writes it to ~/.claude/. The statusline picks that up and renders the bar.

The model is read from the JSONL, not the ANTHROPIC_MODEL env var, so it tracks correctly when you run /model mid-session.

Sonnet 4.6 and the 1M context window: standard Sonnet 4.6 runs at 200k context. Only max effort mode (/model then select max) unlocks the full 1M. Claude Code logs that as claude-sonnet-4-6[1m] in the session JSONL and headroom adjusts the ceiling automatically. High thinking still logs as claude-sonnet-4-6 and stays at 200k.


Manual install

bash install.sh

Or copy the files yourself:

FileDestination
context-counter.py~/.claude/hooks/context-counter.py
statusline.sh~/.claude/statusline.sh

Then add to ~/.claude/settings.json:

{
  "statusline": { "command": "bash ~/.claude/statusline.sh" },
  "hooks": {
    "PostToolUse": [{
      "matcher": "Bash|Agent|Write",
      "hooks": [{ "type": "command", "command": "python3 ~/.claude/hooks/context-counter.py", "timeout": 3 }]
    }]
  }
}

Uninstall

rm ~/.claude/hooks/context-counter.py ~/.claude/statusline.sh

Remove the statusline and hook entries from ~/.claude/settings.json.

// faq

What is headroom?

Know your headroom. Context window usage bar for Claude Code.. It is open-source on GitHub.

Is headroom free to use?

headroom is open-source under the MIT license, so it is free to use.

What category does headroom belong to?

headroom is listed under devtools in the Claudeers registry of Claude-compatible tools.

0 views
68 stars
unclaimed
updated 2 months ago

// embed badge

headroom on Claudeers
[![Claudeers](https://claudeers.com/api/badge/headroom-2.svg)](https://claudeers.com/headroom-2)

// retro hit counter

headroom hit counter
[![Hits](https://claudeers.com/api/counter/headroom-2.svg)](https://claudeers.com/headroom-2)

// reviews

// guestbook

0/500

// related in Developer Tools

🔓

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Curs…

// devtoolsaffaan-m/JavaScript240,305MIT[ claude ]
🔓

Use Garry Tan's exact Claude Code setup: 23 opinionated tools that serve as CEO, Designer, Eng Manager, Release Manager, Doc Engineer, and QA

// devtoolsgarrytan/TypeScript128,278MIT[ claude ]
🔓

AI coding assistant skill (Claude Code, Codex, OpenCode, Cursor, Gemini CLI, and more). Turn any folder of code, SQL schemas, R scripts, shell scripts, docs,…

// devtoolssafishamsi/Python109,277MIT[ claude ]
🔓

Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.

// devtoolsDietrichGebert/JavaScript104,762MIT[ claude ]
→ see how headroom connects across the ecosystem