# Stop paying for old chat history: a free BYOK VS Code AI agent that compresses long sessions

> Source: <https://dev.to/makayis_90942586425f8f6bb/stop-paying-for-old-chat-history-a-free-byok-vs-code-ai-agent-that-compresses-long-sessions-5h17>
> Published: 2026-10-12 20:41:21+00:00

Long AI coding chats get expensive for a simple reason: every turn resends

the whole conversation, so turn 30 costs far more than turn 3.

I built **CodeCook** to fix that. It's a free, MIT-licensed VS Code extension

(disclosure: I'm the author).

**What it does**

In one long session, a single turn went from about 800k to about 15k tokens.

That's a best case, not an average, so I'm testing real billed cost next.

**Try it:** [https://marketplace.visualstudio.com/items?itemName=makayis.codecook](https://marketplace.visualstudio.com/items?itemName=makayis.codecook)

I'd love feedback on what breaks or what's missing.
