Skip to content

feat(tui): add cache-expiry hint dialog for resumed and idle sessions (v2 engine) - #2646

Merged
liruifengv merged 27 commits into
mainfrom
feat/cache-expiry-hint
Aug 6, 2026
Merged

feat(tui): add cache-expiry hint dialog for resumed and idle sessions (v2 engine)#2646
liruifengv merged 27 commits into
mainfrom
feat/cache-expiry-hint

Conversation

@liruifengv

@liruifengv liruifengv commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

No linked issue — the problem is explained below.

Problem

Resuming a long-idle session, or submitting a message after the session has been idle for a long stretch, re-sends the entire history with the server-side context cache already expired — slower, more expensive, and silent today. On large sessions a single uncached replay burns a visible chunk of quota, with no warning and no cheaper alternative offered.

What changed

  • Cache-expiry hint dialog (v2 engine only): shown right after a resume finishes loading, and when a message is submitted after an in-process idle stretch. Options: Compact and continue / Start a new session / Continue as-is / Don't ask me again (persisted as cache_expiry_hint = false in tui.toml, applied on /reload too). The submitted input is stashed and re-sent automatically after compact / new session; Esc restores it without sending. Each resume and each idle cycle prompts at most once; submits swallowed during a cold-config fetch are replayed in order.
  • Server-driven thresholds via a generic client-configs module: the dialog fires only when the session has been idle longer than the model's cache_duration and its context is at least min_tokens_to_hint, both from the public client_configs endpoint (estimated_cache_duration). The new client-configs utility (per-name schema validation, 1-day in-process cache, anonymous-capable) is generic so future client configs plug in with one name + schema. Only OAuth-managed providers participate; any missing data (no config, no usage, unknown model) silently skips the hint.
  • Client-side cache-break detection: the TUI watches main-loop step usage and reports cache_break_detected when a step's cache-read drops >5% and >2000 tokens below the previous step, with both usages, the drop ratio, and the interval — so the event is attributable to the client that produced it. Unmeasured/all-zero usage, model changes, and compactions reset the comparison instead of reporting.
  • Docs updated (en + zh config pages); changeset included (minor, marked v2-engine-only).

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

…nd emit telemetry

Track consecutive turn-scoped LLM requests per agent; when the cache-read
token count drops by more than 5% and by more than 2000 tokens between
requests, log a debug line and emit cache_break_detected with both usages,
the drop ratio, and the interval. Operation requests (e.g. compaction) act
as a baseline barrier so expected drops are not reported.
… (v2 engine)

Resuming a long-idle session or submitting after a long idle stretch
re-sends the whole history with an expired context cache. Show a dialog
offering to compact, start a new session, continue as-is, or never ask
again (persisted as cache_expiry_hint in tui.toml). Thresholds come from
the client_configs endpoint (estimated_cache_duration) via a generic
per-name cached client; only OAuth-managed providers participate.
@changeset-bot

changeset-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 69fd057

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Aug 5, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@69fd057
npx https://pkg.pr.new/@moonshot-ai/kimi-code@69fd057

commit: 69fd057

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c0d33bc4c0

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/kimi-code/src/tui/controllers/cache-hint-controller.ts Outdated
Comment thread apps/kimi-code/src/tui/controllers/cache-hint-controller.ts Outdated
…flows

Cold-cache submits during the in-flight config fetch are now swallowed and
replayed through a FIFO chain, so a later prompt can never overtake the
stashed one. Both the resume and idle paths re-check the current session
after the async fetch: a switch mid-flight drops the dialog (resume) or
hands the stashed input back to the editor instead of sending it into the
wrong session (idle).
@liruifengv

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1d380ffcd0

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/kimi-code/src/tui/kimi-tui.ts
Comment thread packages/agent-core-v2/src/agent/cacheBreak/cacheBreakService.ts Outdated
@liruifengv

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9b7ff8f111

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/kimi-code/src/tui/controllers/cache-hint-controller.ts
Comment thread packages/agent-core-v2/src/agent/cacheBreak/cacheBreakService.ts Outdated
When several submits are swallowed during the cold-config fetch and the
first dialog is dismissed (or its compact/new action fails), the stashed
inputs were restored while later chained submits were still released —
reordering the conversation. Chained submits now follow the fate of the
message that opened the dialog, and multiple restores append newline-joined
instead of overwriting the editor.
Caches are per-model, so a cache-read drop after /model is expected, not a
break. The baseline now carries the model and only same-model records are
compared.
@liruifengv

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e0a2513739

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/kimi-code/src/tui/controllers/cache-hint-controller.ts
Comment thread packages/agent-core-v2/src/agent/cacheBreak/cacheBreakService.ts Outdated
… hint

The v2 resume replay also carries local-only state records (permission,
plan, config updates, approval results) that slash commands append without
an LLM request. Filter lastActiveAt to message/compaction records so a
recent local change no longer masks an expired cache.
…convention

State the domain role, collaborators, and scope instead of narrating
implementation steps; the behavior guards now live in the code alone.
@liruifengv

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4180109a81

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/kimi-code/src/tui/controllers/cache-hint-controller.ts Outdated
Comment thread packages/agent-core-v2/src/agent/cacheBreak/cacheBreak.ts Outdated
The resume dialog is fire-and-forget over an async config fetch; if the
user already sent the first prompt by the time it resolves, mounting would
overlay an active turn and its actions would hit the live session. Re-check
streamingPhase/isCompacting after the await, next to the session check.
@liruifengv

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c92e4445a0

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/kimi-code/src/tui/controllers/cache-hint-controller.ts
Comment thread packages/agent-core-v2/src/agent/cacheBreak/cacheBreakService.ts Outdated
Move the detector out of the engine so the telemetry event carries the
client's own identity (which client produced it is now attributable). The
TUI observes main-loop turn.step.completed usage directly, with the same
guards: first-step/unmeasured/all-zero records skipped, model change and
compaction reset the baseline. The agent-core-v2 cacheBreak module is
removed.
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

❌ Nix build failed

    kimi-code> node_modules/.pnpm/vitest@4.1.4_@types+node@22.19.17_@vitest+coverage-v8@4.1.4_jsdom@25.0.1_msw@2.15.0_@ty_e68e473ec77341530be951c843e2e0d4/node_modules/vitest/vitest.mjs: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/chsxa1iw7s3m51v4kj43yd1nw26xvi21-nodejs-24.15.0/bin/node"
    kimi-code> node_modules/.pnpm/vitest@4.1.4_@types+node@22.19.17_@vitest+coverage-v8@4.1.4_jsdom@25.0.1_msw@2.15.0_@ty_e68e473ec77341530be951c843e2e0d4/node_modules/vitest/node_modules/.bin/why-is-node-running: interpreter directive changed from "#!/bin/sh" to "/nix/store/3hgg7pr65imdrifqqh3flg3arvkc2r22-bash-5.3p3/bin/sh"
    kimi-code> node_modules/.pnpm/vitest@4.1.4_@types+node@22.19.17_@vitest+coverage-v8@4.1.4_jsdom@25.0.1_msw@2.15.0_@ty_e68e473ec77341530be951c843e2e0d4/node_modules/vitest/node_modules/.bin/vite: interpreter directive changed from "#!/bin/sh" to "/nix/store/3hgg7pr65imdrifqqh3flg3arvkc2r22-bash-5.3p3/bin/sh"
    kimi-code> node_modules/.pnpm/which@2.0.2/node_modules/which/bin/node-which: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/chsxa1iw7s3m51v4kj43yd1nw26xvi21-nodejs-24.15.0/bin/node"
    kimi-code> node_modules/.pnpm/@babel+parser@7.29.7/node_modules/@babel/parser/bin/babel-parser.js: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/chsxa1iw7s3m51v4kj43yd1nw26xvi21-nodejs-24.15.0/bin/node"
    kimi-code> node_modules/.pnpm/is-docker@2.2.1/node_modules/is-docker/cli.js: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/chsxa1iw7s3m51v4kj43yd1nw26xvi21-nodejs-24.15.0/bin/node"
    kimi-code> node_modules/.pnpm/esbuild@0.21.5/node_modules/esbuild/bin/esbuild: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/chsxa1iw7s3m51v4kj43yd1nw26xvi21-nodejs-24.15.0/bin/node"
    kimi-code> node_modules/.pnpm/babel-plugin-macros@3.1.0/node_modules/babel-plugin-macros/node_modules/.bin/resolve: interpreter directive changed from "#!/bin/sh" to "/nix/store/3hgg7pr65imdrifqqh3flg3arvkc2r22-bash-5.3p3/bin/sh"
    kimi-code> node_modules/.pnpm/vitepress-plugin-llms@1.13.1/node_modules/vitepress-plugin-llms/node_modules/.bin/markdown-it: interpreter directive changed from "#!/bin/sh" to "/nix/store/3hgg7pr65imdrifqqh3flg3arvkc2r22-bash-5.3p3/bin/sh"
    kimi-code> node_modules/.pnpm/vitepress-plugin-llms@1.13.1/node_modules/vitepress-plugin-llms/node_modules/.bin/millify: interpreter directive changed from "#!/bin/sh" to "/nix/store/3hgg7pr65imdrifqqh3flg3arvkc2r22-bash-5.3p3/bin/sh"
    kimi-code> node_modules/.pnpm/@vue+compiler-sfc@3.5.35/node_modules/@vue/compiler-sfc/node_modules/.bin/parser: interpreter directive changed from "#!/bin/sh" to "/nix/store/3hgg7pr65imdrifqqh3flg3arvkc2r22-bash-5.3p3/bin/sh"
    kimi-code> node_modules/.pnpm/node-addon-api@4.3.0/node_modules/node-addon-api/tools/conversion.js: interpreter directive changed from "#! /usr/bin/env node" to "/nix/store/chsxa1iw7s3m51v4kj43yd1nw26xvi21-nodejs-24.15.0/bin/node"
    kimi-code> node_modules/.pnpm/@changesets+write@0.4.0/node_modules/@changesets/write/node_modules/.bin/prettier: interpreter directive changed from "#!/bin/sh" to "/nix/store/3hgg7pr65imdrifqqh3flg3arvkc2r22-bash-5.3p3/bin/sh"
    kimi-code> node_modules/.pnpm/@changesets+write@0.4.0/node_modules/@changesets/write/node_modules/.bin/human-id: interpreter directive changed from "#!/bin/sh" to "/nix/store/3hgg7pr65imdrifqqh3flg3arvkc2r22-bash-5.3p3/bin/sh"
    kimi-code> node_modules/.pnpm/tldts@7.4.8/node_modules/tldts/bin/cli.js: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/chsxa1iw7s3m51v4kj43yd1nw26xvi21-nodejs-24.15.0/bin/node"
    kimi-code> node_modules/.pnpm/typescript@5.6.1-rc/node_modules/typescript/bin/tsc: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/chsxa1iw7s3m51v4kj43yd1nw26xvi21-nodejs-24.15.0/bin/node"
    kimi-code> node_modules/.pnpm/typescript@5.6.1-rc/node_modules/typescript/bin/tsserver: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/chsxa1iw7s3m51v4kj43yd1nw26xvi21-nodejs-24.15.0/bin/node"
    kimi-code> node_modules/.pnpm/@rushstack+node-core-library@5.23.1_@types+node@22.19.17/node_modules/@rushstack/node-core-library/node_modules/.bin/resolve: interpreter directive changed from "#!/bin/sh" to "/nix/store/3hgg7pr65imdrifqqh3flg3arvkc2r22-bash-5.3p3/bin/sh"
    kimi-code> node_modules/.pnpm/@rushstack+node-core-library@5.23.1_@types+node@22.19.17/node_modules/@rushstack/node-core-library/node_modules/.bin/semver: interpreter directive changed from "#!/bin/sh" to "/nix/store/3hgg7pr65imdrifqqh3flg3arvkc2r22-bash-5.3p3/bin/sh"
    kimi-code> node_modules/.pnpm/markdown-it@14.2.0/node_modules/markdown-it/bin/markdown-it.mjs: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/chsxa1iw7s3m51v4kj43yd1nw26xvi21-nodejs-24.15.0/bin/node"
    kimi-code> node_modules/.pnpm/rolldown@1.0.1/node_modules/rolldown/bin/cli.mjs: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/chsxa1iw7s3m51v4kj43yd1nw26xvi21-nodejs-24.15.0/bin/node"
    kimi-code> node_modules/.pnpm/resolve@1.22.12/node_modules/resolve/bin/resolve: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/chsxa1iw7s3m51v4kj43yd1nw26xvi21-nodejs-24.15.0/bin/node"
    kimi-code> node_modules/.pnpm/@fastify+swagger@9.7.0/node_modules/@fastify/swagger/node_modules/.bin/yaml: interpreter directive changed from "#!/bin/sh" to "/nix/store/3hgg7pr65imdrifqqh3flg3arvkc2r22-bash-5.3p3/bin/sh"
    kimi-code> node_modules/.pnpm/@babel+parser@8.0.0-rc.5/node_modules/@babel/parser/bin/babel-parser.js: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/chsxa1iw7s3m51v4kj43yd1nw26xvi21-nodejs-24.15.0/bin/node"
    kimi-code> node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/bin/tsc: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/chsxa1iw7s3m51v4kj43yd1nw26xvi21-nodejs-24.15.0/bin/node"
    kimi-code> node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/bin/tsserver: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/chsxa1iw7s3m51v4kj43yd1nw26xvi21-nodejs-24.15.0/bin/node"
    kimi-code> node_modules/.pnpm/@microsoft+api-extractor@7.58.7_@types+node@22.19.17/node_modules/@microsoft/api-extractor/node_modules/.bin/resolve: interpreter directive changed from "#!/bin/sh" to "/nix/store/3hgg7pr65imdrifqqh3flg3arvkc2r22-bash-5.3p3/bin/sh"
    kimi-code> node_modules/.pnpm/@microsoft+api-extractor@7.58.7_@types+node@22.19.17/node_modules/@microsoft/api-extractor/node_modules/.bin/semver: interpreter directive changed from "#!/bin/sh" to "/nix/store/3hgg7pr65imdrifqqh3flg3arvkc2r22-bash-5.3p3/bin/sh"
    kimi-code> node_modules/.pnpm/@microsoft+api-extractor@7.58.7_@types+node@22.19.17/node_modules/@microsoft/api-extractor/node_modules/.bin/tsc: interpreter directive changed from "#!/bin/sh" to "/nix/store/3hgg7pr65imdrifqqh3flg3arvkc2r22-bash-5.3p3/bin/sh"
    kimi-code> node_modules/.pnpm/@microsoft+api-extractor@7.58.7_@types+node@22.19.17/node_modules/@microsoft/api-extractor/node_modules/.bin/tsserver: interpreter directive changed from "#!/bin/sh" to "/nix/store/3hgg7pr65imdrifqqh3flg3arvkc2r22-bash-5.3p3/bin/sh"
    kimi-code> node_modules/.pnpm/@microsoft+api-extractor@7.58.7_@types+node@22.19.17/node_modules/@microsoft/api-extractor/bin/api-extractor: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/chsxa1iw7s3m51v4kj43yd1nw26xvi21-nodejs-24.15.0/bin/node"
    kimi-code> node_modules/.pnpm/ovsx@1.0.2/node_modules/ovsx/node_modules/.bin/vsce: interpreter directive changed from "#!/bin/sh" to "/nix/store/3hgg7pr65imdrifqqh3flg3arvkc2r22-bash-5.3p3/bin/sh"
    kimi-code> node_modules/.pnpm/ovsx@1.0.2/node_modules/ovsx/node_modules/.bin/semver: interpreter directive changed from "#!/bin/sh" to "/nix/store/3hgg7pr65imdrifqqh3flg3arvkc2r22-bash-5.3p3/bin/sh"
    kimi-code> node_modules/.pnpm/ovsx@1.0.2/node_modules/ovsx/node_modules/.bin/is-ci: interpreter directive changed from "#!/bin/sh" to "/nix/store/3hgg7pr65imdrifqqh3flg3arvkc2r22-bash-5.3p3/bin/sh"
    kimi-code> node_modules/.pnpm/ovsx@1.0.2/node_modules/ovsx/bin/ovsx: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/chsxa1iw7s3m51v4kj43yd1nw26xvi21-nodejs-24.15.0/bin/node"
    kimi-code> node_modules/.pnpm/@babel+traverse@7.29.7/node_modules/@babel/traverse/node_modules/.bin/parser: interpreter directive changed from "#!/bin/sh" to "/nix/store/3hgg7pr65imdrifqqh3flg3arvkc2r22-bash-5.3p3/bin/sh"
    kimi-code> node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/bin.mjs: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/chsxa1iw7s3m51v4kj43yd1nw26xvi21-nodejs-24.15.0/bin/node"
    kimi-code> Finished pnpmConfigHook
    kimi-code> Running phase: buildPhase
    kimi-code> file:///build/source/apps/kimi-code/scripts/check-web-assets.mjs:23
    kimi-code>     throw new Error(
    kimi-code>           ^
    kimi-code> 
    kimi-code> Error: 未找到已提交的 web 产物 /build/source/apps/kimi-code/dist-web/index.html。web 产物由 code-app 仓同步(见根 AGENTS.md),请从该仓运行 `KIMI_CODE_REPO=<此 checkout> pnpm run sync:web` 并提交 dist-web。
    kimi-code>     at assertWebAssets (file:///build/source/apps/kimi-code/scripts/check-web-assets.mjs:23:11)
    kimi-code>     at async file:///build/source/apps/kimi-code/scripts/check-web-assets.mjs:30:1
    kimi-code> 
    kimi-code> Node.js v24.15.0
    error: Cannot build '/nix/store/49jvczvd0imhjgvgpk7zz5dld3f5rv2x-kimi-code-0.33.0.drv'.
           Reason: builder failed with exit code 1.
           Output paths:
             /nix/store/jn1y03z6qafxacqm7l6bndz87svhxvb5-kimi-code-0.33.0
           Last 25 log lines:
           > node_modules/.pnpm/@babel+parser@8.0.0-rc.5/node_modules/@babel/parser/bin/babel-parser.js: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/chsxa1iw7s3m51v4kj43yd1nw26xvi21-nodejs-24.15.0/bin/node"
           > node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/bin/tsc: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/chsxa1iw7s3m51v4kj43yd1nw26xvi21-nodejs-24.15.0/bin/node"
           > node_modules/.pnpm/typescript@6.0.2/node_modules/typescript/bin/tsserver: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/chsxa1iw7s3m51v4kj43yd1nw26xvi21-nodejs-24.15.0/bin/node"
           > node_modules/.pnpm/@microsoft+api-extractor@7.58.7_@types+node@22.19.17/node_modules/@microsoft/api-extractor/node_modules/.bin/resolve: interpreter directive changed from "#!/bin/sh" to "/nix/store/3hgg7pr65imdrifqqh3flg3arvkc2r22-bash-5.3p3/bin/sh"
           > node_modules/.pnpm/@microsoft+api-extractor@7.58.7_@types+node@22.19.17/node_modules/@microsoft/api-extractor/node_modules/.bin/semver: interpreter directive changed from "#!/bin/sh" to "/nix/store/3hgg7pr65imdrifqqh3flg3arvkc2r22-bash-5.3p3/bin/sh"
           > node_modules/.pnpm/@microsoft+api-extractor@7.58.7_@types+node@22.19.17/node_modules/@microsoft/api-extractor/node_modules/.bin/tsc: interpreter directive changed from "#!/bin/sh" to "/nix/store/3hgg7pr65imdrifqqh3flg3arvkc2r22-bash-5.3p3/bin/sh"
           > node_modules/.pnpm/@microsoft+api-extractor@7.58.7_@types+node@22.19.17/node_modules/@microsoft/api-extractor/node_modules/.bin/tsserver: interpreter directive changed from "#!/bin/sh" to "/nix/store/3hgg7pr65imdrifqqh3flg3arvkc2r22-bash-5.3p3/bin/sh"
           > node_modules/.pnpm/@microsoft+api-extractor@7.58.7_@types+node@22.19.17/node_modules/@microsoft/api-extractor/bin/api-extractor: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/chsxa1iw7s3m51v4kj43yd1nw26xvi21-nodejs-24.15.0/bin/node"
           > node_modules/.pnpm/ovsx@1.0.2/node_modules/ovsx/node_modules/.bin/vsce: interpreter directive changed from "#!/bin/sh" to "/nix/store/3hgg7pr65imdrifqqh3flg3arvkc2r22-bash-5.3p3/bin/sh"
           > node_modules/.pnpm/ovsx@1.0.2/node_modules/ovsx/node_modules/.bin/semver: interpreter directive changed from "#!/bin/sh" to "/nix/store/3hgg7pr65imdrifqqh3flg3arvkc2r22-bash-5.3p3/bin/sh"
           > node_modules/.pnpm/ovsx@1.0.2/node_modules/ovsx/node_modules/.bin/is-ci: interpreter directive changed from "#!/bin/sh" to "/nix/store/3hgg7pr65imdrifqqh3flg3arvkc2r22-bash-5.3p3/bin/sh"
           > node_modules/.pnpm/ovsx@1.0.2/node_modules/ovsx/bin/ovsx: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/chsxa1iw7s3m51v4kj43yd1nw26xvi21-nodejs-24.15.0/bin/node"
           > node_modules/.pnpm/@babel+traverse@7.29.7/node_modules/@babel/traverse/node_modules/.bin/parser: interpreter directive changed from "#!/bin/sh" to "/nix/store/3hgg7pr65imdrifqqh3flg3arvkc2r22-bash-5.3p3/bin/sh"
           > node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/bin.mjs: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/chsxa1iw7s3m51v4kj43yd1nw26xvi21-nodejs-24.15.0/bin/node"
           > Finished pnpmConfigHook
           > Running phase: buildPhase
           > file:///build/source/apps/kimi-code/scripts/check-web-assets.mjs:23
           >     throw new Error(
           >           ^
           >
           > Error: 未找到已提交的 web 产物 /build/source/apps/kimi-code/dist-web/index.html。web 产物由 code-app 仓同步(见根 AGENTS.md),请从该仓运行 `KIMI_CODE_REPO=<此 checkout> pnpm run sync:web` 并提交 dist-web。
           >     at assertWebAssets (file:///build/source/apps/kimi-code/scripts/check-web-assets.mjs:23:11)
           >     at async file:///build/source/apps/kimi-code/scripts/check-web-assets.mjs:30:1
           >
           > Node.js v24.15.0
           For full logs, run:
             nix log /nix/store/49jvczvd0imhjgvgpk7zz5dld3f5rv2x-kimi-code-0.33.0.drv

…tches

A model or effort change mid-session busts the prompt-cache key — that is
a real cache break worth attributing, not noise. The baseline now carries
model and effort, the same-model exemption is gone, and cache_break_detected
reports prev/curr model and effort alongside both usages.
@liruifengv

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ffc2e342f9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/kimi-code/src/tui/controllers/cache-hint-controller.ts Outdated
Comment thread apps/kimi-code/src/tui/controllers/session-event-handler.ts Outdated
- carry the pre-dialog media extraction through compact/new resends so
  pasted attachments survive the image-store clear on a new session
- reset the cache-break baseline after /undo — the context cut makes the
  next cache-read drop expected
- release the stashed submit when a foreground operation started during
  the cold-config fetch instead of mounting the dialog over it
- count a completed compaction as activity so the next submit is not
  judged against the pre-compaction timestamp
@liruifengv

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 568ca2b2f7

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/kimi-code/src/tui/controllers/cache-hint-controller.ts
@liruifengv

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f382bf7060

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/kimi-code/src/tui/controllers/cache-hint-controller.ts
Comment thread apps/kimi-code/src/tui/controllers/cache-hint-controller.ts
Comment thread apps/kimi-code/src/tui/controllers/session-event-handler.ts
@liruifengv

Copy link
Copy Markdown
Collaborator Author

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eea6b30f42

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/kimi-code/src/tui/kimi-tui.ts
@liruifengv
liruifengv merged commit 3c75a27 into main Aug 6, 2026
14 checks passed
@liruifengv
liruifengv deleted the feat/cache-expiry-hint branch August 6, 2026 05:26
@github-actions github-actions Bot mentioned this pull request Aug 6, 2026
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