cd /news/ai-agents/show-hn-cost-dev-yc-w21-making-agent… · home topics ai-agents article
[ARTICLE · art-21443] src=news.ycombinator.com pub= topic=ai-agents verified=true sentiment=↑ positive

Show HN: Cost.dev (YC W21) – making agents cost-aware and 79% cheaper to call

Cost.dev (YC W21) launched a new CLI designed for coding agents that reduces Claude's output token usage by up to 79% and API costs by up to 67% compared to a bare-Claude baseline. The tool runs locally to provide deterministic cloud cost analysis and pricing data to agents like Claude Code, GitHub Copilot, and Cursor, enabling them to make cost-optimized infrastructure decisions without relying on the LLM to remember pricing rules. The company is seeking feedback on whether production infrastructure teams are currently using coding agents to write infrastructure-as-code.

read2 min publishedJun 4, 2026

We launched Infracost on HN five years ago (https://news.ycombinator.com/item?id=26064588) where our CLI generated cost estimates for infra-as-code, e.g. "this Terraform PR adds $400/mo". The idea was to shift cloud costs (FinOps) left so engineers get visibility of costs before deployment and make better decisions.

Earlier this year we started seeing agent traffic in our logs and it looked like coding agents were calling our CLI. But that CLI wasn't designed with coding agents in mind. We went down a philosophical rabbit hole to see if a CLI is even needed anymore given that Claude, Copilot et al. already follow best practices. Ultimately we decided to create a new CLI from the ground up with coding agents in mind for two reasons:

  1. We optimized the CLI for agent callers and cut Claude's output token usage by up to 79% and API cost by up to 67% versus a bare-Claude baseline. We wrote a blog documenting our lessons on optimizing user token usage when designing a CLI, e.g. using predicate flags so the agent doesn't compose jq | python | wc pipelines, output format that strips JSON's redundant field names. The blog is here: https://www.infracost.io/resources/blog/we-cut-claude-s-toke...

  2. With cloud costs, precision matters. Telling a coding agent "make this Terraform cost-optimized" can be expensive and lossy. You burn tokens code and policy context into every conversation. Your agent could make up a price and you wouldn't know because it's difficult to verify that across the ~10M price points that AWS, Azure and Google have. The CLI runs static analysis on the code, uses the latest prices from cloud vendors, and passes that context to the coding agent.

So that's what we're launching today - Cost.dev:

  • It runs locally. Your code never leaves your machine, you get a fast feedback loop, and you're not burning API calls per character when you want to fetch prices. - The CLI does the deterministic work. Fetching price points, scanning the code, validating fixes. The coding agent does the natural-language part. You don't have to trust the LLM to remember the rules, and can verify it called the right CLI command. - It provides a consistent rule layer across every tool you use. Get cost estimates in your IDE and your coding agent with a single install. We support Claude Code, GitHub Copilot, Cursor, Windsurf, OpenAI Codex, Gemini CLI, as well as IDEs like VS Code and JetBrains

Before we keep building more in that direction, I want to sanity-check with HN: is "agents writing IaC in prod" actually a thing yet, or am I betting on a future that's still a year out? I know software developers are using coding agents heavily, but are platform/infra folks doing that for prod too? Also, if you have any feedback on Cost.dev, I'd love to hear it.

Comments URL: [https://news.ycombinator.com/item?id=48397148](https://news.ycombinator.com/item?id=48397148)

Points: 1

── more in #ai-agents 4 stories · sorted by recency
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/show-hn-cost-dev-yc-…] indexed:0 read:2min 2026-06-04 ·