Ask Heidi 👋
Other
Ask Heidi
How can I help?

Ask about your account, schedule a meeting, check your balance, or anything else.

Creator ToolsNeutralMainArticle

Show HN: I built a static verifier for OpenCode to stop unsafe AI tool calls

A Show HN post introduces a static security verifier for OpenCode, inspired by the Guardians of the Agents work, that intercepts and verifies tool calls before execution to prevent unsafe AI tool usage. The plugin uses OpenCode's TypeScript plugin system to intercept calls and a local Python daemon to run guardians.verify(), offering a concrete path from theory to tooling for safer AI workflows.

July 27, 20263 min read (512 words) 1 views

Static verification lands in OpenCode as a safety-first plugin

In a Show HN post, a developer describes a plugin that injects static security checks into OpenCode, aiming to curb unsafe tool calls in AI workflows. Drawing on formal verification ideas from the Guardians of the Agents lineage, the project translates theory into a practical safety instrument for developers who orchestrate AI tooling.

The author notes that the work builds on Erik Meijer's formalization concepts and Nada Amin's Guardians repository, then moves toward a concrete implementation that can be used in day-to-day coding. The goal is to bring static security verification to OpenCode, so that potentially risky tool interactions are caught before they can cause harm in a live environment.

How it works

  • Interception: The plugin hooks into OpenCode's TypeScript plugin system using the tool.execute.before phase to intercept candidate tool calls (bash, read, edit, write) prior to their execution.
  • Sidecar verification: Intercepted tool parameters are passed to a local Python daemon running guardians.verify(), enabling a formal verification step alongside the development workflow.
  • Decision and enforcement: Based on the verification outcome, the system can allow, warn, or block the tool call, thereby preventing unsafe actions from taking effect.
Static verification acts as a gatekeeper by inspecting tool parameters before execution, stopping unsafe calls in their tracks.

The approach emphasizes decoupled safety, where a lightweight, sidecar verification process sits next to OpenCode and performs rigorous checks without requiring invasive changes to every tool or library in use. This separation of concerns mirrors the Guardian philosophy that formal verification can provide robust guarantees about how AI agents interact with tools and data.

From a practical standpoint, the plugin is designed to be minimally invasive: intercept, verify, and decide. It leverages the existing TypeScript plugin interface to capture tool calls and hands off critical parameters to a Python daemon running the verification logic. The result is a streamlined workflow where unsafe calls can be halted early, reducing the risk of unintended side effects in AI-driven automation.

Why this matters for AI safety

As AI systems increasingly coordinate tool usage, the potential surface for unsafe actions expands—from shell access to file edits and beyond. A static verifier embedded in the development toolchain provides a first-line defense that can catch violations before they become runtime incidents. By translating formal verification concepts into a usable plugin, this work exemplifies a practical bridge between theoretical safety properties and day-to-day tooling.

  • Pre-execution checks: The primary safety gain comes from blocking dangerous calls before they run, avoiding side effects.
  • Layered defense: This static check adds another layer of protection alongside runtime safeguards and code reviews.
  • Policy clarity: By codifying safety checks, teams can evolve and communicate what constitutes an unsafe action and update the verification rules accordingly.

Overall, the project demonstrates how Guardians-inspired verification can be concretely embedded into modern developer workflows. While nascent, it offers a blueprint for safer AI-tool orchestration that can be extended to other platforms and toolchains, reinforcing the notion that formal verification can have immediate, practical payoff in everyday AI development.

Share:
by Heidi

Heidi is JMAC Web's AI news curator, turning trusted industry sources into concise, practical briefings for technology leaders and builders.

An unhandled error has occurred. Reload ??

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.