Skip to content

feat(plugin): opt in to manual pings with x-context-guru-ping; ping explains an unheld cache - #667

Merged
OsherElhadad merged 4 commits into
mainfrom
feat/ping-header
Oct 22, 2026
Merged

OsherElhadad merged 4 commits into
mainfrom
feat/ping-header

Conversation

@OsherElhadad

Copy link
Copy Markdown
Collaborator

Follow-up to #659 for the manual-only hold (#666).

  • Install adds x-context-guru-ping: 1 to env.ANTHROPIC_CUSTOM_HEADERS, NEWLINE-separated (Claude Code reads that variable by lines; a comma-joined value arrives as one corrupted header). It is appended: the user's headers and a hosted x-context-guru-token are kept, a ping line the user set is left alone, re-runs add nothing twice, and a project installed before this gets it on its next install run. Uninstall removes only the line we recorded adding (and the variable, if nothing else is in it). --no-ping-header skips it.
  • The OSS install never wrote this variable with commas, so there was no comma bug to fix here.
  • cg.py ping and the mod toast use cachestate's ping_reason on a 409 "not held", with the wording core-backend suggested. The Codex copy of cg.py is in sync.
  • other_env_keys no longer counts our header line as the user's.

Tests: new ping_header_test.go (add, merge, re-run, uninstall, user-owned line, opt-out, repair), a ping_reason Go test, claude plugin validate and test (22), full go test ./context-guru-plugin/.

Assisted-By: Claude Opus 5.5 [email protected]

…xplains an unheld cache

The install adds `x-context-guru-ping: 1` to env.ANTHROPIC_CUSTOM_HEADERS so the
proxy may hold a session's cache request for a manual ping when keep-alive is
off. The variable is NEWLINE-separated (a comma-joined value arrives as one
corrupted header), so the line is appended, the user's own headers and any
x-context-guru-token are kept, a ping line the user set is left alone, and
uninstall removes only the line we recorded adding. --no-ping-header skips it.

`cg.py ping` and the mod's toast use cachestate's ping_reason on a 409
"not held" instead of blaming keep-alive.

Assisted-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Osher Elhadad <[email protected]>
Osher Elhadad added 3 commits October 22, 2026 12:33
below limits, pings used, stopped and no entry join the existing five, in
cg.py ping and the mod toast. A code from a newer server reads "cannot ping
this session right now".

Assisted-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Osher Elhadad <[email protected]>
…in means

"unavailable" joins the other nine ping_reason codes in cg.py and the mod (a
test per code). install.sh reports a ping_note consent line whenever it writes
the x-context-guru-ping header (what the server keeps, for how long, that it
never pings automatically for it), accepts --no-ping-header, and carries it in
the printed confirm command. The install skill relays the note.

Assisted-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Osher Elhadad <[email protected]>
…consent line

Assisted-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Osher Elhadad <[email protected]>
@OsherElhadad
OsherElhadad merged commit 328064e into main Oct 22, 2026
4 checks passed
@OsherElhadad
OsherElhadad deleted the feat/ping-header branch October 22, 2026 13:58
@github-project-automation github-project-automation Bot moved this from New/ToDo to Done in Rossoctl Issue Prioritization Oct 22, 2026
amiddavid added a commit that referenced this pull request Oct 22, 2026
…0.2.4) (#673)

chore(plugin): bump the plugins for v0.5.4 (Claude Code 0.5.4, Codex 0.2.4)

Both plugins changed in this release, so installed plugins must update.

- Claude Code plugin: the new band and pane (#659), one status-line
  timer and the 12 old commands removed (#660), the Ping header and
  ping reasons (#667), and the save-more settings card (#648).
- Codex plugin: the vendored cg.py and the save-more settings card
  from #648, #660 and #667.

Assisted-By: Claude
Signed-off-by: DAVID AMID <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant