The problem
Coding agents do not have a fixed cost.
A subscription has a predictable monthly price. An agent run does not. The agent may inspect five files or fifty, run tests once or retry them repeatedly, and use an effort level whose effect on the final bill is difficult to see.
Even two runs of the same task can take different paths. That makes a single exact number unrealistic before the work begins.
This is becoming a real problem
This uncertainty is no longer theoretical.
A Stanford Digital Economy Lab study found up to a 30× difference in token use for the same coding task. It also found that models were poor at predicting their own token consumption.
At OpenAI’s Intelligence at Work event, Sam Altman said cost had suddenly become “a huge issue”.
If I cannot know what an agent run might cost, I cannot make a sensible decision about which model or effort level to use.
Why I built agent-cost
I built agent-cost to give developers and engineering leaders a cost range, confidence level, and balanced model recommendation before a run starts.
It is available as both a CLI and an agent skill through the @devinat1/agent-cost npm package.
The goal is not to make agent work deterministic. It is to make the uncertainty visible early enough to act on it.
How I use it
I invoke agent-cost before starting a coding task:
Invoke agent-cost for the current coding task. Give me a concise cost range, confidence level, and balanced model recommendation.
The skill returns the estimate so I can decide whether to proceed.
Takeaway
Describe the task → invoke
agent-cost→ review the range → start the agent
The range makes uncertainty visible before the agent starts spending.