Skip to main content
BlackBadHope
Back to Selected Systems

agent-killswitch

v0.3.1 OS-Level Agent Safety MIT 2026

Mechanical OS process-tree emergency stop, 1-command 5-IDE hook installer, and kernel firewall cutoff — any agent can trip PANIC, only the human owner can restore.

View on GitHub PyPI Package
pip install integrity-killswitch
Verified tests
66 pass
IDE hook targets
5 IDEs
Agent restore exit
exit 3
Runtime deps
0

System Topology

An asymmetric tighten-only OS safety primitive. Any tool or agent can escalate into PANIC, severing hooks and execution gates across 5 coding IDEs, while restoration walks the live OS process ancestry tree and rejects any caller descended from an LLM or agent runtime (exit 3).

5 Coding IDEs Claude · Codex · Cursor Gemini CLI · Antigravity PANIC Asymmetric Gate Tighten-only latch Kernel FW + Hook block OS Ancestry Walk Win32 / POSIX / macOS Python 3.10+ stdlib Agent Ancestor Detected Restore refused · exit 3 Clean Human Shell Owner restore allowed PyPI & MCP Surface 66 passing tests · 0 deps

Constraint & Failure Mode

If an autonomous coding agent enters a destructive loop, it often shares the same terminal privileges used to toggle soft flags. A symmetric switch that an agent can both trip and reset provides zero real containment.

Mechanical Architecture

  • Implements an asymmetric state machine: any process may tighten state to PANIC, immediately tripping hook gates and optional kernel firewall rules.
  • Restore inspects the live OS process tree (Win32 Toolhelp32 / POSIX procfs / macOS libproc) from caller PID up to init/System, rejecting restoration with exit code 3 whenever an agent/IDE runtime appears in ancestry.
  • One-command hook installer wires fail-closed pre-tool hooks across Claude Code, Codex CLI, Cursor, Gemini CLI, and Antigravity without mutating unrelated user config.
  • Exposes a lightweight MCP interface (indexed on Glama) so agents can inspect status or trip PANIC themselves when anomalies occur.

Engineering Trade-Offs

  • Pure Python 3.10+ stdlib with OS-native ctypes/proc probes avoids compiled wheel fragility across Windows, Linux, and macOS.
  • Refusing restoration from any agent-descended shell requires the human owner to open a clean native terminal, intentionally preventing social-engineered self-recovery.