How-toSelected

Agentic AI 缓存失效导致 1 美元“hi”

Why we picked it

揭秘 Agentic AI 缓存失效为何要 1 美元,Claude Code 怎么省钱。

Agentic AI 会话中缓存失效后发送简单的“hi”可能花费 1 美元。这是因为系统需要重新处理百万级 token 的上下文,而非仅处理当前输入。

Image · lmarena.ai
Body

即使发生 1 个 token 的工具调用,cache miss 也需为上下文支付全额价格。Claude Code/Codex 可能会在 200-300K token 处进行上下文压缩以控制成本。

Original · lmarena.ai

During an agentic session, a quick “hi” after a coffee break can cost a full dollar. But it’s not because of the “hi.” It’s the million tokens of context you’re repaying for the moment your cache goes cold. Here's the caching math from @evan_a_frick : 0:00 Why you're billed for last turn's context, not just this one 0:17 Cache hits: ~10% of full price 0:41 Agentic AI = way more back-and-forth than chat 1:16 Paying full price for context even on a 1-token tool call 1:40 Cache hit vs. cache miss 2:13 The $1 "hi": walk away for an hour, come back to a cold cache 2:59 Cost grows by the square, even with caching 3:28 How context compaction helps 4:03 Why Claude Code/Codex may compact at ~200-300K, not the full 1M window

Industry Coordinates & Source Verification

This report is categorized under AITOP's "How-to" desk. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows. Key entities and technical topics under continuous tracking include Agentic AI, Claude Code, agents, cost optimization.

Source attribution: curated from lmarena.ai (@lmarena_ai).