Skip to content

REASONIX.md change causes cache miss on session resume #2212

@BruceXSK

Description

@BruceXSK

Reproduction steps:

  1. Conduct multiple turns of conversation within a session
  2. Modify REASONIX.md (or other similar files like AGENTS.md) in the current project
  3. Exit the CLI and restart, resuming the previous session → The modified REASONIX.md is loaded into the system prompt
  4. Send a message in the same session → Due to the changed system prompt, this message results in a large cache miss

Suggestion:

  • The entire system prompt should be bound to the session and only be rebuilt when /new is invoked
  • Consider Claude Code's behavior: if CLAUDE.md changes within the same session, it incrementally adds a <system-reminder> indicating the content change, rather than directly modifying the original system prompt at the top.

使用流程:

  1. 在一个 session 中进行了多轮对话
  2. 修改了当前工程的 REASONIX.md(或其他 AGENTS.md 等类似文件)
  3. 退出 CLI 重启 resume 之前的 session:此时会将修改后的 REASONIX.md 加载到系统提示词中
  4. 在同一个 session 中输入一条消息,由于系统提示词变化,这条消息出现大量 cache miss

修改建议:

  • 系统提示词全部与 session 绑定,只有在 /new 时触发重建;
  • 可参考 Claude Code 的行为:在同一个 session 内如果 CLAUDE.md 的内容出现变动,增量添加 <system-reminder> 提示内容发生变动,而不是直接修改最开头的系统提示词

Metadata

Metadata

Assignees

No one assigned

    Labels

    v1Legacy TypeScript line (0.x) — v1 branch, maintenance only

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions