<?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: Interro</title>
    <description>The latest articles on DEV Community by Interro (@interro-ai).</description>
    <link>https://dev.to/interro-ai</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%2F4141949%2Fd059b7a0-20eb-4245-a8ca-87af84b044ce.png</url>
      <title>DEV Community: Interro</title>
      <link>https://dev.to/interro-ai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/interro-ai"/>
    <language>en</language>
    <item>
      <title>Fixing Bedrock ToolResult Ordering Errors</title>
      <dc:creator>Interro</dc:creator>
      <pubDate>Sat, 26 Sep 2026 17:19:18 +0000</pubDate>
      <link>https://dev.to/interro-ai/fixing-bedrock-toolresult-ordering-errors-a6d</link>
      <guid>https://dev.to/interro-ai/fixing-bedrock-toolresult-ordering-errors-a6d</guid>
      <description>&lt;p&gt;A tool executed successfully, but Bedrock rejected the next message because &lt;code&gt;toolResult&lt;/code&gt; IDs did not match the preceding &lt;code&gt;toolUse&lt;/code&gt; order.&lt;/p&gt;

&lt;p&gt;INC-004 is easy to create when tools run in parallel. Async completion order is not protocol order, and checkpoint restore or middleware can shuffle result blocks.&lt;/p&gt;

&lt;p&gt;The fix is to derive result order from the assistant's &lt;code&gt;toolUseId&lt;/code&gt; sequence, fill missing results with explicit error blocks, and validate the assembled message before sending it to the provider.&lt;/p&gt;

&lt;p&gt;Test at least three cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Results complete in reverse order.&lt;/li&gt;
&lt;li&gt;One result is missing.&lt;/li&gt;
&lt;li&gt;A checkpoint restores shuffled results.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Do not rely on dictionary insertion order or the order in which futures complete. The provider contract owns the final ordering rule.&lt;/p&gt;

&lt;p&gt;Run a source review with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;prevention-scanner scan &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;--format&lt;/span&gt; json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Read the &lt;a href="https://github.com/InterroAI/interro-awesome-agent-incidents/blob/main/INC-004-toolresult-ordering.md" rel="noopener noreferrer"&gt;full INC-004 incident&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  AI #AWS #Bedrock #LangGraph
&lt;/h1&gt;

</description>
      <category>ai</category>
      <category>aws</category>
      <category>nlp</category>
      <category>devops</category>
    </item>
    <item>
      <title>Why AWS Bedrock Returned an Empty Agent Response</title>
      <dc:creator>Interro</dc:creator>
      <pubDate>Sat, 26 Sep 2026 17:12:34 +0000</pubDate>
      <link>https://dev.to/interro-ai/why-aws-bedrock-returned-an-empty-agent-response-383g</link>
      <guid>https://dev.to/interro-ai/why-aws-bedrock-returned-an-empty-agent-response-383g</guid>
      <description>&lt;p&gt;Bedrock reported generated output tokens, but the user received an empty assistant message. No exception explained the failure.&lt;/p&gt;

&lt;p&gt;INC-003 came from an adapter that only extracted ordinary text blocks. Bedrock Converse can return &lt;code&gt;reasoningContent&lt;/code&gt;, &lt;code&gt;guardContent&lt;/code&gt;, &lt;code&gt;toolUse&lt;/code&gt;, empty text, and unknown future block types. A second layer discarded the message because it used a truthiness check instead of preserving an empty string.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adapter controls
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Validate the provider content-block schema.&lt;/li&gt;
&lt;li&gt;Preserve empty text when a message exists.&lt;/li&gt;
&lt;li&gt;Log reasoning and guardrail diagnostics without exposing internal reasoning.&lt;/li&gt;
&lt;li&gt;Add fixtures for reasoning-only, guardrail, tool-use, empty-text, and unknown blocks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Provider adapters are reliability boundaries. A graph can be correct while its translation layer silently drops the response.&lt;/p&gt;

&lt;p&gt;Review source patterns with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;prevention-scanner scan &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;--format&lt;/span&gt; json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Confirm the fix with provider contract tests, not only a happy-path mock.&lt;/p&gt;

&lt;p&gt;Read the &lt;a href="https://github.com/InterroAI/interro-awesome-agent-incidents/blob/main/INC-003-empty-bedrock-response.md" rel="noopener noreferrer"&gt;full INC-003 incident&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  AI #AWS #Bedrock #LLMOps
&lt;/h1&gt;

</description>
      <category>ai</category>
      <category>aws</category>
      <category>azure</category>
      <category>agents</category>
    </item>
    <item>
      <title>When an AI Agent Context Reaches 261k Tokens</title>
      <dc:creator>Interro</dc:creator>
      <pubDate>Sat, 26 Sep 2026 17:04:45 +0000</pubDate>
      <link>https://dev.to/interro-ai/how-to-stop-an-ai-agent-infinite-loop-3i03</link>
      <guid>https://dev.to/interro-ai/how-to-stop-an-ai-agent-infinite-loop-3i03</guid>
      <description>&lt;p&gt;One research request grew to 261,834 tokens and failed against a 128,000-token model limit. The context did not become large in one prompt. Replayed tool results accumulated across checkpoints.&lt;/p&gt;

&lt;p&gt;INC-002 exposed three missing controls: no hard token budget, no message cap, and no pruning policy for old tool observations. Large search and file results were also inserted without compression.&lt;/p&gt;

&lt;h2&gt;
  
  
  A practical prevention stack
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Set a maximum context-token budget on every graph.&lt;/li&gt;
&lt;li&gt;Cap messages and replayable tool results.&lt;/li&gt;
&lt;li&gt;Compress observations before model re-entry.&lt;/li&gt;
&lt;li&gt;Check the budget after every node, not only before invocation.&lt;/li&gt;
&lt;li&gt;Test a long multi-tool request with realistic result sizes.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The important metric is context size at each boundary. A final failure log is too late to explain where growth started.&lt;/p&gt;

&lt;p&gt;Run a heuristic review with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;prevention-scanner scan &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;--format&lt;/span&gt; json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then confirm the result with a test that simulates 50 or more tool calls and asserts the context remains bounded.&lt;/p&gt;

&lt;p&gt;Read the &lt;a href="https://github.com/InterroAI/interro-awesome-agent-incidents/blob/main/INC-002-context-explosion.md" rel="noopener noreferrer"&gt;full INC-002 incident&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  AI #Agents #LangGraph #LLMOps
&lt;/h1&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>rag</category>
      <category>langchain</category>
    </item>
    <item>
      <title>How to Stop an AI Agent Infinite Loop</title>
      <dc:creator>Interro</dc:creator>
      <pubDate>Sat, 26 Sep 2026 16:24:07 +0000</pubDate>
      <link>https://dev.to/interro-ai/how-to-stop-an-ai-agent-infinite-loop-1ajd</link>
      <guid>https://dev.to/interro-ai/how-to-stop-an-ai-agent-infinite-loop-1ajd</guid>
      <description>&lt;p&gt;A simple planning request triggered 105 calls to the same goal tool. The system did not crash immediately. It kept spending tokens until the turn limit stopped it, without producing a useful answer.&lt;/p&gt;

&lt;p&gt;This was INC-001: goal tools were exposed globally instead of being scoped to the node that owned goal state. Every model node could ask for the same incomplete goal, so the graph kept returning to the same decision.&lt;/p&gt;

&lt;h3&gt;
  
  
  Controls that matter
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Give each tool an explicit owning node.&lt;/li&gt;
&lt;li&gt;Add maximum turns and per-tool call limits.&lt;/li&gt;
&lt;li&gt;Detect no-progress transitions.&lt;/li&gt;
&lt;li&gt;Test the real plan-to-execute route with a small request.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A configuration value is not a guard unless the live loop reads and enforces it. The regression test should assert that a 4+4 request terminates and that planning nodes cannot call goal-state tools.&lt;/p&gt;

&lt;p&gt;PreventAI can flag source patterns associated with this incident:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;prevention-scanner scan &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;--format&lt;/span&gt; json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The scanner is heuristic. Pair it with graph, load, and termination tests.&lt;/p&gt;

&lt;p&gt;Read the &lt;a href="https://github.com/InterroAI/interro-awesome-agent-incidents/blob/main/INC-001-goal-loop.md" rel="noopener noreferrer"&gt;full INC-001 incident&lt;/a&gt;, then audit which node owns every tool in your agent.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>langgraph</category>
      <category>sre</category>
    </item>
  </channel>
</rss>
