I built a BYOK VS Code agent that cuts token costs by compressing old chat turns
说明与用途
CodeCook 是一个 VS Code 扩展,通过压缩旧聊天回合和工具输出,降低与大型语言模型交互时的 token 使用和成本。它提供检查点、计划持久化和成本可视化。
问题
In a long AI coding session, every turn resends everything you already paid for: all the old messages and all the tool output. The bill keeps growing even when the work doesn't.
结果
CodeCook compresses old chat turns, cutting token usage by up to 98% for individual turns and providing visible cost tracking, plan persistence, and checkpointed edits.
工作流
- Install CodeCook from the Marketplace
- Open CodeCook and sign in with Google or GitHub to create a local account
- Connect an LLM provider (Google Gemini, OpenAI, Anthropic Claude, Azure OpenAI, or AWS Bedrock)
- Ask the agent to work on the workspace and review diffs
证据
In a long AI coding session, every turn resends everything you already paid for: all the old messages and all the tool output.
CodeCook is a free, MIT-licensed VS Code extension: a coding agent in your sidebar that you run with your own API key (BYOK).
In one long agent session, a single turn went from 800,787 to 14,857 tokens (about 98% fewer) with the plan and work intact.
- 记录日期: 2026-10-11T19:56:12.108Z