Context Bar, Terse Mode & Compress (Claude Code)

July 18, 2026 · View on GitHub

Claude Code: Context Bar

Maestro ships an optional status line for Claude Code: a context-window progress bar showing how much of the model's context is used.

████████░░░░░░░░░░░░ 42% 84k/200k · my-project

The bar updates live, shifts from green to amber to red as context fills, and detects the model's context window automatically, including the 1M-token Opus tier. It is enabled by default once installed.

Install on Windows / PowerShell:

mkdir ~/.claude/statusline, ~/.claude/commands -Force
curl -o ~/.claude/statusline/context-bar.ps1 https://raw.githubusercontent.com/mbanderas/maestro/main/statusline/context-bar.ps1
curl -o ~/.claude/commands/context-bar.md https://raw.githubusercontent.com/mbanderas/maestro/main/commands/context-bar.md

Install on macOS / Linux (the bar requires jq; without it the status line shows the folder name only):

mkdir -p ~/.claude/statusline ~/.claude/commands
curl -o ~/.claude/statusline/context-bar.sh https://raw.githubusercontent.com/mbanderas/maestro/main/statusline/context-bar.sh
curl -o ~/.claude/commands/context-bar.md https://raw.githubusercontent.com/mbanderas/maestro/main/commands/context-bar.md
chmod +x ~/.claude/statusline/context-bar.sh

Then point Claude Code at the script by adding a statusLine block to ~/.claude/settings.json (use the absolute path to the script):

// Windows
"statusLine": {
  "type": "command",
  "command": "powershell -NoProfile -ExecutionPolicy Bypass -File \"C:\\Users\\you\\.claude\\statusline\\context-bar.ps1\""
}

// macOS / Linux
"statusLine": {
  "type": "command",
  "command": "bash /Users/you/.claude/statusline/context-bar.sh"
}

Enable / disable: the bar is on by default. Toggle it with the /context-bar slash command:

CommandEffect
/context-barToggle on/off
/context-bar offDisable; status line shows the folder name only
/context-bar onRe-enable

The toggle is a flag file (.context-bar-disabled) next to the script. No settings edit, no restart. The change applies on the next status line refresh.

Staying current. The status-line scripts are a standalone copy: a plugin cannot edit your settings.json or copy the script at install time, so an update to the plugin would otherwise leave your wired copy stale (you keep seeing the old render after the fix shipped). The plugin's maestro-statusline-sync SessionStart hook closes that gap — on each new session it refreshes ~/.claude/statusline/context-bar.{sh,ps1} from the installed plugin when they differ, so a plugin update's fixes reach your status line automatically by the next session. It is refresh-if-present only: it never creates the file, so it cannot turn the bar on for you — install once as above, and it stays current after that.

Maestro badges. When active, two compact badges trail the folder name — presence means on, absence means off, so there is no ON/OFF text to read:

  • Terse — the level in amber: ULTRA, FULL, or LITE.
  • Frontierƒ plus the panel, in blue: ƒO (single Opus), ƒO+C (a fusion panel), ƒO+C+G (the trio), ƒ✦3 (a custom panel of three). Letters are O=Opus, C=ChatGPT (GPT-5.5), G=Gemini.
████████░░░░░░░░░░░░ 42% 84k/200k · my-project  ULTRA ƒO+C

Both read their state files symlink-refusing, size-capped, and whitelisted: the badge only ever renders letters from a fixed table or a count, never bytes from the file. The frontier badge reads the per-workspace scoped file frontier-state.cc-<hash>.json when running under Claude Code (falling back to frontier-state.json for other scopes) and, on macOS / Linux, needs jq (same as the bar).

Codex CLI: this script does not apply. Codex CLI has no command-backed status line; it only renders a fixed set of built-in items. It already ships a native context-usage indicator. Enable it with the /statusline picker, or set context in the [tui].status_line list in ~/.codex/config.toml.

Claude Code: Terse Mode + Compress

Two token-efficiency tools, adapted from the MIT-licensed Caveman plugin with attribution.

Terse mode cuts output tokens while keeping full technical substance. Three levels, lite (no filler, full sentences), full (drop articles, fragments OK), ultra (abbreviations, arrows, maximum compression). Off by default: installing the plugin never changes your output style.

  • Turn on per session: /maestro:terse [lite|full|ultra]; off with /maestro:terse off, "stop terse", or "normal mode".
  • Turn on permanently: set {"terseLevel": "ultra"} in the config file for your OS (key: terseLevel; MAESTRO_TERSE_LEVEL env var overrides the file):
    • Windows: %APPDATA%\maestro\config.json
    • macOS / Linux: $XDG_CONFIG_HOME/maestro/config.json, falling back to ~/.config/maestro/config.json
    • The config file is never created automatically. Until it exists, terse mode stays off, two machines with identical hook installs can behave differently if only one has the file.
  • The maestro-terse-mode hook injects the level-filtered ruleset (single source: codex-skills/terse/SKILL.md) at SessionStart and a one-line reminder each turn, per-turn reinforcement survives context compaction, where one-shot instructions drift.
  • Quality guardrails ship with it: code, commits, and PRs are always written normal. Requested artifacts keep their voice, genre, rhetoric, formatting, and necessary length unless the user explicitly asks for terse artifact copy. Auto-Clarity drops terseness for security warnings, irreversible-action confirmations, and multi-step sequences.
  • The context bar shows the level as a small amber badge (ULTRA, FULL, LITE) while active, alongside the frontier badge when that engine is on (see Maestro badges above). The flag file is read symlink-refusing, size-capped, and whitelisted, never rendering attacker-controlled bytes.

/maestro:compress <file> rewrites a natural-language memory file (CLAUDE.md, todos, notes) in terse form to cut input tokens, savings compound every turn the file is loaded (S8). Deterministic validation (headings, byte-exact code blocks, URLs) with cherry-pick repair; the original is kept as <name>.original.md and restored on persistent failure. Files with secret-looking names (.env, credentials, keys, .ssh/.aws paths) are refused outright, compression sends file contents to the Anthropic API.