Why does my AI agent run commands that aren't installed?

Because the model writes the command from what it has seen in training, not from what is on your computer. It has seen pkill, dig and grep in thousands of Linux examples, so it reaches for them on a Windows machine that doesn't have them, and only finds out when the command fails.

Why it happens

A coding agent never looks at your computer before it writes a command. It predicts the command the way it predicts any text, from patterns. Linux tools dominate those patterns, so on Windows, or on a slim Linux image, it often asks for programs that simply aren't there.

Each miss costs a round trip: the command fails, the agent reads the error, guesses again, and sometimes tries a second missing tool. On a long task this adds up to wasted time and tokens.

What you can do without Check

How Check stops it

Check runs in the agent's pre-action hook. Before a command runs, your own shell steps through it without executing anything and reports exactly which programs it would call. If one doesn't exist on your machine, the command is stopped and the agent gets your shell's own words, so its next try is a fix. Two real examples:

pkill -f "wrangler dev"
pkill: not found

dig +short DS golproductions.com @1.1.1.1
dig: not found

This includes commands inside $(...), backticks and bash -c, and commands after || or else. PowerShell commands are read by PowerShell's own parser. When Check can't be sure, it lets the command run rather than guess.

Try it.

100 free blocks, then A$0.10 for each action Check stops, from a prepaid balance. Allowed actions are always free. No subscription. Windows and Linux; macOS isn't supported yet. Get your key at the console, then run this in your own terminal:

npx @golproductions/check@latest --install

Or add Check as a plugin for Claude Code, Gemini CLI, Copilot CLI or Codex: the guide. Everything Check checks, and what it lets through: What Check does.

Your machine checks it before it runs.

100 free blocks. Get your GOL API Key at the console.