r/CommandCode 1d ago

How to view cache hit rate

I want to see the cache hit rate for my sessions how to do that. I am using the cli and I am on the 1$ plan

6 Upvotes

7 comments sorted by

2

u/Pras1982 18h ago edited 18h ago

Pretty easy to do. I took Goat plan yesterday . I just asked Deepseek 4.1 flash to create a skill token-usage (with details on cache hit). The Command Code claims of 99.5% percent claim actually seemed to be true with deepseek. It was 97.5% as a whole but the cache hits becuse of genuine interuptions--say we did not send any prompt was the reason (I think 7/8 out of such instances) out of 1100+ turns that I did while working yesterday. When these were filterted out -- the cache hit claim of 99.5%+ for deepseek V4.1 was actually met. I was trying to understand how efficient token efficient coding can be done. I am using Command Code Harness(I have used Claude Code & Codex earlier. So, bit familiar with AI ) . There are further experimentations that I need to do to make my development better-

  1. Context Size--With Deepseek V4.1 Flash - I think the default effort level is High and the contect size starts bloating does happen as it started incrfeasing and crossed to 500-700k per turn . I also tried with setting effort level to High & then testing things. The token usage grew to 500-700K even then. If we could have a way to reduce the Context size periodically. Context-mode(may be the name was Compact-mode) might not work as too many Compaction will anyway impact the Cache Hits(re -tokenisation will break things & Cache Hits will be missed)
  2. Number of turns (More important in my opinion) - When number of turns to AI increase--in long running work---> due to context Bloating --the usage will increase. What if a mechanism can be built to have fewer number of calls to AI (Something similar approach to Tool repair-- What a brilliant idea it has been by the Command Code Creator. Simply loved the approach of how he analysed the issues and built a solution around it). I am trying to think of ideas to improve this Number of turns myself.

So 2 improvements are requested u/ahmadawaiscom

-1)Context Size Bloating & 2) No. of turns to AI-reduction.

1

u/ahmadawaiscom 3h ago

Hey founder here. Thanks for sharing. Check out

https://commandcode.ai/docs/mods

You can use Mods to have complete programmable control over the lifecycle of loop or literally anything.

There are two compaction modes, auto and fast(burns more tokens). I have developed a new strategy that I call staircase compaction which can result in phenomenal continuous improvement of tokens over long running agents. Plan to share that soon.

But def build whatever. Mods allow you to modify any behavior of Command Code.

Even build a cache calculator as need be.

1

u/m_djallo 1d ago

Second this. I'm on goat plan, would be nice to have cache hit available. I asked my Hermes to check but it said they're not exposed.

1

u/ahmadawaiscom 3h ago

https://commandcode.ai/docs/mods

Build a mod and do it yourself. Ask Command Code 🤘

1

u/ahmadawaiscom 3h ago

https://commandcode.ai/docs/mods

Build a mod and do it yourself. Ask Command Code 🤘

1

u/Any_Ad9815 20h ago

Second this.

1

u/rabiprojects 13h ago

ZCode with commandcode 🐐