AgentCost – local CLI,attributes token cost in Claude Code/Cursor/Codex sessions
AgentCost ships as a local CLI on PyPI under the package name agentcost-cli (path version 0.1.0). It attributes token cost across Claude…
By Dillip Chowdary • Aug 04, 2026 • Source: HN Claude/Codex/Fable
AgentCost ships as a local CLI on PyPI under the package name agentcost-cli (path version 0.1.0). It attributes token cost across Claude Code, Cursor, and Codex sessions. The release was noted on Hacker News (item id 49034205) with 2 points and 0 comments at the time of the summary, with the project page at pypi.org/project/agentcost-cli/0.1.0/.
As a local CLI, AgentCost runs on the machine where those agent sessions run rather than as a remote dashboard. Its stated job is cost attribution: map token spend back to individual Claude Code, Cursor, or Codex sessions so usage is not a single undifferentiated bill. The distribution channel is PyPI (agentcost-cli), which fits install into existing Python-based tooling paths.
Advertisement
Tech Pulse Daily
Get tomorrow's pulse first
Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.
For engineers who leave Claude Code, Cursor, or Codex running for long agent sessions, unattributed token cost is hard to audit. Session-level attribution turns a lump sum into a per-session signal: which runs burned budget, which tools dominate spend, and whether a workflow is cheap enough to keep automated. That matters for personal spend caps, team cost reviews, and deciding when to tighten prompts or tool calls.
The tool sits in a thin but growing layer around coding agents: Claude Code, Cursor, and Codex already own the session UX; cost visibility is often secondary or provider-console only. A local, multi-client attributer competes less with the agents themselves and more with ad hoc log scraping, spreadsheet export from provider dashboards, and one-off scripts. Early HN traction is thin (2 points, 0 comments), so it is still a niche utility rather than a default in the stack.
Practical next step: install agentcost-cli from PyPI if you already run those three clients and need session-level token cost, then validate that attributed totals match what the provider shows for the same window. Watch whether attribution stays limited to Claude Code / Cursor / Codex or expands, and whether the local-CLI model is enough as teams move cost control into shared dashboards.
Advertisement