JevMade

Sign in
← Back to guides

JevMade field notes / article

Check a coding agent’s command before it runs

Jonathan Mitchell proposes asking Jev about each shell command before a coding assistant executes it, while the example leaves important integration and safety work unfinished.

Original by Jonathan MitchellGuardrails

Listen to this guide

JevMade’s plain-English explanation

0:00 /

Our summary

A coding assistant with shell access can propose deleting files, rewriting shared history or changing a database. Jonathan Mitchell suggests adding a check before execution. In Claude Code, a PreToolUse hook is a small program called before a tool runs, giving another component a chance to stop the action.

The Python example sends the command to TypeSafe and asks Jev to choose safe, risky or destructive. It intends to block destructive commands and risky commands with confidence above 0.7. Other commands pass. The prose suggests asking a person about moderate uncertainty, but the sample does not implement that step.

Treat this as a design sketch, not a tested installation recipe. The article does not demonstrate that its service call and blocking response match current software contracts. Commands sent outside the machine may contain sensitive arguments. Independent permissions and isolation remain necessary: another model can also wrongly label a dangerous command safe.

Key takeaways

  1. Checking before execution creates a place to stop an action rather than discovering damage afterward.
  2. The sample’s 0.7 rule and its missing human prompt matter; do not assume the prose describes implemented behavior.
  3. Verify the hook’s actual blocking behavior and outside data handling before granting an agent powerful tools.

No measured protection or working integration is established here. The article’s claim that a non-generating model cannot be persuaded is not a security guarantee; use ordinary access restrictions as well.

Jonathan Mitchell’s blog · Original published

Read the original guide Opens the author’s site in a new tab.

Keep this for later

Sign in to bookmark experiments, guides and videos, and keep notes only you can see.

Continue to sign in

We’ll bring you back to this listing.