Review the Tool Calls That Write, Spend, or Leave the Machine

Leader ●1 ●2 ●10
calendar_today ago • schedule1 min read

A person should see the calls that change something. Reads can run when a policy already allows that tool and those arguments.

The failure mode

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.

The check

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.

function reviewBeforeRun(toolName, args) {
  const command = String(args.command || '');
  const leaves = toolName === 'Bash' && /\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' };
}

The check belongs in the PreToolUse hook, on the tool name and the arguments, before a shell or network call runs.

Try it

Install with npx thumbgate init.

ThumbGate Pro is $19 a month or $149 a year per operator.

Pricing: https://thumbgate.ai/pricing

Checkout: https://thumbgate.ai/go/pro?utm_source=coderlegion&utm_medium=community&utm_campaign=pretool-hook

Repo: https://github.com/IgorGanapolsky/ThumbGate

🔥 Join developers growing publicly
Share your knowledge, build in public, and grow your developer presence with a global community.

More Posts

Your AI Doesn't Just Write Tests. It Runs Them Too.

Kevin Martinez - May 12

Check the tool call before a coding agent runs it

IgorGanapolsky - Oct 5

Comparison: Universal Import vs. Plaid/Yodlee

Pocket Portfolio - Mar 12

MCP Is the USB-C of AI. So Why Are You Plugging Everything In?

Ken W. Algerverified - Jun 10

The Interface of Uncertainty: Designing Human-in-the-Loop

Pocket Portfolio - Mar 10
chevron_left
941 Points • 13 Badges
Florida, USA • igorganapolsky.com
5Posts
2Comments
7Connections
Forward Deploy AI Engineer

Related Jobs

View all jobs →

Commenters (This Week)

3 comments
1 comment
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!