agent-ctx

agent-ctx is a Claude Code mod by Tekkiiiii that each agent loop's own context %, measured per request; a one-line CONTEXT_PCT_ALERT rides that agent's next tool result when it crosses 70% or 80%.

Updated 2026-10-15

What is agent-ctx?

agent-ctx is a Claude Code mod by Tekkiiiii that each agent loop's own context %, measured per request; a one-line CONTEXT_PCT_ALERT rides that agent's next tool result when it crosses 70% or 80%. It is listed under Context & memory and has 6 GitHub stars.

TypeClaude code mod
AuthorTekkiiiii
RepositoryTekkiiiii/the-agency
Popularity6 GitHub stars
CategoryContext & memory
SecurityLow risk (84/100)
Rank#672 of 5,272 Claude Code mods; #75 in Context & memory
Last commit2026-10-15
Hooks2 events
Seesevery tool call
Draws onnothing

Is agent-ctx safe to install?

agent-ctx scores 84/100 on the MCPMods security check: Low risk. Things to review: reads environment variables. It passed 6 of 8 checks.

Mod footprints come from claude plugin validate, which lists every event a mod hooks and every API call it makes without running it.

CheckResult
No network accessPass
Starts no processesPass
Writes no files or configPass
Reads environment variablesReview
Only sees the events it hooksPass
Doesn't drive ClaudePass
Passes claude plugin validatePass
No license detectedNote

API calls in its code

CallWhat it means
$.env.getreads env vars
$.fs.readreads files
$.session.usage
$.state.get
$.state.set

How do I install agent-ctx?

  1. Check your Claude Code version. Mods need Claude Code 2.1.287 or later and are on by default.
    claude --version
  2. Read its footprint. This lists every event it hooks and every API call it makes, without running it.
    git clone https://github.com/Tekkiiiii/the-agency
    claude plugin validate ./the-agency/mods/agent-ctx
  3. Install it. Run this in your terminal, then /reload-plugins in an open session.
    git clone https://github.com/Tekkiiiii/the-agency && claude --plugin-dir ./the-agency/mods/agent-ctx

Or ask Claude to set it up

Paste this into Claude Code and it installs agent-ctx for you:

Install the "agent-ctx" Claude Code mod from https://github.com/Tekkiiiii/the-agency/tree/main/mods/agent-ctx. Run claude plugin validate on it first and show me what it can access before you enable it.

More from Tekkiiiii/the-agency

This repository has 5 Claude Code mods on MCPMods.

  • context-band: Band above the prompt: context %, tokens, model, cost, prompt-cache size/share/TTL countdown, 5h and weekly usage-window (Review before installing)
  • loop-guard: Stall detector per agent loop: 5 identical tool calls in a row warn that loop and leave the session-state.json stall mar (Review before installing)
  • spawn-ledger: Spawn log (spawn_start/launched/end + cost, native agentId lineage), artifact check and in-session RESPAWN_REQUEST picku (Review before installing)
  • voice-compact: Startup token diet: rewrites the long CAVEMAN / PONYTAIL MODE ACTIVE hook-context injections into ~150-token compact rul (Low risk)