Repository navigation
feat(kin): a quiet scheduled ping keeps an idle session's shared instructions cached - #1094
Merged
Merged
Conversation
Use each part's measured request history to schedule a detached Claude cache ping. Give its SDK process the normal instruction block and roster but no tool authority. T3-file: apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.ts: keep the base leading-block expectation valid with the SDK's string-or-block-array type. People-change: A busy company's agents can reuse their instructions sooner; a quiet company does not pay for keep-warm requests. Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
T3-file: packages/shared/src/serverSettings.test.ts: verify the shared patch implementation cannot toggle a host-only setting without removing the existing wire field. People-change: None; records why the test belongs at the shared settings boundary. Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Forward the accepted-offer acknowledgement. Keep part observations fresh over a long-running query and refuse to warm a stale launch after a live model or flag change. People-change: Ordinary chats still acknowledge queued replies when cache measurement is on. Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
A ping that missed the cache rewrote the whole block, but only hits were used to price the next ping, so a prefix that never matched kept pinging at rewrite cost. The latest completed ping now prices the next one, and a miss stops pings for that part. People-change: A company whose keep-warm requests stop matching no longer pays for them repeatedly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A completed keep-warm row moved the lead's "since your last turn" mark, so the owner's reactions before a ping never reached the next turn; a failed one counted in the evening summary's failed wake-ups. Both reads now count only kind = 'turn'. People-change: The owner's reactions reach the lead's next turn even after a keep-warm request; the evening summary no longer reports keep-warm failures as failed wake-ups. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bill known usage through KinBudget, require a real at-risk sample, and stop on unknown-cost results until a real turn supplies evidence. Keep the normal stream safe and close only the leased MCP session. People-change: Keep-warm requests count once toward the owner’s budget and shown spend, without adding chat turns. Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Claude used stateless discovery for agent turns but fell back to a different descriptor schema for a stateful upkeep lease. Pin the documented stateful handshake for both leading-block queries and recheck active-agent admission before serving a lease. People-change: Keep-warm requests can now reuse the same tools a fresh agent session sees, and paused or retired agents cannot open upkeep sessions. Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Reflect the roster lease admission in the unrelated numbers fixture, which denies identity operations it does not exercise. People-change: No change to how numbers or upkeep work. Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Allow stateless discovery and listing through lease admission while preserving the full roster comparison and existing stateful session restrictions. Restore real Claude sessions to their original protocol selection and launch options. People-change: Keep-warm requests use the same protocol as agent turns without changing what a real turn can see or do. Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Use the budget’s speculative-work admission rule at both gates, recover from a lone cache miss after real demand, and keep upkeep’s token usage out of turn cache-hit rates without changing its charge. People-change: Keep-warm requests yield at low budget, recover after a one-off miss, and no longer inflate the cache-hit rate shown for turns. Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
A real turn releases the wait after a lone miss; it cannot break the sequence of upkeep outcomes or the second miss would never suppress a retry. People-change: Two consecutive keep-warm misses stop repeat spending even when real work ran between them. Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
…ions cached People-change: none Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
People-change: none Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
A new Kin session reuses the shared first block only while the provider still has it cached. After about 49 idle minutes it lapses, so the next session rewrites it.
kinInstructionPlacementand never ping under"system", where nothing is reused between sessions. It also gives the ping the worded prompt "Kin is keeping this conversation ready: nobody is waiting and nothing is asked. This turn calls no tool, kin_skip included, and its whole reply is one plain word." in place of this step's placeholder.kin_cache_partsand three cache columns onkin_wakeups.People-change: Agents in a busy company can reuse their instructions sooner, and a quiet company, or a host that keeps instructions in the system prompt, pays for no keep-warm requests.
Checked as part of train 18's one check at the tip.
Two independent reviews by Claude Opus 5.5: the first found it does not land yet, and the second, after those fixes, found it LANDS. Both rounds' fixes are on this branch.
🤖 Generated with Claude Code