Repository navigation
feat(plugin): Claude Code band with cache state and a Ping button - #651
Merged
Merged
Conversation
added 4 commits
October 21, 2026 19:14
…ontext-guru:ping A hooks module (hooks/register.tsx, listed under `modules` beside the command hooks) draws a band above the prompt: dashboard link, cache warm/cold with a countdown, next-request cost warm vs cold, saved $, subagent chips, and a Ping button shown only while the main thread is warm. /context-guru:pane opens a richer pane. The mod never touches the network: it reads `cg.py cachestate --json` every 15 s and redraws only when the words change; Ping runs `cg.py ping`, which POSTs /api/me/cache/ping. Assisted-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Osher Elhadad <[email protected]>
A skill makes the model load it and run a Bash tool, a full turn on the main
context that adds tokens and saves nothing. /ping is now registered with
$.command.register and answered by a command.run hook returning { text } only:
no `context`, so nothing is recorded for the model and no turn starts (tested).
Assisted-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Osher Elhadad <[email protected]>
… once
The mod now reads the raw /api/cachestate entry that `cg.py cachestate --json`
prints (plus age_s/stale, or {"error": ...}), takes the saved $ from `money`,
and derives the dashboard link from the routed loopback ANTHROPIC_BASE_URL.
The pane drops the stats-based savings table until stats are cached too.
Assisted-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Osher Elhadad <[email protected]>
Assisted-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Osher Elhadad <[email protected]>
OsherElhadad
force-pushed
the
feat/plugin-mods
branch
from
October 21, 2026 19:20
283fb17 to
fee0635
Compare
added 4 commits
October 21, 2026 19:36
Go's mux answers a missing route with a plain-text 404. Say "unknown session" only for a 404 whose JSON doc says so; a 404/405 with no doc says the server does not support manual pings yet. cg.py, the toast, and the Codex copy. Assisted-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Osher Elhadad <[email protected]>
…live is off 409 not held / busy / cold, 429 too soon / no spare capacity, and 502 each get their own message in cg.py, the toast and /ping. The band shows a dim "keep-alive off" instead of the Ping button when the main thread is warm but the server says pingable is false (an absent field, an older server, keeps the button). Assisted-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Osher Elhadad <[email protected]>
…er budget) Assisted-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Osher Elhadad <[email protected]>
Only error "cold" says cold. "over budget" (and "too costly") get the per-ping limit message; any other 409 says "ping refused: <error>". The success text is "saved $x net (ping cost $y)" since saved_usd is already net of the ping. Assisted-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Osher Elhadad <[email protected]>
amiddavid
added a commit
that referenced
this pull request
Oct 21, 2026
…0.2.3) (#657) chore(plugin): bump the plugins for v0.5.3 (Claude Code 0.5.3, Codex 0.2.3) Both plugins changed in this release, so installed plugins must update. - Claude Code plugin: the band with cache state and a Ping button (#651), next-request cost on the status line and the context bar fix (#653), insights tools leaves out unpriced carry costs (#656), and the xhigh preset list without the sweep (#654). - Codex plugin: the vendored cg.py and cgcache.py from #651, #653 and #656. Assisted-By: Claude Signed-off-by: DAVID AMID <[email protected]>
4 of 5 tasks
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.
Adds the Claude Code mod (hooks module) and
/context-guru:ping, per the plugin-features contract §5/§6./context-guru:panericher pane (savings by category incl. manual pings, cache per thread)cg.py ping [--session] [--thread] [--json]-> POST /api/me/cache/ping; vendored to the Codex plugin copyskills/pingdoes not pre-approve the command (it spends money; guard test)Depends on:
cg.py cachestate --json(oss-statusline) and the ping endpoint (core-backend). Until both land the band stays hidden (no data).Tests:
claude plugin validate,claude plugin test(6),go test ./context-guru-plugin/. tsc was not available on this host.Assisted-By: Claude Opus 5.5 [email protected]