Conversation
…ry turn Memory recalls, the todo block, and drained <system-reminder>s were session system blocks rebuilt every inner-loop iteration. System precedes every message in the cached prefix, so any change re-sent the entire conversation at full price, with reads collapsing to the ~12K static block — the RC3/RC4 class, caught by the D2 miss detector (RC8 in the token-efficiency spec). They now ride ExecuteOptions.ephemeralTail: a final user message appended after applyMessageCaching places its anchors, so the write anchor stays on the last real message and the tail changes at the cost of only its own tokens (Claude Code's <system-reminder> architecture). Only the compaction summary remains a mutable system block — compaction documents its own invalidation. Gemini-web appends the tail to its flat prompt. Verified on MiniMax-M3: reads now track the prior request's full input near token-exact (83% cached across the trajectory suite); eval ab redirect shows quality unchanged (5/5 unchanged-pass, repeatedCalls 0->0), -22% cost on the one turn-matched case, ledger entry 2026-09-05-redirect-1 decided "kept". FREECODE_EPHEMERAL_TAIL=0 reverts placement for eval ab only (allowlisted in VARIABLE_ENV_KEYS; delete after the watch item in TODO.md clears). The fix exposed a detector false-positive class: implicit provider caches miss without a rewrite (write latency/eviction — observed read=128 then a next-turn read at exactly the pre-miss boundary). An undocumented miss is now held one sample and acquitted if the next read recovers to that boundary; otherwise it alarms one sample late (spec D2.1). Also removed a shadowed duplicate buildGenerateOptions call in generic-provider stream(). Docs: caching-architecture §1.1 (ephemeral tail), cache-observability §D2.1, token-efficiency RC8, CLAUDE.md prompt-cache invariant, TODO.md open items. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WCAoRd3QQ5cjACGLcfPZVa
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
No description provided.