Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is steal (8), the top one, from the 2026-10-23 competitor check (internal note, Q3). Every rival that acts shows its state live; this guard showed it only in
/agent-guard status.While agents run on this machine, or the guard is asking, holding or has just refused something, a line above the prompt (the
AbovePromptband) shows it:What it shows
How it behaves
[-]collapses it.hasSurvey).How it's built
bandLine()andbandExpiry()incore/status.tsstay pure. EachDenialnow records itsrule, so the band can name it.refreshStatuswrites the line to$.state(agent-usage-guard.band, declared in the newtypes/index.d.tscontract named inplugin.json) only when it changed. Aui.renderhook onAbovePromptdraws from it with plainh()calls, so the module stays.ts. The band also refreshes when the session publishes its counts and when a question opens or closes.questionHeldto keep a question open while a test looks.Distribution step once this ships: a short clip of the band filling during a burst.
Test plan
tests/band.test.ts, on terminal and desktop: nothing shows with nothing to say; 2 local + 1 peer agents show as "3 of 4 running · 3 of 12 started"; an open question shows while it's asked, then the decline and last refusal; it clears by itself 10 minutes later in a quiet session; a headless session draws nothingclaude plugin test .on 2.1.310: 108 pass. With the code stashed, the three band tests that expect a line fail.claude plugin validate . --strictlists the hook and theagent-usage-guard.bandstate reads and writes against the contract;tscis clean--plugin-dir, installed copy switched off, a seeded peer record in the dev store, restored afterwards):Usage guard · 2 of 4 agents running · 2 of 12 started in the last 10 mindrew above the prompt with the engine's[-]. No model turn ran.