Skip to content

Tui UI - #29

Merged
ayan-de merged 3 commits into
mainfrom
tui-ui
Sep 5, 2026
Merged

Tui UI#29
ayan-de merged 3 commits into
mainfrom
tui-ui

Conversation

@ayan-de

@ayan-de ayan-de commented Sep 5, 2026

Copy link
Copy Markdown
Owner

No description provided.

ayan-de and others added 3 commits September 6, 2026 01:42
…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
@vercel

vercel Bot commented Sep 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
freecode-docs Ready Ready Preview Sep 5, 2026 9:36pm UTC
freecode-web Ready Ready Preview Sep 5, 2026 9:36pm UTC

@ayan-de
ayan-de merged commit 49b0fc2 into main Sep 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant