<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged pretooluse</title>
<link>https://coderlegion.com/tag/pretooluse</link>
<description>Powered by Question2Answer</description>
<item>
<title>Review the Tool Calls That Write, Spend, or Leave the Machine</title>
<link>https://coderlegion.com/30145/review-the-tool-calls-that-write-spend-or-leave-the-machine</link>
<description>&lt;p&gt;A person should see the calls that change something. Reads can run when a policy already allows that tool and those arguments.&lt;/p&gt;
&lt;h3 id=&quot;the-failure-mode&quot;&gt;The failure mode&lt;/h3&gt;
&lt;p&gt;Reviewing every tool call does not scale, and reviewing none of them leaves a coding agent free to write files, spend money, send messages, or leave the machine. A review after the call is a transcript of damage that already happened.&lt;/p&gt;
&lt;h3 id=&quot;the-check&quot;&gt;The check&lt;/h3&gt;
&lt;p&gt;ThumbGate checks the tool name and the arguments before the call runs. The gate shows one line of intent for a write, a payment, a message, or a command that leaves the machine: the command, the path, or the destination. A read or a local lookup proceeds when the policy already allows that tool and those arguments.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;function reviewBeforeRun(toolName, args) {
  const command = String(args.command || '');
  const leaves = toolName === 'Bash' &amp;amp;&amp;amp; /\b(curl|ssh|scp|git\s+push)\b/.test(command);
  const writes = toolName === 'Write' || toolName === 'Edit';
  const sends = toolName === 'SendMessage' || toolName === 'WebFetch';
  if (leaves || writes || sends) {
    return { decision: 'review', show: command || args.path || args.url || toolName };
  }
  return { decision: 'allow' };
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The check belongs in the PreToolUse hook, on the tool name and the arguments, before a shell or network call runs.&lt;/p&gt;
&lt;h3 id=&quot;try-it&quot;&gt;Try it&lt;/h3&gt;
&lt;p&gt;Install with &lt;code&gt;npx thumbgate init&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;ThumbGate Pro is $19 a month or $149 a year per operator.&lt;/p&gt;
&lt;p&gt;Pricing: &lt;a rel=&quot;nofollow&quot; href=&quot;https://thumbgate.ai/pricing&quot;&gt;https://thumbgate.ai/pricing&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Checkout: &lt;a rel=&quot;nofollow&quot; href=&quot;https://thumbgate.ai/go/pro?utm_source=coderlegion&amp;amp;utm_medium=community&amp;amp;utm_campaign=pretool-hook&quot;&gt;https://thumbgate.ai/go/pro?utm_source=coderlegion&amp;amp;utm_medium=community&amp;amp;utm_campaign=pretool-hook&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Repo: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/IgorGanapolsky/ThumbGate&quot;&gt;https://github.com/IgorGanapolsky/ThumbGate&lt;/a&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/30145/review-the-tool-calls-that-write-spend-or-leave-the-machine</guid>
<pubDate>Wed, 07 Oct 2026 14:04:27 +0000</pubDate>
</item>
<item>
<title>Check the tool call before a coding agent runs it</title>
<link>https://coderlegion.com/29888/check-the-tool-call-before-a-coding-agent-runs-it</link>
<description>&lt;p&gt;A system prompt asks the model to behave. The tool call still goes out when the model ignores that ask.&lt;/p&gt;
&lt;p&gt;ThumbGate sits in front of the call. The PreToolUse hook reads the command before it runs and can block it. A thumbs-down on a bad call becomes a rule, so the same call does not get through the next time.&lt;/p&gt;
&lt;p&gt;Install on a repo with &lt;code&gt;npx thumbgate init&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Pro is $19 a month or $149 a year per operator.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://thumbgate.ai/pricing&quot;&gt;https://thumbgate.ai/pricing&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://thumbgate.ai/go/pro?utm_source=coderlegion&amp;amp;utm_medium=community&amp;amp;utm_campaign=pretool-hook&quot;&gt;https://thumbgate.ai/go/pro?utm_source=coderlegion&amp;amp;utm_medium=community&amp;amp;utm_campaign=pretool-hook&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The longer piece on why the prompt is the wrong layer: &lt;a rel=&quot;nofollow&quot; href=&quot;https://coderlegion.com/28973/why-system-prompts-wont-save-your-ai-agent-building-architectural-injection-immunity&quot;&gt;https://coderlegion.com/28973/why-system-prompts-wont-save-your-ai-agent-building-architectural-injection-immunity&lt;/a&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/29888/check-the-tool-call-before-a-coding-agent-runs-it</guid>
<pubDate>Mon, 05 Oct 2026 16:36:49 +0000</pubDate>
</item>
</channel>
</rss>