PulseAugur
实时 06:16:48
English(EN) 60% of My $312 Anthropic Bill Came From One Silent Loop — Here's How I Found It

开发者揭露 Anthropic Claude Code 因静默重试循环产生的隐藏成本

一位开发者在使用 AnthropicClaude Code 时遇到了意料之外的高额费用,其 312 美元的账单中有 60% 来自一个单一的、未被察觉的重试循环。问题源于一个代理反复调用工具,并使用了过多的输入 token,这个问题在标准日志或 UI 中都无法看到。开发者通过将日志发送到 R2 并使用 DuckDB 查询,找到了根本原因,并确定了一个 'ad-report-summarizer' 工作者是主要的 token 消耗者。他们还发现,Claude Code 的 --verbose 标志在通过 jq 管道传输时,可以显示完整的工具输入/输出 JSON 以进行调试,并建议使用 KV 计数器来处理多代理循环,以防止类似的成本超支。 AI

影响 强调了 LLM 应用中潜在的意外成本,并为开发者提供了调试策略。

排序理由 开发者分享了一篇关于优化成本和调试特定 AI 产品的技术事后分析文章。

在 dev.to — MCP tag 阅读 →

AI 生成摘要 · Google Gemini · 来自 1 个来源。 我们如何撰写摘要 →

开发者揭露 Anthropic Claude Code 因静默重试循环产生的隐藏成本

报道来源 [1]

  1. dev.to — MCP tag TIER_1 English(EN) · 강해수 ·

    我的 312 美元 Anthropic 账单中有 60% 来自一个静默循环 — 我是这样找到它的

    <p>Last month's Anthropic invoice: $312. Sixty percent of it traced back to a single retry pattern I couldn't see anywhere in my normal logs.</p> <p>The agent was failing on tool calls, then re-entering the loop with the full context intact — 18K input tokens per invocation on a …