Uber 在 40 万 token 处压缩工程师的 Claude Code 会话以控制 AI 开支
Uber 内部数据很实在:agent 请求涨了 9.4 倍但预算没变,他们靠 40 万 token 强制压缩和 MCP 网关把单次会话成本砍了一半。用 Claude Code 或自建 agent 团队可以直接抄这套省钱做法。
Uber 在工程师的 Claude Code 会话达到 40 万 token 时强制压缩(compaction),即使底层模型支持百万 token 上下文也不放宽。其背景是内部 AI 预算已用尽:2 月到 8 月,每周 agent 请求数增长 9.4 倍,AI 编码工具的周活跃用户增长 7 倍,但 4 月以来整体 AI 支出基本持平。
降本手段主要靠工程优化。在模型不变的前提下,每 1000 次请求的成本从峰值下降近 34%,单次会话成本较 6 月峰值下降 52%,但 Uber 未公布某一项具体措施带来的节省金额。
另一个细节是 MCP 的使用方式:Uber 仍运行 MCP 服务器,但 agent 通过绑定中央 MCP 网关的命令行工具访问,因为预加载 100 多个工具的描述会在用户发出第一条提示词前就消耗 5 万到 7 万 token。这套做法对 token 预算紧张的企业工程团队有直接参考价值。
Uber compacts engineers’ Claude Code sessions at 400K tokens, even on million-token models, after exhausting its AI budget.
Weekly agent requests at Uber grew 9.4x from February to August and weekly active users of its AI coding tools grew 7x, yet overall AI spending has stayed roughly flat since April.
With the model held constant, cost per 1,000 requests fell almost 34% from its peak and cost per session fell 52% from its June peak, but Uber gives no savings figure for any single default.
Uber still runs MCP servers, but agents reach them through command-line tools tied to a central MCP gateway, because preloading descriptions for 100-plus tools costs 50K to 70K tokens before the first prompt.
This report is categorized under AITOP's "How-to" desk, focusing on US frontier AI labs and Silicon Valley technology leaders. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows and US-China foundation model benchmarks and commercialization comparison. Key entities and technical topics under continuous tracking include Claude Code, Uber, MCP and tools, token cost.
Source attribution: curated from rohanpaul_ai (@rohanpaul_ai).