[Bug]: Dynamic runtime context blocks in system prompt invalidate tools KV cache across sessions and workspaces
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
Start by tracing where the system prompt, tool definitions, and runtime context blocks are assembled; the issue does not name specific files or tests. Check how session and workspace context enters the request, then verify that the system and tools prefix stays invariant across sessions while the context remains available in messages. Done means this ordering is covered by an appropriate test.
索引モデルが issue の本文から書いたものです。
説明
Summary
Because prefix caching evaluates requests in system → tools → messages order, embedding workspace- and session-specific runtime context blocks directly in system invalidates the KV cache for both system and the entire tools definition block on every new session or workspace switch.
Current Behavior
Dynamic/workspace-dependent sections (environment/OS/cwd/date, session info, memory, skills, project instructions / AGENTS.md, etc.) are placed directly into the system prompt.
As a result:
- Changing workspace, project instructions, memory, or session metadata changes the
systemprefix. - Because
toolssit aftersystemin the prefix cache (system → tools → messages), the entiretoolsschema block misses the cache at session startup, even though tool definitions are identical across sessions and projects.
Expected Behavior / Suggestion
Remove the dynamic/workspace-dependent runtime context blocks from system (keeping system strictly static and invariant across sessions/workspaces) and place those runtime context blocks after tools (in messages).
This keeps the system + tools prefix stable and reusable across new sessions and workspaces, giving immediate token/cost and latency savings from cache hits right from the start of each session.
- 主要言語
- TypeScript
- スター
- 2.3k
- フォーク
- 315
- 平均マージ
- 3時間 54分
- マージ済み PR(30日)
- 9
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MiniMax-AI/minimax-code のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
MiniMax-AI/minimax-code#639 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
MiniMax-AI/minimax-code#636 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
MiniMax-AI/minimax-code#615 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
MiniMax-AI/minimax-code#556 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
MiniMax-AI/minimax-code#507 ·
メンテナーはふだん 1 日以内に返信
MiniMax-AI/minimax-code の issue をすべて見る
似ている issue
-
area:api bug good first issue priority:high
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Doezer/Questarr#1486 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area:import difficulty:good-first good first issue help wanted priority:P1 roadmap size:S type:test
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
Sergey-Bar/Penny#245 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
mihazs/lazysh#3377 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Approve the Cloudflare agent plugin for harness sessions対応中かも @joshtsch が今日担当しました。 オープンenhancement ready-for-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信