Assurance and governance

Context Guard

Measures where your context window goes and warns before you run out.

Status, in the repository's words: Published

Repositorybulletproof-context-guard
OwnerBulletproofSoftwareAI
Version3.8.3
In suite v1.0.03.8.3, tagged 2026-11-14
Released2026-11-14
LicenseApache-2.0

What it is

A plugin that watches your context window during a session and escalates through four warning tiers.

Its MCP server breaks current context usage into compartments, such as the system prompt.

Measurement is its main job; the README notes that Claude Code now handles the warning case natively.

The numbers are meant as a relative instrument, for seeing what changed after you adjust your setup.

What it does today

What it ships

What it needs

Install

Copied from the repository's README. This site has not run these commands.

/plugin marketplace add BulletproofSoftwareAI/bulletproof-context-guard
/plugin install context-guard@context-guard

Limits and known issues, as the repository lists them

As listed on branch main of BulletproofSoftwareAI/bulletproof-context-guard on 2026-11-30, commit 27526f8: newer than the version described above.

  • No tier warnings fire unless the status-line sensor is wired.
  • The status-line command path has to be updated after a plugin update.
  • Per-category numbers are estimates, because Claude Code does not expose per-category token counts.
  • Known gap: tool definitions are not a separate compartment in the breakdown.
  • The audit's probe weighs MCP tool names only; full input schemas are not measured.
  • Threshold edits live in plugin.json inside the installed plugin, so a plugin update replaces them.

Documents in the repository

Source code

Where each statement on this page comes from

Read from BulletproofSoftwareAI/bulletproof-context-guard, branch main, commit fa35b39; the limits and known issues from BulletproofSoftwareAI/bulletproof-context-guard, branch main, commit 27526f8, read on 2026-11-30. File and line for each statement:

  1. Measures where your context window goes and warns before you run out. README.md:3
  2. Published CHANGELOG.md:4
  3. 3.8.3 .claude-plugin/plugin.json:3
  4. 2026-11-14 CHANGELOG.md:7
  5. Apache-2.0 README.md:113
  6. A plugin that watches your context window during a session and escalates through four warning tiers. docs/OVERVIEW.md:4
  7. Its MCP server breaks current context usage into compartments, such as the system prompt. README.md:12
  8. Measurement is its main job; the README notes that Claude Code now handles the warning case natively. README.md:18
  9. The numbers are meant as a relative instrument, for seeing what changed after you adjust your setup. README.md:57
  10. The context_budget tool returns current context-window usage with a 5-compartment breakdown. docs/HOW-TO-USE.md:87
  11. Measures prompt-cache behaviour: the cache hit ratio and how often the cache was re-primed mid-session. README.md:30
  12. Warns the model in 4 tiers before auto-compaction. .claude-plugin/plugin.json:4
  13. Warnings are advisory: every tier tells the model to keep working into compaction. .claude-plugin/plugin.json:4
  14. Nothing in the plugin refuses a tool call. CHANGELOG.md:146
  15. Warnings are injected into the model's context, and the tier can fall again when usage drops. README.md:35
  16. The compaction threshold is averaged from recent auto-compaction samples. docs/CONFIGURATION.md:56
  17. Tracks the burn rate over the last 3 readings and can bump the warning tier by one when context is being used quickly. docs/CONFIGURATION.md:55
  18. Supports recovery around compaction: it verifies that state was saved and resumes afterwards. README.md:41
  19. The audit measures what every session loads before the first prompt, including CLAUDE.md and the skill and agent listings. CHANGELOG.md:119
  20. An MCP server with a single tool, context_budget. docs/OVERVIEW.md:104
  21. Hooks for the SessionStart, PreToolUse and PreCompact events. README.md:82
  22. A status-line script that acts as the sensor: it computes the tier, velocity and dynamic threshold. docs/OVERVIEW.md:88
  23. An optional static audit, run with the /context-guard:audit command. docs/OVERVIEW.md:25
  24. Two standalone Python helpers, velocity.py and thresholds.py, which are not wired into the hooks. docs/ADMINISTRATOR.md:87
  25. Bundled test suites; the expected last line of a run is 9/9 test files passed. docs/INSTALL.md:109
  26. bash, jq and Python 3.10 or newer (standard library only). README.md:90
  27. Claude Code, which hosts the plugin's hooks and MCP server. docs/INSTALL.md:11
  28. A plugin cannot set your status line, so wiring the sensor is a one-time manual edit of your settings. docs/INSTALL.md:49
  29. There is no build step, package registry artifact or Docker image. docs/OVERVIEW.md:102
  30. No tier warnings fire unless the status-line sensor is wired. docs/ADMINISTRATOR.md:162 at 27526f8
  31. The status-line command path has to be updated after a plugin update. docs/INSTALL.md:67 at 27526f8
  32. Per-category numbers are estimates, because Claude Code does not expose per-category token counts. README.md:50 at 27526f8
  33. Known gap: tool definitions are not a separate compartment in the breakdown. README.md:60 at 27526f8
  34. The audit's probe weighs MCP tool names only; full input schemas are not measured. README.md:69 at 27526f8
  35. Threshold edits live in plugin.json inside the installed plugin, so a plugin update replaces them. docs/CONFIGURATION.md:64 at 27526f8
  36. Install section of the README README.md:73

Bulletproof suite v1.0.0 pins tag context-guard--v3.8.3, commit fa35b39, tagged 2026-11-14.