<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Prasad Rane</title>
    <description>The latest articles on DEV Community by Prasad Rane (@prasad_rane_dev).</description>
    <link>https://dev.to/prasad_rane_dev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3428548%2F4ef90e6e-a2f2-4119-9e62-9246a4a5b6a7.jpg</url>
      <title>DEV Community: Prasad Rane</title>
      <link>https://dev.to/prasad_rane_dev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/prasad_rane_dev"/>
    <language>en</language>
    <item>
      <title>A $1 AWS Budget Didn't Stop a $106 Claude Code Bill. Here's What Does</title>
      <dc:creator>Prasad Rane</dc:creator>
      <pubDate>Mon, 12 Oct 2026 15:32:04 +0000</pubDate>
      <link>https://dev.to/prasad_rane_dev/a-1-aws-budget-didnt-stop-a-106-claude-code-bill-heres-what-does-5aa0</link>
      <guid>https://dev.to/prasad_rane_dev/a-1-aws-budget-didnt-stop-a-106-claude-code-bill-heres-what-does-5aa0</guid>
      <description>&lt;p&gt;I set a $1 AWS budget before letting Claude Code loose on a hobby project. Less than 24 hours later I had a $106.26 charge.&lt;/p&gt;

&lt;p&gt;My mistake was treating the budget as a limit. It is an alert, and a slow one. This post covers what actually happened, why an agent can burn money this fast, and the layered setup I use now. I'll also be clear about what I have not verified, because I only have one data point: my own bill.&lt;/p&gt;

&lt;h2&gt;
  
  
  What happened
&lt;/h2&gt;

&lt;p&gt;The setup was ordinary. Claude Code pointed at Amazon Bedrock, a hobby project, and a $1 monthly cost budget with an email alert. I assumed $1 meant I would be stopped at roughly $1.&lt;/p&gt;

&lt;p&gt;I wasn't. By the time anything told me I was over, I was over by two orders of magnitude.&lt;/p&gt;

&lt;p&gt;Two separate things went wrong, and they compound.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The budget could not have stopped me
&lt;/h3&gt;

&lt;p&gt;AWS Budgets does not sit in the request path. It reads billing data and compares it to your threshold. The AWS documentation is direct about the cadence: budget information is updated up to three times a day, typically 8 to 12 hours after the previous update. It also warns that you might incur costs that exceed your threshold before Budgets can notify you.&lt;/p&gt;

&lt;p&gt;So a budget is a smoke detector, not a circuit breaker. If something spends $100 in the gap between two updates, the first signal arrives after the money is gone.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. The agent was spending much faster than I expected
&lt;/h3&gt;

&lt;p&gt;I did not hit an infinite loop, as far as I can tell. What I saw was the agent re-verifying its own work again and again. That alone is a lot of requests. The part I underestimated is what each request costs.&lt;/p&gt;

&lt;p&gt;Claude Code sends the whole conversation with every request, and every tool use produces another request carrying the accumulated tool results. The cost docs describe the same thing: a long session draws on the full history on each turn, even for a one-line follow-up.&lt;/p&gt;

&lt;p&gt;Many requests multiplied by a large context each time is a bill that grows quickly while the agent looks perfectly productive.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frvghdsrltmc1dfbtrd2j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frvghdsrltmc1dfbtrd2j.png" alt="Figure 1: Spend rate versus budget visibility window" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 1: Agent spend accrues continuously, while budget data arrives in coarse, delayed updates.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A rough model of the cost
&lt;/h2&gt;

&lt;p&gt;I don't have a per-request breakdown of my bill, so this is an illustration, not a measurement.&lt;/p&gt;

&lt;p&gt;Suppose an agent session has a 100k token context and makes 100 requests while it checks its own work. That is 10 million input tokens. At a hypothetical $3 per million input tokens, that is $30 if every request pays full price to re-read the context.&lt;/p&gt;

&lt;p&gt;With prompt caching working, those repeated reads are billed at the cached rate, which is a fraction of base input price on Anthropic's published pricing (check the current Bedrock rates for your model). The same 10 million tokens could cost a fraction of that $30.&lt;/p&gt;

&lt;p&gt;Two details make this worse in practice:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cache lifetime depends on how you connect.&lt;/strong&gt; The Claude Code docs say the cache lasts an hour on a subscription, and five minutes by default on an API key or cloud provider. A pause longer than the lifetime means the next request reprocesses the full context.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Everything that sends a request carries context.&lt;/strong&gt; Scheduled tasks, subagents, and compaction each make their own requests. &lt;code&gt;/compact&lt;/code&gt; itself reads the whole conversation it summarizes, so compacting a huge context is a large request.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0blw7etcolar74hojbls.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0blw7etcolar74hojbls.png" alt="Figure 2: Unguarded agent loop versus guarded loop" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 2: Unguarded, the only brake is a delayed email. Guarded, a budget action and cheaper requests bound the damage.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I changed
&lt;/h2&gt;

&lt;p&gt;Three changes, in order of how much I trust them.&lt;/p&gt;

&lt;h3&gt;
  
  
  A budget action that revokes access
&lt;/h3&gt;

&lt;p&gt;AWS Budgets can do more than send email. A budget action can run automatically when a threshold is crossed, and the available actions include applying an IAM policy or an SCP, or targeting specific EC2 or RDS instances.&lt;/p&gt;

&lt;p&gt;I use an IAM action that attaches an explicit deny on Bedrock invocation to the role Claude Code uses.&lt;/p&gt;

&lt;p&gt;The deny policy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"Version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2012-10-17"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"Statement"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Sid"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"DenyBedrockInvokeOnBudgetBreach"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Effect"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Deny"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"bedrock:InvokeModel"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"bedrock:InvokeModelWithResponseStream"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"bedrock:Converse"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"bedrock:ConverseStream"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Resource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"*"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create it as a customer managed policy, but do not attach it. The budget action attaches it when the threshold is hit.&lt;/p&gt;

&lt;p&gt;The action itself, via the CLI. Treat this as a sketch and check each flag against the current &lt;code&gt;aws budgets create-budget-action&lt;/code&gt; reference before running it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws budgets create-budget-action &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--account-id&lt;/span&gt; 123456789012 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--budget-name&lt;/span&gt; agent-hobby-budget &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--notification-type&lt;/span&gt; ACTUAL &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--action-type&lt;/span&gt; APPLY_IAM_POLICY &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--action-threshold&lt;/span&gt; &lt;span class="nv"&gt;ActionThresholdValue&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;80,ActionThresholdType&lt;span class="o"&gt;=&lt;/span&gt;PERCENTAGE &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--definition&lt;/span&gt; &lt;span class="s1"&gt;'IamActionDefinition={PolicyArn=arn:aws:iam::123456789012:policy/DenyBedrockInvoke,Roles=[claude-code-role]}'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--execution-role-arn&lt;/span&gt; arn:aws:iam::123456789012:role/BudgetsActionRole &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--approval-model&lt;/span&gt; AUTOMATIC &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--subscribers&lt;/span&gt; &lt;span class="nv"&gt;SubscriptionType&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;EMAIL,Address&lt;span class="o"&gt;=&lt;/span&gt;you@example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two things to get right:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The execution role.&lt;/strong&gt; AWS Budgets needs a service role it can assume, with permission to apply IAM policies. AWS publishes an example policy for this ("Allow AWS Budgets to apply IAM policies and SCPs").&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Who the deny attaches to.&lt;/strong&gt; The action only affects the users, groups, or roles you list. If Claude Code runs with different credentials than the ones you listed, the deny does nothing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An honest limitation: this still runs off the same delayed billing data. It turns an email into an actual cutoff, but it does not remove the lag. That is why the threshold needs to sit well below what you can afford to lose, not at it. My $1 budget was the right idea with no action attached.&lt;/p&gt;

&lt;p&gt;I also had to be careful about which costs the budget watched. Model usage on Bedrock may appear under service names that are specific to the model, so a budget filtered to one service name can miss spend. For a hobby account, an account-wide cost budget is simpler. Check Cost Explorer to see how your own usage is grouped before you rely on a filter.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prompt caching, verified rather than assumed
&lt;/h3&gt;

&lt;p&gt;Prompt caching is on by default in Claude Code, but "on" is not the same as "working". Claude Code shows a prompt cache line in the session block of &lt;code&gt;/usage&lt;/code&gt;: request count, share of input tokens served from cache, misses, and whether the cache is currently warm.&lt;/p&gt;

&lt;p&gt;That line is the thing to read. A low cache share on a long session means you are paying full price to re-read your codebase every turn, which is exactly the failure mode that hurt me.&lt;/p&gt;

&lt;h3&gt;
  
  
  Compact and clear on purpose
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Run &lt;code&gt;/compact&lt;/code&gt; before a session gets large, and give it instructions about what to keep.&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;/clear&lt;/code&gt; when you switch to unrelated work. Stale context is paid for on every later request.&lt;/li&gt;
&lt;li&gt;Check &lt;code&gt;/usage&lt;/code&gt; during long runs instead of after.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of these is a hard control. They lower the rate. The budget action is what bounds the worst case.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu7zy9efru8ugzes6x16b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu7zy9efru8ugzes6x16b.png" alt="Figure 3: Layered spend controls and what each one actually guarantees" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 3: Each layer and its guarantee. Only the IAM deny or a request-path gateway actually stops requests.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Controls compared
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Control&lt;/th&gt;
&lt;th&gt;Stops requests?&lt;/th&gt;
&lt;th&gt;Latency&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Budget email alert&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Hours&lt;/td&gt;
&lt;td&gt;Tells you after the fact&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Budget action (IAM deny)&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Hours, tied to billing updates&lt;/td&gt;
&lt;td&gt;Bounded worst case, not a tight cap&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prompt caching&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;td&gt;Lowers the rate; verify it with &lt;code&gt;/usage&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;/compact&lt;/code&gt;, &lt;code&gt;/clear&lt;/code&gt;, &lt;code&gt;/usage&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;td&gt;Habits, and easy to forget&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LLM gateway with per-key limits&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Near real time&lt;/td&gt;
&lt;td&gt;Sits in the request path; extra infrastructure&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;On cloud providers, the Claude Code docs say spend controls live in your cloud billing console. For per-user attribution they point to OpenTelemetry export or an LLM gateway. If you run agents for a team, or you want a cap that reacts in seconds instead of hours, a gateway is the control that matches the problem. For a single hobby account, a budget action is a reasonable first step.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;[ ] A budget exists, and it has an action, not only an email.&lt;/li&gt;
&lt;li&gt;[ ] The action's role list matches the credentials Claude Code actually uses.&lt;/li&gt;
&lt;li&gt;[ ] The threshold is set well below what you can afford to lose, because billing data lags.&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;/usage&lt;/code&gt; shows a healthy prompt cache share on a long session.&lt;/li&gt;
&lt;li&gt;[ ] Long sessions get &lt;code&gt;/compact&lt;/code&gt;; unrelated tasks get &lt;code&gt;/clear&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;[ ] You know where your own spend appears in Cost Explorer.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Discussion
&lt;/h2&gt;

&lt;p&gt;I treated the budget as a limit and it cost me. If you run agents against a cloud provider, how are you capping spend: budget actions, a gateway, or watching &lt;code&gt;/usage&lt;/code&gt;? I'm especially interested in anyone running a gateway for a single developer, and whether the setup was worth it.&lt;/p&gt;

&lt;p&gt;Original post and discussion on &lt;a href="https://www.linkedin.com/posts/rane-prasad_aiengineering-aws-developerproductivity-share-7513336833334763521-27Tm" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>ai</category>
      <category>infrastructure</category>
    </item>
    <item>
      <title>My AI-assisted coding interview was a lesson in reading unfamiliar code</title>
      <dc:creator>Prasad Rane</dc:creator>
      <pubDate>Thu, 01 Oct 2026 04:44:25 +0000</pubDate>
      <link>https://dev.to/prasad_rane_dev/my-ai-assisted-coding-interview-was-a-lesson-in-reading-unfamiliar-code-1fec</link>
      <guid>https://dev.to/prasad_rane_dev/my-ai-assisted-coding-interview-was-a-lesson-in-reading-unfamiliar-code-1fec</guid>
      <description>&lt;p&gt;The AI assistant was right there in my coding interview. It wasn’t allowed to help me debug.&lt;/p&gt;

&lt;p&gt;Implementation help was restricted too.&lt;/p&gt;

&lt;p&gt;I regularly use AI in day-to-day coding, so that took some adjusting. I was given an unfamiliar codebase and asked to fix bugs within a time limit. The immediate challenge was figuring out where to look.&lt;/p&gt;

&lt;p&gt;Which files mattered? Where did the relevant behavior start? How did the execution flow through the application? What were the unit tests setting up, and what did they expect?&lt;/p&gt;

&lt;p&gt;Those questions became a substantial part of the exercise.&lt;/p&gt;

&lt;p&gt;In a codebase you know, you carry around context that’s easy to take for granted. You recognize the entry points. You know which component owns a behavior. You have some sense of where a change belongs and which other parts might be affected.&lt;/p&gt;

&lt;p&gt;Even when you don’t know the answer, you usually have a reasonable starting point.&lt;/p&gt;

&lt;p&gt;In this interview, I had to build that understanding while the clock was running.&lt;/p&gt;

&lt;h2&gt;
  
  
  Finding my way through the code
&lt;/h2&gt;

&lt;p&gt;Navigating an unfamiliar repository involves more than opening files and reading methods. The useful part is connecting them.&lt;/p&gt;

&lt;p&gt;A method can make sense on its own while leaving important questions unanswered. Who calls it? What assumptions does the caller make? Has the input already been validated or transformed? What happens to the result?&lt;/p&gt;

&lt;p&gt;That surrounding context matters when you’re trying to fix a bug. A line can look suspicious in isolation and still be doing exactly what its caller expects.&lt;/p&gt;

&lt;p&gt;The time limit made this more noticeable. I had to decide what to investigate next without first understanding the whole project.&lt;/p&gt;

&lt;p&gt;For a task like this, the practical goal is to build a small, accurate picture of the behavior involved: where the input comes from, which code handles it, and where the result starts differing from what’s expected.&lt;/p&gt;

&lt;p&gt;That’s enough to support an investigation. Reading every file isn’t a prerequisite.&lt;/p&gt;

&lt;h2&gt;
  
  
  Unit tests were part of understanding the application
&lt;/h2&gt;

&lt;p&gt;The unit tests were another part of the codebase I needed to understand.&lt;/p&gt;

&lt;p&gt;A failing assertion gives you somewhere to start, but the assertion alone doesn’t explain the whole situation. The setup matters. So do the inputs, dependencies, and assumptions built into the test.&lt;/p&gt;

&lt;p&gt;Reading a test means asking:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What situation is being created?&lt;/li&gt;
&lt;li&gt;What behavior does this assertion expect?&lt;/li&gt;
&lt;li&gt;How does the implementation produce a different result?&lt;/li&gt;
&lt;li&gt;What would explain that difference?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These questions help connect the test to the application’s behavior.&lt;/p&gt;

&lt;p&gt;They also make it easier to judge a proposed fix. If I can explain only why a change makes an assertion pass, I may still be missing something about the underlying problem.&lt;/p&gt;

&lt;p&gt;The stronger explanation is why the behavior was wrong, how the change addresses its cause, and what evidence supports that conclusion.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the AI-assisted label didn’t tell me
&lt;/h2&gt;

&lt;p&gt;I wouldn’t use this experience to describe every AI-assisted interview. The tool’s permissions shaped this particular exercise.&lt;/p&gt;

&lt;p&gt;In my normal coding workflow, I can ask AI to help investigate a failure or suggest an implementation. Those options weren’t available here.&lt;/p&gt;

&lt;p&gt;That made the distinction between having an assistant and having debugging assistance very concrete.&lt;/p&gt;

&lt;p&gt;My experience felt like a software engineering exercise in getting oriented: navigating files, tracing execution, understanding tests, and building enough context to reason about a change.&lt;/p&gt;

&lt;p&gt;I don’t know the interviewer’s complete scoring rubric. Those were the demands of the task from my side of the screen.&lt;/p&gt;

&lt;p&gt;For anyone preparing for a similar interview, I’d ask about the assistant’s capabilities beforehand. “AI is available” leaves several questions open. Can it explain existing code? Suggest changes? Investigate failures? Or is its role more limited?&lt;/p&gt;

&lt;p&gt;Knowing those boundaries helps you choose a useful way to practise.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I’d change about my preparation
&lt;/h2&gt;

&lt;p&gt;After this experience, I’d give unfamiliar repositories more room in my interview preparation.&lt;/p&gt;

&lt;p&gt;Working on your own project is useful, but you already know why much of the code exists. You remember the decisions behind it. An unfamiliar project makes you practise reconstructing that context.&lt;/p&gt;

&lt;p&gt;I’d start with a small repository that has a working test suite and a reproducible issue. Then:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Establish the starting state.&lt;/strong&gt; Run the existing tests and see what passes and fails before changing anything.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read the relevant test.&lt;/strong&gt; Understand its setup, inputs, and assertions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trace the execution path.&lt;/strong&gt; Follow the behavior involved in the failure across the relevant files.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Form an explanation.&lt;/strong&gt; Write down what might be causing the problem and check that against the code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Make a focused change.&lt;/strong&gt; Run the relevant tests again and check nearby behavior that the change could affect.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review and explain the fix.&lt;/strong&gt; Read the diff and describe why the change addresses the cause.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I’d also practise within the tool restrictions expected in the interview. If debugging help is unavailable, it makes sense to rehearse investigating without it.&lt;/p&gt;

&lt;p&gt;The explanation at the end matters to me. Could I walk someone through the failure, the cause, and the fix without relying on “the tests passed” as my entire justification?&lt;/p&gt;

&lt;p&gt;That’s the skill I’d want the practice to develop.&lt;/p&gt;

&lt;p&gt;The part of this interview that stayed with me was having to make sense of code I hadn’t written under time pressure. Before I could make a useful change, I had to understand enough of the system to know what that change should be.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>career</category>
      <category>interview</category>
      <category>programming</category>
    </item>
    <item>
      <title>How I Use Coding Agents Without Losing My Mental Models</title>
      <dc:creator>Prasad Rane</dc:creator>
      <pubDate>Tue, 22 Sep 2026 19:02:50 +0000</pubDate>
      <link>https://dev.to/prasad_rane_dev/how-i-use-coding-agents-without-losing-my-mental-models-196l</link>
      <guid>https://dev.to/prasad_rane_dev/how-i-use-coding-agents-without-losing-my-mental-models-196l</guid>
      <description>&lt;p&gt;A junior developer recently asked me if he was falling behind because he used AI less than his peers.&lt;/p&gt;

&lt;p&gt;I said - "Using AI for everything early in your career buys speed at the cost of mental models".&lt;/p&gt;

&lt;p&gt;The cache bugs I wrote by hand years ago taught me why write ordering and TTL expiry interact badly. That lesson only stuck because I watched my own wrong intuition fail in production and had to trace the logs myself. A generated fix skips the failure, and the failure was the teacher.&lt;/p&gt;

&lt;p&gt;If you accept AI fixes without understanding the underlying failure, you trade a quick fix today for a system you cannot debug when something unusual breaks.&lt;/p&gt;

&lt;p&gt;Here is how I approach this now - &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Form a hypothesis first, &lt;/li&gt;
&lt;li&gt;use the model to find blind spots, and&lt;/li&gt;
&lt;li&gt;ration where AI is allowed to write code.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;The Hypothesis-First AI Loop
The most common trap with coding agents is pasting an error log into the prompt and asking the model to fix it.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When you do that, you skip the step where you build a mental model of the system. The model returns code that compiles and passes the immediate test, but you do not learn why the failure happened or what secondary effects the change introduces.&lt;/p&gt;

&lt;p&gt;A more reliable loop keeps the engineer responsible for the hypothesis while using the model to stress-test assumptions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F975n50gcl34b2hdej1st.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F975n50gcl34b2hdej1st.png" alt="Figure 1: The four-step loop for pairing with coding agents." width="800" height="447"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Figure 1: The four-step loop for pairing with coding agents.&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  The Four Steps:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Form a hypothesis:&lt;/strong&gt; Before opening a prompt, write down what you think is failing and why. Even if your guess is wrong, stating it forces you to model the system in your head.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ask the model for alternatives:&lt;/strong&gt; Instead of asking for code, ask the model what other failure modes could produce the same symptom. For example: "I suspect this timeout is caused by database connection pool saturation. What other downstream bottlenecks could produce this error pattern?"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify against empirical evidence:&lt;/strong&gt; Check distributed traces, server logs, and queue metrics to see which explanation fits the data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Update your understanding:&lt;/strong&gt; Compare the actual root cause with your original hypothesis. The gap between what you thought happened and what the telemetry showed is where your understanding improves.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  2. A Common Failure Mode: Naive Retries and Pool Exhaustion
&lt;/h2&gt;

&lt;p&gt;Here is an example I have seen in production code generated by AI assistants.&lt;/p&gt;

&lt;p&gt;A service calling an external API starts seeing intermittent HTTP 504 gateway timeouts. When given the error log, the model suggests adding a retry loop with an increased timeout.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Anti-pattern: Naive retry loop masking systemic failure
&lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;call_upstream_service&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;max_retries&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="c1"&gt;# Model suggested increasing timeout from 3s to 10s and retrying 5 times
&lt;/span&gt;    &lt;span class="n"&gt;timeout&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;10.0&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;attempt&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;max_retries&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;raise_for_status&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;exceptions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;RequestException&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;exc&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;attempt&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;max_retries&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;RuntimeError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Service failed after &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;max_retries&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; attempts: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;exc&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

            &lt;span class="c1"&gt;# Predictable exponential backoff without jitter
&lt;/span&gt;            &lt;span class="n"&gt;sleep_duration&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt; &lt;span class="n"&gt;attempt&lt;/span&gt;
            &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sleep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sleep_duration&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In isolated unit tests, this snippet passes. Under production load, it causes several problems:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Synchronized retry storms:&lt;/strong&gt; Because the backoff uses fixed powers of two without jitter, hundreds of concurrent callers retry at the exact same intervals, overwhelming the upstream service as it tries to recover.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Socket and thread exhaustion:&lt;/strong&gt; Increasing the timeout from 3 seconds to 10 seconds means threads hold outbound connections three times longer. Under steady traffic, the web server exhausts its worker pool, and incoming requests queue up until the health check fails.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Latency amplification:&lt;/strong&gt; Instead of failing fast within 3 seconds so the caller can degrade gracefully, requests hang for up to a minute before failing anyway.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftnzr6ahxjtb1mk2tyk9j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftnzr6ahxjtb1mk2tyk9j.png" alt="Figure 2: How an unjittered retry loop exhausts connection pools compared to a bounded circuit-breaker pattern." width="800" height="447"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Figure 2: How an unjittered retry loop exhausts connection pools compared to a bounded circuit-breaker pattern.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The model suggested this implementation because retrying with exponential backoff is standard boilerplate in its training data. It has no visibility into your thread pool limits, traffic distribution, or upstream capacity.&lt;/p&gt;
&lt;h2&gt;
  
  
  3. Resilient Implementation: Bounded Retries and Circuit Breaking
&lt;/h2&gt;

&lt;p&gt;When you know the failure dynamics, you do not let the model pick the strategy. You define the bounds first: maximum latency, randomized jitter, and a circuit breaker that sheds load when the downstream service is down.&lt;/p&gt;

&lt;p&gt;Here is a Python implementation that enforces those boundaries:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;dataclasses&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;dataclass&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;enum&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Enum&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;typing&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Callable&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Any&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;CircuitState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Enum&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;CLOSED&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;CLOSED&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="n"&gt;OPEN&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;OPEN&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="n"&gt;HALF_OPEN&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;HALF_OPEN&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="nd"&gt;@dataclass&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;frozen&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ResilienceConfig&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;max_attempts&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;
    &lt;span class="n"&gt;base_backoff_sec&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;float&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.2&lt;/span&gt;
    &lt;span class="n"&gt;max_backoff_sec&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;float&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;2.0&lt;/span&gt;
    &lt;span class="n"&gt;failure_threshold&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;
    &lt;span class="n"&gt;recovery_timeout_sec&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;float&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;15.0&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;CircuitBreakerOpenException&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Exception&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;Raised when requests are shed immediately because the circuit is open.&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
    &lt;span class="k"&gt;pass&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;BoundedResilientClient&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;
    Client that limits retry duration, adds full jitter,
    and protects thread pools through circuit breaking.
    &lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;ResilienceConfig&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;config&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;config&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;CircuitState&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;CLOSED&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;failure_count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;last_state_change&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;monotonic&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;_on_failure&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;failure_count&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;failure_count&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;failure_threshold&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;CircuitState&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;OPEN&lt;/span&gt;
            &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;last_state_change&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;monotonic&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;_on_success&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;failure_count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;CircuitState&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;CLOSED&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;_compute_backoff_with_jitter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;attempt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;float&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;ceiling&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;max_backoff_sec&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;base_backoff_sec&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;attempt&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;uniform&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ceiling&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Callable&lt;/span&gt;&lt;span class="p"&gt;[[],&lt;/span&gt; &lt;span class="n"&gt;Any&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Any&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;now&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;monotonic&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;CircuitState&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;OPEN&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;now&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;last_state_change&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;recovery_timeout_sec&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;CircuitState&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;HALF_OPEN&lt;/span&gt;
            &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="c1"&gt;# Fail immediately to protect local thread and connection pools
&lt;/span&gt;                &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;CircuitBreakerOpenException&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; circuit is OPEN. Request shed.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;attempt&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;max_attempts&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
            &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;action&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
                &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;_on_success&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
                &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;
            &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="nb"&gt;Exception&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;attempt&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;max_attempts&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;CircuitState&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;HALF_OPEN&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                    &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;_on_failure&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
                    &lt;span class="k"&gt;raise&lt;/span&gt;

                &lt;span class="n"&gt;backoff&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;_compute_backoff_with_jitter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;attempt&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sleep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;backoff&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This pattern prevents cascading issues in three ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Immediate rejection:&lt;/strong&gt; When the circuit is open, requests fail in fractions of a millisecond, leaving thread pools free for healthy routes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;De-synchronized traffic:&lt;/strong&gt; Full jitter spreads retries evenly across time, avoiding thundering herd spikes on recovering services.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Strictly bounded wait time:&lt;/strong&gt; Retries cap out quickly rather than holding resources for long timeouts.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. The AI Task Rationing Matrix
&lt;/h2&gt;

&lt;p&gt;To build and preserve engineering judgment, categorize engineering tasks by the risk of outsourcing understanding:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyohir16dwzonh55d9t54.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyohir16dwzonh55d9t54.png" alt="Figure 3: Framework for delegating engineering tasks to AI based on cognitive value and risk" width="800" height="447"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Figure 3: Framework for delegating engineering tasks to AI based on cognitive value and risk.&lt;/em&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Category&lt;/th&gt;
&lt;th&gt;Typical Tasks&lt;/th&gt;
&lt;th&gt;Role for AI&lt;/th&gt;
&lt;th&gt;Review Rule&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Low Risk (High Leverage)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Syntax lookups, boilerplate, regular expressions, test setup, CLI flags&lt;/td&gt;
&lt;td&gt;Full delegation&lt;/td&gt;
&lt;td&gt;Verify syntax and run existing tests. Relearning these syntax details adds little value.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Medium Risk (Collaborative)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Edge cases, schema validation, test coverage gaps, local refactoring&lt;/td&gt;
&lt;td&gt;Sounding board&lt;/td&gt;
&lt;td&gt;Write the core logic yourself first. Ask the model what inputs or boundaries you missed.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;High Risk (Critical Core)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Concurrency controls, database transactions, auth/permissions, cache invalidation&lt;/td&gt;
&lt;td&gt;Adversarial reviewer&lt;/td&gt;
&lt;td&gt;Design and write alone. Use the model only to generate adversarial test cases against your finished contracts.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  5. Practical Guidelines for Teams
&lt;/h2&gt;

&lt;p&gt;Before merging code authored or suggested by an agent, review against these checks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Can you explain the execution path and edge cases without consulting the prompt?&lt;/li&gt;
&lt;li&gt;[ ] Did you state a hypothesis about the bug before asking the model for a fix?&lt;/li&gt;
&lt;li&gt;[ ] Are failure modes (timeouts, 429 rate limits, partial payloads) verified with actual test assertions rather than happy-path mocks?&lt;/li&gt;
&lt;li&gt;[ ] Are retries, timeouts, and resource pools strictly bounded?&lt;/li&gt;
&lt;li&gt;[ ] Does the change solve the root cause rather than increasing a buffer or timeout to mask a bottleneck?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  6. Summary
&lt;/h2&gt;

&lt;p&gt;Coding tools are fast, but they do not build mental models for you.&lt;/p&gt;

&lt;p&gt;Point AI at the parts of your work where being wrong has low consequence: typing boilerplate, scaffolding tests, and looking up syntax. Keep your hands on the core logic: state management, failure modes, and system boundaries.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>learning</category>
      <category>programming</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>The Part of AI Coding Agents I Didn't Expect to Care About: Latency</title>
      <dc:creator>Prasad Rane</dc:creator>
      <pubDate>Mon, 07 Sep 2026 06:19:42 +0000</pubDate>
      <link>https://dev.to/prasad_rane_dev/the-part-of-ai-coding-agents-i-didnt-expect-to-care-about-latency-44ak</link>
      <guid>https://dev.to/prasad_rane_dev/the-part-of-ai-coding-agents-i-didnt-expect-to-care-about-latency-44ak</guid>
      <description>&lt;p&gt;I spent the last few months pretty much living in Claude Code.&lt;/p&gt;

&lt;p&gt;It became a regular part of how I worked: give it a task, let it work through the codebase, review what it changed, and keep iterating.&lt;/p&gt;

&lt;p&gt;Today I ran the same multi-step agentic task through Google Antigravity, and the difference surprised me.&lt;/p&gt;

&lt;p&gt;Antigravity, running Gemini Flash 3.8, finished the task in about half the time Claude Code took with Sonnet 5.&lt;/p&gt;

&lt;p&gt;The speed was nice, but that's not actually what stood out to me.&lt;/p&gt;

&lt;p&gt;It was the waiting.&lt;/p&gt;

&lt;h2&gt;
  
  
  The hidden cost of waiting
&lt;/h2&gt;

&lt;p&gt;When an AI coding agent is working through several tool calls, there are moments where you can be staring at the screen for a minute or two waiting for the next step.&lt;/p&gt;

&lt;p&gt;At first, I didn't think much of it.&lt;/p&gt;

&lt;p&gt;But I've noticed what I do during those waits.&lt;/p&gt;

&lt;p&gt;I check Slack.&lt;/p&gt;

&lt;p&gt;I look at another tab.&lt;/p&gt;

&lt;p&gt;I start thinking about something else.&lt;/p&gt;

&lt;p&gt;And when the agent finally finishes, I have to spend a few seconds — sometimes longer — figuring out where I was in the problem.&lt;/p&gt;

&lt;p&gt;That's a surprisingly expensive interruption.&lt;/p&gt;

&lt;p&gt;It's not just the two minutes spent waiting. It's the context switch that happens during those two minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  When the feedback loop gets tight
&lt;/h2&gt;

&lt;p&gt;With a faster agent, the interaction feels different.&lt;/p&gt;

&lt;p&gt;You make a change.&lt;/p&gt;

&lt;p&gt;The agent runs a tool.&lt;/p&gt;

&lt;p&gt;It comes back.&lt;/p&gt;

&lt;p&gt;You review the result and give it the next instruction.&lt;/p&gt;

&lt;p&gt;Repeat.&lt;/p&gt;

&lt;p&gt;When those cycles happen in seconds rather than minutes, it's much easier to stay focused on the problem.&lt;/p&gt;

&lt;p&gt;You still have the architecture in your head. You remember why you made the previous change. You know what you want to try next.&lt;/p&gt;

&lt;p&gt;You don't have to reconstruct the mental model every time the agent finishes a long operation.&lt;/p&gt;

&lt;p&gt;That was the part I didn't expect to notice as much as I did.&lt;/p&gt;

&lt;h2&gt;
  
  
  Speed isn't just about tokens per second
&lt;/h2&gt;

&lt;p&gt;When we compare coding agents, we tend to focus on things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which model writes better code?&lt;/li&gt;
&lt;li&gt;How good is the reasoning?&lt;/li&gt;
&lt;li&gt;How well does it understand a large codebase?&lt;/li&gt;
&lt;li&gt;How accurate are its tool calls?&lt;/li&gt;
&lt;li&gt;How fast does it generate tokens?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those things obviously matter.&lt;/p&gt;

&lt;p&gt;But there's another metric that is harder to measure:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How long does it take to get back into the interaction?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A coding agent isn't operating in isolation. There's a human sitting in the loop.&lt;/p&gt;

&lt;p&gt;If the agent takes two minutes to complete a step, the human doesn't necessarily remain in the loop for those two minutes.&lt;/p&gt;

&lt;p&gt;That's where latency starts affecting productivity in a way that raw benchmark numbers don't really capture.&lt;/p&gt;

&lt;h2&gt;
  
  
  I'm not abandoning Claude Code
&lt;/h2&gt;

&lt;p&gt;Claude Code is still very good, and I wouldn't make a broader conclusion from one task or one comparison.&lt;/p&gt;

&lt;p&gt;The point isn't that one tool is universally better than another.&lt;/p&gt;

&lt;p&gt;What surprised me was how much &lt;strong&gt;low latency changed the way I interacted with the agent&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;After experiencing an agent that keeps the feedback loop moving quickly, long waits feel much more noticeable.&lt;/p&gt;

&lt;p&gt;Maybe that's one of the next things we'll start paying more attention to with agentic development:&lt;/p&gt;

&lt;p&gt;Not just &lt;em&gt;how capable is the model?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;But also:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How well does the system keep the developer in the loop?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because sometimes the biggest productivity improvement isn't getting the agent to do more.&lt;/p&gt;

&lt;p&gt;It's simply not giving the developer enough time to get distracted.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>devrel</category>
      <category>programming</category>
      <category>agents</category>
    </item>
    <item>
      <title>The Feynman Algorithm: A Developer’s Guide to "Thinking Very Hard"</title>
      <dc:creator>Prasad Rane</dc:creator>
      <pubDate>Mon, 27 Apr 2026 16:06:50 +0000</pubDate>
      <link>https://dev.to/prasad_rane_dev/the-feynman-algorithm-a-developers-guide-to-thinking-very-hard-384h</link>
      <guid>https://dev.to/prasad_rane_dev/the-feynman-algorithm-a-developers-guide-to-thinking-very-hard-384h</guid>
      <description>&lt;p&gt;If you search for Richard Feynman’s methods, you’ll likely stumble upon the famous Feynman Technique, a brilliant framework for learning new concepts by explaining them to a child.&lt;/p&gt;

&lt;p&gt;But there’s another, lesser-known Feynman method. It was jokingly coined by his colleague, physicist Murray Gell-Mann, who said that Feynman’s process for solving problems looked like this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;Write down the problem.&lt;/li&gt;
&lt;li&gt;Think very hard.&lt;/li&gt;
&lt;li&gt;Write down the solution.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;

&lt;p&gt;At first glance, this sounds like a meme. "Draw the rest of the owl," right? But if we look closer at this "Feynman Algorithm," it actually perfectly outlines the lifecycle of debugging and writing software.&lt;br&gt;
Let’s break down how this tongue-in-cheek algorithm can actually help you become a better developer.&lt;/p&gt;




&lt;h3&gt;
  
  
  Step 1: Write down the problem ✍️
&lt;/h3&gt;

&lt;p&gt;Albert Einstein supposedly said, &lt;em&gt;"If I had an hour to solve a problem, I'd spend 55 minutes thinking about the problem and 5 minutes thinking about solutions.&lt;/em&gt;"&lt;/p&gt;

&lt;p&gt;In programming, we often skip this. We see an error log and immediately start changing variables and refreshing the browser. But "writing down the problem" forces you to define exactly what is going wrong.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bad Problem Definition:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"The login page is broken."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Good Problem Definition:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"When a returning user tries to log in with Google OAuth, the API returns a 500 server error, but only on mobile Safari."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When you write the problem down clearly, the scope narrows. Half the time, simply defining the problem accurately reveals the solution.&lt;/p&gt;




&lt;h3&gt;
  
  
  Step 2: "Think very hard" 🧠
&lt;/h3&gt;

&lt;p&gt;This is the punchline of the joke. To outsiders, Feynman just stared at a chalkboard and magically found the answer. But "thinking very hard" doesn't mean having a massive IQ; it means engaging in &lt;strong&gt;structured, focused analysis&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;How do developers "think very hard"?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;We Rubber Duck&lt;/strong&gt;: We explain the code line-by-line to an inanimate object (or a patient coworker).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;We Isolate&lt;/strong&gt;: We comment out chunks of code to see if the bug still happens. We narrow down the variables.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;We Step Away&lt;/strong&gt;: Sometimes, "thinking very hard" means taking a shower or going for a walk. Your brain's "diffuse mode" keeps working on the problem in the background.&lt;/p&gt;

&lt;p&gt;"Thinking very hard" means resisting the urge to copy-paste the first Stack Overflow answer you see without understanding why it works.&lt;/p&gt;




&lt;h3&gt;
  
  
  Step 3: Write down the solution 💡
&lt;/h3&gt;

&lt;p&gt;You figured it out! You fixed the bug! Time to push to production and go home, right? Not quite.&lt;/p&gt;

&lt;p&gt;In the context of coding, "writing down the solution" means three things:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Writing clean code&lt;/strong&gt;: Making sure your solution isn't just a hacky workaround, but a readable, maintainable piece of logic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Writing tests&lt;/strong&gt;: Proving that your solution actually works and ensuring it won't break in the future.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Writing documentation&lt;/strong&gt;: Leaving comments explaining why you did what you did.&lt;/p&gt;

&lt;p&gt;Your future self (and your team) will thank you when they read a comment like:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;// Using a Set here instead of an Array because checking for duplicates was causing a massive performance bottleneck.&lt;/code&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Final Thoughts
&lt;/h3&gt;

&lt;p&gt;The Feynman Algorithm might have started as a joke among Nobel Prize-winning physicists, but it’s remarkably practical for software engineers.&lt;/p&gt;

&lt;p&gt;Next time you are stuck on a nasty bug, don't just start mashing the keyboard. Stop. Write the problem down. Take a walk to think very hard. And when you solve it, document it for the next developer.&lt;/p&gt;

&lt;p&gt;Let me know in the comments how you practice "thinking very hard" when you are stuck on a tricky coding problem!&lt;/p&gt;

</description>
      <category>programming</category>
      <category>productivity</category>
      <category>beginners</category>
      <category>developer</category>
    </item>
  </channel>
</rss>
