CommandCodeAI / CommandCodeAI/command-code
Cache is invalidated increasing costs
还没有人认领这个 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:
- 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 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,使用 Linux 上的 Command Code 1.11.0,并结合已报告的 OpenAI 缓存行为,比较每次缓存失效前后的所列 trace 对。确定在没有压缩或过期的情况下,是哪个请求或工具调用改变了先前的上下文;完成的标准是,在这些条件下,重复的 agentic 请求能够保留输入缓存,并避免完整的缓存写入。
由索引模型根据 Issue 内容生成。
评估
- 领域
- ai, performance
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 冷清
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100