<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Cost on Loop &amp; Retry</title>
    <link>https://loopandretry.github.io/tags/cost/</link>
    <description>Recent content in Cost on Loop &amp; Retry</description>
    <image>
      <title>Loop &amp; Retry</title>
      <url>https://loopandretry.github.io/images/og-default.png</url>
      <link>https://loopandretry.github.io/images/og-default.png</link>
    </image>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Wed, 15 Jul 2026 09:00:00 -0400</lastBuildDate>
    <atom:link href="https://loopandretry.github.io/tags/cost/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Retry budgets by language: Python, Go, and JavaScript</title>
      <link>https://loopandretry.github.io/posts/retry-budgets-by-language/</link>
      <pubDate>Wed, 15 Jul 2026 09:00:00 -0400</pubDate>
      <guid>https://loopandretry.github.io/posts/retry-budgets-by-language/</guid>
      <description>A retry budget is a language-agnostic idea, but the place you enforce it is not. Python&amp;rsquo;s tenacity decorators, Go&amp;rsquo;s context-plus-backoff, and JavaScript&amp;rsquo;s promise chains each make a different mistake easy and a different guarantee hard. Where the shared budget lives, and the per-language trap that leaks it.</description>
    </item>
    <item>
      <title>Debugging a failed agent run costs more than the run itself</title>
      <link>https://loopandretry.github.io/posts/debugging-a-failed-run-costs-more/</link>
      <pubDate>Tue, 14 Jul 2026 13:00:00 -0400</pubDate>
      <guid>https://loopandretry.github.io/posts/debugging-a-failed-run-costs-more/</guid>
      <description>The cheap part of a failed agent run is running it again. The expensive part is that you can&amp;rsquo;t — the failure was non-deterministic, so the run that broke is gone, and you pay to summon it back. A cost model shows why reproduction, not repair, dominates your debugging bill, and why always-on tracing is almost always cheaper than the alternative it replaces.</description>
    </item>
    <item>
      <title>Your token bill is the cheap part: dimensioning the real cost of an agent</title>
      <link>https://loopandretry.github.io/posts/cost-beyond-tokens/</link>
      <pubDate>Tue, 14 Jul 2026 05:00:00 -0400</pubDate>
      <guid>https://loopandretry.github.io/posts/cost-beyond-tokens/</guid>
      <description>Everyone budgets the token bill because the provider hands you an invoice for it. But an agent in production spends across five other axes that never show up on that invoice — wall-clock latency, orchestration, tool-call fees, human review, and idle polling — and for a lot of workloads the tokens are the smallest line. A model that sums all six so you can see which one you&amp;rsquo;re actually paying.</description>
    </item>
    <item>
      <title>Cheap first, smart later: model routing that cuts cost without cutting quality</title>
      <link>https://loopandretry.github.io/posts/cheap-first-smart-later/</link>
      <pubDate>Mon, 13 Jul 2026 20:30:00 -0400</pubDate>
      <guid>https://loopandretry.github.io/posts/cheap-first-smart-later/</guid>
      <description>Most requests to your agent are easy, and you&amp;rsquo;re paying frontier-model prices for all of them anyway. A routing cascade — try the cheap model, escalate on a measurable confidence signal — cuts spend without touching output quality, if you get the escalation trigger right. Here&amp;rsquo;s the pattern, where it breaks, and the arithmetic on when it&amp;rsquo;s worth building.</description>
    </item>
    <item>
      <title>Distributed retry patterns: bounding blast radius across a fleet</title>
      <link>https://loopandretry.github.io/posts/fleet-retry-patterns/</link>
      <pubDate>Mon, 13 Jul 2026 18:15:00 -0400</pubDate>
      <guid>https://loopandretry.github.io/posts/fleet-retry-patterns/</guid>
      <description>A per-step retry cap bounds a step. It never bounds a run, and it never bounds a fleet — twelve workers each retrying &amp;lsquo;reasonably&amp;rsquo; is how you turn one bad deploy into a bill. The four patterns that actually put a ceiling on what a fleet of agents can spend recovering from a failure: shared retry budgets, circuit breakers, decorrelated backoff, and poison quarantine.</description>
    </item>
    <item>
      <title>Why a long agent run costs O(N²) tokens — and how to flatten it</title>
      <link>https://loopandretry.github.io/posts/long-agent-runs-are-quadratic/</link>
      <pubDate>Mon, 13 Jul 2026 18:05:00 -0400</pubDate>
      <guid>https://loopandretry.github.io/posts/long-agent-runs-are-quadratic/</guid>
      <description>A naive agent&amp;rsquo;s token bill doesn&amp;rsquo;t grow with the number of steps — it grows with the square of them, because every step re-reads the whole transcript that every previous step appended to. A small cost model shows the curve, and four structural moves turn the quadratic back into something close to linear without dropping information the agent actually needs.</description>
    </item>
    <item>
      <title>Postmortem: the agent that spent $200 retrying a 400</title>
      <link>https://loopandretry.github.io/posts/postmortem-200-dollars-retrying-a-400/</link>
      <pubDate>Sun, 12 Jul 2026 09:00:00 -0400</pubDate>
      <guid>https://loopandretry.github.io/posts/postmortem-200-dollars-retrying-a-400/</guid>
      <description>An agent burned ~$200 overnight retrying an HTTP 400 — a request that was defined to fail. No component was buggy; each layer retried &amp;ldquo;reasonably.&amp;rdquo; The teardown: why retryability is a property of the error and not a default, how three nested retry caps multiply into 75 doomed attempts per item, and why per-step caps never bound a bill. With the two-line fix and a circuit breaker.</description>
    </item>
    <item>
      <title>When not to build an agent</title>
      <link>https://loopandretry.github.io/posts/when-not-to-build-an-agent/</link>
      <pubDate>Wed, 08 Jul 2026 02:00:00 -0400</pubDate>
      <guid>https://loopandretry.github.io/posts/when-not-to-build-an-agent/</guid>
      <description>An agent is an LLM that controls its own control flow — and that autonomy has a price you pay on every run: quadratic token cost, serial latency, and a failure surface you can&amp;rsquo;t unit-test. Most tasks people reach for an agent on are a fixed pipeline wearing a costume. Here&amp;rsquo;s the decision checklist I use, the arithmetic on what the agent tax actually costs, and the same task built both ways so you can see the difference.</description>
    </item>
    <item>
      <title>The context window is a cache, not a memory</title>
      <link>https://loopandretry.github.io/posts/context-window-is-a-cache/</link>
      <pubDate>Tue, 07 Jul 2026 20:00:00 -0400</pubDate>
      <guid>https://loopandretry.github.io/posts/context-window-is-a-cache/</guid>
      <description>Treating the context window as append-only memory is how agents get slow, expensive, and quietly wrong. The fix is to run it like a cache with a budget and an eviction policy: decide what earns its tokens every turn. Here&amp;rsquo;s the cost math, the accuracy failure mode, and a working context manager.</description>
    </item>
    <item>
      <title>Retry budgets: why 20% per-step failure doubles your token bill</title>
      <link>https://loopandretry.github.io/posts/retry-budgets/</link>
      <pubDate>Sun, 05 Jul 2026 09:00:00 -0400</pubDate>
      <guid>https://loopandretry.github.io/posts/retry-budgets/</guid>
      <description>Retries feel cheap and local. In a multi-step agent they&amp;rsquo;re neither. A small cost model shows why 20% per-step failure can more than double your bill — and how your recovery architecture, not your failure rate, decides the multiplier.</description>
    </item>
  </channel>
</rss>
