CommandCodeAI / CommandCodeAI/command-code

Cache is invalidated increasing costs

未關閉
#626 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
沒有語言資料
星號
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:

  1. before invalidating cache: a9ca8bb342da0e7d4fcca5498a25bf0e
    next request invalidating cache: 688515c1ff04db92149a370635b6dfbc
  2. before invalidating cache: ca3e9dfbf07552b61e0b5c486d0ffd06
    next request invalidating cache: f591b3c3861e52523c99049e28542125
  3. 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

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

首先,使用 Linux 上的 Command Code 1.11.0,並結合已回報的 OpenAI 快取行為,比較每次快取失效前後所列出的 trace 對。確認在沒有壓縮或過期的情況下,是哪個請求或工具呼叫變更了先前的內容脈絡;完成的條件是,在這些情況下,重複的 agentic 請求會保留輸入快取,並避免完整的快取寫入。

由索引模型根據 Issue 內容生成。

評估

領域
ai, performance
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
冷清
描述清晰度
需要釐清
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。