CommandCodeAI / CommandCodeAI/command-code
Cache is invalidated increasing costs
まだ誰も着手していません。
- 主要言語
- 言語のデータがありません
- スター
- 4k
- フォーク
- 350
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Summary
Luna 5.6 xhigh.
I've sent one prompt and agent was implementing it for 9 minutes, sending about 60 requests, quite evenly so input cache could not expire (OpenAI has 30 minutes retention). Context was steadily growing from 25K to 135K. There was no context compaction. Despite pure agentic work cache was invalidated 3 times during these 9 minutes, causing substantial costs increase. Here are traces id that causes new full cache write for input.
Traces ID:
688515c1ff04db92149a370635b6dfbc
f591b3c3861e52523c99049e28542125
80f39ae574ac6b340530bfe244d01a6a
Seems there is some tool call that is modifying prior context and causing full cache invalidation
Expected Behavior
As long as there is no context compaction or cache time has not expired there should not be cache invalidation with full context cache write.
Actual Behavior
Cache is invalidated when it should not.
Steps to reproduce the issue
Hard to tell what is causing it. Providing traces id:
- before invalidating cache: a9ca8bb342da0e7d4fcca5498a25bf0e
next request invalidating cache: 688515c1ff04db92149a370635b6dfbc - before invalidating cache: ca3e9dfbf07552b61e0b5c486d0ffd06
next request invalidating cache: f591b3c3861e52523c99049e28542125 - before invalidating cache: 99eb39484857d759ba5d9ad7e999f837
next request invalidating cache: 80f39ae574ac6b340530bfe244d01a6a
Command Code Version
1.11.0
Operating System
Linux
Terminal/IDE
JetBrains-JediTerm
Shell
zsh
Session file (optional)
No response
Fix prompt (optional)
No response
Additional context
No response
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、報告された OpenAI のキャッシュ動作を用い、Linux 上で Command Code 1.11.0 を使って、各キャッシュ無効化の前後にある列挙されたトレースペアを比較します。コンパクションも有効期限切れもないにもかかわらず、どのリクエストまたはツール呼び出しが以前のコンテキストを変更するのかを特定します。完了の条件は、その条件下で繰り返し行うエージェント型リクエストが入力キャッシュを保持し、キャッシュ全体への書き込みを回避することです。
索引モデルが issue の本文から書いたものです。
評価
- 領域
- ai, performance
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100