Ask
24

Several tools shipped this month just to show what a coding-agent session costs. What actually burns the budget, and can I see it without adding a third-party service? Category watch

I look after the AI spend for a small team and this month I have counted more than one product whose entire pitch is "see what your agent sessions actually cost".

When a category appears that fast it usually means the underlying thing is genuinely not visible, so before I put another service in the middle of our workflow I would like to understand the problem properly.

What I know: we pay a predictable amount per seat. What I do not know: which sessions are expensive, why, and whether that is anybody's fault.

Specifically:

  1. In a long agent session, what is actually consuming the budget? My assumption is that it is not the code it writes but the context it re-sends on every step, and I would like to know if that is right.
  2. Is any of this visible from what the vendors already give you, or is a third-party collector genuinely the only way?
  3. If we did add one, what is it seeing? These sessions contain our source code.

Not looking to cut spend for its own sake. I want to be able to answer "why was last month higher" with something better than a shrug.

4 answers Share
Report

Answering anonymously — a moderator will review it first.

  • @switch_cost_sena · yesterday · 3 replies

    Your assumption in question 1 is right and it is the whole answer.

    An agent turn is not one request. It is a loop: read files, call a tool, get output, decide again. Every step re-sends the accumulated conversation, so cost grows with the square of the session length rather than in proportion to it. A session that ran forty tool calls did not cost forty times a single call — it cost considerably more.

    What that means practically is that the expensive sessions are almost never the ambitious ones. They are the ones that went in circles: a failing test the agent kept re-reading, a large file pulled into context early and carried for the rest of the run, a loop of edit-and-check that never converged. The work product looks small, which is exactly why nobody suspects it.

    So the metric you want is not cost per session. It is cost per session divided by whether anything got merged.

    25
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
    • @switch_cost_sena · yesterday

      It changes it a lot, and it is the reason two teams with identical usage can get very different bills.

      Re-sending a prefix that has not changed can be billed at a fraction of the normal rate, so a session that keeps a stable context is dramatically cheaper than one that keeps disturbing it. The thing that ruins it is anything that mutates the early part of the conversation — an injected timestamp, a reordered file list, a tool that rewrites its own instructions.

      So "did the cache hit" is a genuinely useful number and it is one of the few where a tracking tool earns its place. It is also the number you can act on: the fix is usually a small change to how context is assembled, not a change of model.

      19
      Share
      Reply

      Answering anonymously — a moderator will review it first.

      Report
    • @token_budget_bex · yesterday

      That reframes what I should be measuring. If it is loop length rather than task size, then the intervention is a cap on how long a session may go without producing something, not a smaller model.

      Does caching change the arithmetic much, or is that mostly marketing?

      11
      Share
      Reply

      Answering anonymously — a moderator will review it first.

      Report
  • @quiet_repo_qi · yesterday

    On question 2, and this is the part the launches quietly depend on you not knowing: a lot of it is already on disk.

    These agents keep local session records, and the usage figures for a run generally sit in them. You can aggregate that yourself with an afternoon of scripting and get per-session totals, model used, and roughly where the time went. For a team of your size that may be all you need.

    What you do not get for free is the part that is genuinely hard: joining it across people, keeping the history after the local files are cleaned up, and attributing a session to a piece of work. That is the real product in this category. Deciding whether you want that is a much smaller question than "do I need observability", and the answer for a small team is often no.

    18
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report