CommandCodeAI / CommandCodeAI/command-code

Cache is invalidated increasing costs

オープン
#626 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
言語のデータがありません
スター
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. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、報告された OpenAI のキャッシュ動作を用い、Linux 上で Command Code 1.11.0 を使って、各キャッシュ無効化の前後にある列挙されたトレースペアを比較します。コンパクションも有効期限切れもないにもかかわらず、どのリクエストまたはツール呼び出しが以前のコンテキストを変更するのかを特定します。完了の条件は、その条件下で繰り返し行うエージェント型リクエストが入力キャッシュを保持し、キャッシュ全体への書き込みを回避することです。

索引モデルが issue の本文から書いたものです。

評価

領域
ai, performance
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。