Scan your whole stack
Are you using recusal?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.15.1
recusal was last scanned on 23 Nov 2026 at version 0.15.1. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.15.1 LATEST | 23 Nov 2026 | 1 rule fired |
| 0.15.0 | 21 Nov 2026 | 1 rule fired |
| 0.14.2 | 19 Nov 2026 | 1 rule fired |
| 0.14.1 | 14 Nov 2026 | Not shown |
| 0.14.0 | 12 Nov 2026 | Not shown |
Findings for v0.15.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
An encoded string in the package decodes, without being run, to a shell command, a network call, a code-execution call or an instruction aimed at an AI agent. The content was hidden from a plain read of the code. Encoding has legitimate uses, so the decoded content needs review.
MEDIUMThe score describes 0.15.1; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Recusal checks each tool call an AI agent proposes against your policy, and refuses the unsafe or unapproved ones before the tool runs. No model makes that decision; your policy functions do.
It drops into Claude Code as a hook, MCP tool calls included, and gates a Claude Messages API loop or any Python agent loop. For agent frameworks there are eight adapter packages, each tested against its framework: LangGraph, LangChain, the OpenAI API and Agents SDK, Google ADK, CrewAI and Pydantic AI. The kernel has zero runtime dependencies and runs on Python 3.9+.
Website: recusal.io, with an interactive demo of the gate.
On PyPI: recusal, with the eight adapter packages, each published under its own name.
Status: Beta (0.x) and in active development, not a finished or certified security
product. The adapters are at different stages of security review, and help is welcome:
project status.
What it does not enforce: Recusal judges the tool calls that reach a gate you have installed. It does not stop an agent that can reach a resource another way: a credential with wider rights, a shell or network path outside the governed session, a file it can write that configures the gate, or the Python environment the hook runs in. Use it as one layer of several: least-privilege credentials for the agent, a sandbox or container, limits on its network egress, Claude Code managed settings for the hook configuration, and an audit anchor the writer cannot reach (the limits in full).
Contents: See it refuse · Works with · Adapters · Status · Install · Policies · MCP · Audit · How it works · CI · Built to be checked · Documentation
New with 0.15.1
- The audit log gives each sink a copy of its own.
AuditLog.appendhanded the same entry to every sink, to its in-memory mirror and to its caller, so a sink that changed it changed what the others held. Each now gets a separate copy, and the file on disk was never affected: the entry.- Releases of all eight adapter packages since 0.15.0, most of them security releases. If you gate one of these frameworks, upgrade its package:
recusal-crewaito 0.2.2,recusal-google-adkto 0.2.1,recusal-langchainto 0.2.0,recusal-langgraphto 0.3.0,recusal-openaito 0.2.2,recusal-openai-agentsto 0.2.1,recusal-openai-agents-mcpto 0.2.0 andrecusal-pydantic-aito 0.2.0: what changed and why.Each adapter is on PyPI under its own name and version. Under
recusal/, 0.15.1 differs from 0.15.0 inrecusal.auditand the version string; the adapters are not part of its wheel. The full list is in the changelog.
pip install recusal
recusal demo
Four scenarios, offline and deterministic: a write to the wrong customer refused before
the tool runs, the shipped deny-list refusing rm -rf and its own uninstall while an
ordinary command defers, a pinned MCP catalog refusing a post-approval rug pull, and a
valid call refused because its delegated authority expired.
recusal demo --list names them; --scenario runs one. (Its exit code is not a
verdict: recusal verdict is the command whose exit code adjudicates.)
The long form, annotated and worth reading, is in the repository:
git clone https://github.com/philpaz/recusal && cd recusal
python examples/claude_refusal.py # a Claude agent stages a write to the WRONG
# customer; the gate refuses before the tool runs
python examples/gallery.py # the same gate across the OWASP agentic failure modes
python examples/mcp_security_demo.py # an approved MCP launch command changes; verification
# refuses BEFORE the substituted command executes
Deterministic and offline: the same normalized evidence and explicit policy inputs, under the same recusal implementation version, produce the same verdict, including the no.
The core is plain Python with no dependencies, so it gates any agent loop that lets you check a tool call before it runs. Each row says how far that is proved today: Tested means a runnable example with its own tests in this repository's CI. Coming links the pull request or claimed issue where the work is happening. Wanted links an open issue nobody has taken yet: comment there to pick it up.
| Runtime | Status | Where |
|---|---|---|
| Claude Code, including MCP tools | Tested | PreToolUse hook, MCP |
| MCP servers: pin approved tools, detect drift | Tested | examples/mcp_governance.py |
| Claude Messages API, manual loop | Tested | examples/claude_refusal.py |
LangGraph ToolNode, sync and async |
Tested | examples/langgraph_gate.py |
| Any Python agent loop | Tested | examples/agent_loop.py |
LangChain create_agent middleware, sync and async |
Tested | examples/langchain_agent_gate.py |
LangChain create_agent audit trail |
Tested | examples/langchain_agent_audit.py |
| OpenAI Agents SDK, function tools | Tested | examples/openai_agents_gate.py |
| OpenAI Agents SDK audit trail, function tools | Tested | examples/openai_agents_audit.py |
| LangGraph audit trail | Tested | examples/langgraph_audit.py |
| LangGraph pause, resume and replay | Tested | examples/langgraph_gate.py across interrupt(), Command(resume=) and checkpoint replay |
| OpenAI Agents SDK, MCP tools, local servers and hosted MCP | Tested | examples/openai_agents_mcp_gate.py |
| OpenAI Agents SDK audit trail, MCP tools | Tested | examples/openai_agents_mcp_audit.py |
| OpenAI Responses and Chat Completions, your own loop | Tested | examples/openai_responses_gate.py |
| OpenAI Responses and Chat Completions audit trail | Tested | examples/openai_responses_audit.py |
Google ADK LlmAgent, callback and plugin |
Tested | examples/google_adk_gate.py |
| Google ADK audit trail | Tested | examples/google_adk_audit.py |
| CrewAI tool-call hooks | Tested | examples/crewai_gate.py |
| CrewAI audit trail | Tested | examples/crewai_audit.py |
Pydantic AI Agent, capability and hook |
Tested | examples/pydantic_ai_gate.py |
| Pydantic AI audit trail | Tested | examples/pydantic_ai_audit.py |
OpenAI Codex CLI, PreToolUse hook |
Coming | #290 |
| LlamaIndex | Wanted | #109 |
xAI documents its Grok API as using the same request formats as OpenAI's, so #81 is also where Grok support will start. Want a runtime that isn't listed? Open an issue.
What no local gate can see. Some tools run on the model provider's servers, such as
hosted web search, a hosted code interpreter or hosted MCP. Those calls never pass
through your code, so neither Recusal nor any other local gate can refuse them. The one
exception is a hosted call the provider asks your code to approve first: the OpenAI Agents
SDK's hosted MCP approval callback is such a point, and
examples/openai_agents_mcp_gate.py gates it, for
the calls that are sent for approval and no others.
The thing that generates the work must never certify it.
Recusal is built the way it asks you to build: the part that decides is kept apart from
the part that does. recusal is the kernel. It holds the verdict, the audit log and the
MCP pinning, and it depends on nothing. Each agent framework gets its own small package
that carries a tool call from that framework's hook to the kernel and carries the answer
back. An adapter has no verdict of its own: it refuses a call it cannot present to the
kernel faithfully, and for every other call the kernel's decision is the decision. The
kernel never imports an adapter.
An arrow means "depends on". No arrow leaves the kernel, so a framework's breaking change is answered by a release of that framework's adapter, not by a release of the kernel.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.