-
Notifications
You must be signed in to change notification settings - Fork 2
context-guard / rate-limit-guard: durable statusline wiring (version-independent shim) #1251
Copy link
Copy link
Closed
Feature
Copy link
Labels
needs-humanHuman-in-the-loop required; autonomous sessions must not resolve items carrying this.Human-in-the-loop required; autonomous sessions must not resolve items carrying this.priority: mediumReal value, no hard deadline; normal backlog flow.Real value, no hard deadline; normal backlog flow.status: readyTriaged, unblocked, and fully specified; eligible to pick up.Triaged, unblocked, and fully specified; eligible to pick up.work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.A briefed fix or small feature; blast radius bounded by the brief, tests exist.
Description
Activity
Metadata
Metadata
Assignees
Labels
needs-humanHuman-in-the-loop required; autonomous sessions must not resolve items carrying this.Human-in-the-loop required; autonomous sessions must not resolve items carrying this.priority: mediumReal value, no hard deadline; normal backlog flow.Real value, no hard deadline; normal backlog flow.status: readyTriaged, unblocked, and fully specified; eligible to pick up.Triaged, unblocked, and fully specified; eligible to pick up.work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.A briefed fix or small feature; blast radius bounded by the brief, tests exist.
Problem
Both guard plugins tell the operator to wire
bash "<plugin-root>/scripts/statusline-tee.sh" <their statusline>intosettings.json.${CLAUDE_PLUGIN_ROOT}is version-pinned (~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/) and the old version directory is pruned ~14 days after an update (plugins reference, "Plugin cache and file access", fetched 2026-07-24). So that wiring:bash <missing-path>exits 127 and the wrapped statusline never runs.setup checkdetects (1) only on demand, and an interim[ -f … ]existence guard fixes (2) but not (1).Decision
Ship a version-independent shim in both plugins (
scripts/statusline-shim.sh), installed bysetup applyto~/.claude/<plugin>/bin/statusline-shim.sh— inside each plugin's already-accepted operator-home carve-out. The operator wires the shim ONCE; it resolves the newest installed tee at run time, so version bumps need no re-wiring, and it degrades transparently when no tee is installed (including after uninstall).Rejected alternatives: keep the interim guard (still stops teeing on every bump); inline the resolution glob in
settings.json(untestable shell frozen in an operator file, unreadable once two tees chain); a${CLAUDE_PLUGIN_DATA}home for the shim (deleted on uninstall — reintroduces the 127 failure — and hardcodes the marketplace name into operator settings).Scope
scripts/statusline-shim.sh+statusline-shim.test.shincontext-guardandrate-limit-guardsetup applyinstalls the shim (widens context-guard's apply scope; gives rate-limit-guard anapplyfor the first time);setup checkgains an installed-shim state and reclassifies cache-path wiring as LEGACYdocs/MIGRATION-PLAYBOOK.md(new write surface: an inert, byte-identical copy of reviewed bundled code)Statusline wiring itself stays print-only — the plugin never edits
settings.json.