创建

登录 ReadmeX

或

了解我们如何处理你的信息: 隐私政策

ReadmeX

陪你读懂 AI 动态

今天,想先了解什么?

选一份动态总结,或直接聊聊你的问题。

社区和关注动态总结只属于你自己。

资讯

Nudge发布,诊断Claude Code聊天成本

AI 总结

开发者 /u/iLrama 发布了免费 macOS 菜单栏应用 Nudge,可分析本地 Claude Code 聊天记录并建议配置或工作流调整。它能预警可能产生较高成本的操作、总结长对话并开启新对话,还可提出文件修改供用户审批。开发者称该应用还支持 Codex,要求 macOS 26+,且聊天数据不会离开用户的 Mac。

深度见解

Nudge 为 Claude Code 用户提供了本地诊断高 token 消耗工作流的方式,并支持审批、撤销修改和后续检查。

I kept hitting my 5-hour limit without knowing why, so I built Nudge, a free Mac menu bar app that reads your Claude Code chats on your Mac and tells you what’s worth changing.

What I learned about where tokens go (useful even if you never install it)

  • Every message re-reads the whole chat. In a 400K chat, each message costs about 7 times more than in a fresh one. Ask for a handoff summary and start a new chat from it.
  • Idle chats cost more. After a chat sits idle long enough, Claude’s cache expires and your next message pays full price to re-read everything.
  • Helper agents inherit your model. If your main model is Opus, every subagent runs on Opus too. Setting CLAUDE_CODE_SUBAGENT_MODEL in the env block of ~/.claude/settings.json moves them all to a cheaper model. On my week, Nudge estimated that moving them to Haiku would cut that cost from $129 to about $22.
  • Late compaction is expensive. Chats that grow past 300K before compacting pay for every message at that size. CLAUDE_CODE_AUTO_COMPACT_WINDOW sets when compaction happens.
  • Stop retyping instructions. If you paste the same instructions into every chat, put them in CLAUDE.local.md at the project root. Claude Code reads it like CLAUDE.md, but it’s meant to stay out of git.

#Nudge#Claude Code#Claude Opus#Claude Haiku#Codex

原文约 2 分钟读完阅读原文
群聊

还没有评论,来说说你的看法。