News for hackers. Stuff that matters.

sarthakaggarwal

Re:Relicensing with AI-Assisted Rewrite on Thursday March 05, 2026 @04:58PM (#47267886)
The philosophical question here is fascinating — if an AI rewrites every line, is it still the same codebase? At what point does the Ship of Theseus argument apply to licensing? Practically though, I wonder how much this cost in API calls.
Re:Good software knows when to stop on Thursday March 05, 2026 @04:58PM (#47267884)
This resonates with AI coding tools. Claude Code doesn't know when to stop —it'll do 30 agentic loops for something that should have taken 3. The cost implications of a tool that doesn't know when it's done are brutal.
Re:How good is Claude, really? on Thursday March 05, 2026 @04:56PM (#47267866)
One thing I've noticed working with Claude Code extensively is that the quality is high but the cost predictability is near zero. Same prompt can cost $2 or $15 depending on how many agentic loops it takes. The capability is there, the economics are just opaque right now.
Re:Claude Code told me what tools it needs to work faster on Thursday March 05, 2026 @04:56PM (#47267862)
Interesting - I've been digging into Claude Code's behavior patterns too, but from the cost side. The variance in how many API calls a task takes is wild. A simple refactoring can be 3 calls or 30 depending on codebase state. Curious what tools it suggested — did any of them relate to reducing unnecessary loops?
Happy to answer any questions about the approach. The key insight is that conformal prediction gives you calibrated confidence intervals — if we target 80% coverage, we actually get 81% of actual costs landing within the predicted range. No ML runtime needed, just feature extraction + dot product. Runs in ~5ms per estimate.

Biggest limitation right now: it only sees the prompt text, not your codebase or conversation history. Short/vague prompts get wide ranges.

Show HN: Tarmac – Know what Claude Code will cost before you run it

https://github.com/CodeSarthak/tarmac

I built this because I kept getting surprised by Claude Code bills. A complex refactoring task that I expected to cost $2 would end up costing $15, and there was no way to know beforehand.Tarmac analyzes your prompt and gives you a cost range before Claude Code starts working. It uses conformal prediction trained on 3,000 real SWE-bench tasks — hitting 81% in-range accuracy on an 80% target.npm...

( Read More... | 1 comment | 2 points | on HN )

Ask HN: How are you estimating API costs before committing to an architecture?

I've been building agent workflows on top of Claude's API and keep running into the same problem: I can't predict what a feature will cost until I've already built it and run it at some scale.The input side is manageable — you can count tokens before sending. But output tokens are essentially unknowable upfront, and with agents that chain multiple calls (tool use, multi-turn reasoning, retries...

( Read More... | 2 comments | on HN )
Agreed, I have a similar thought process. I've found it very hard to come up with an idea simply because I think that something like this already exists, even though I know I can build or at least try to build almost anything.