Connectors

Every DefenseClaw connector shares one adapter interface, and each one exposes only the hook, plugin, policy, ACP, telemetry and approval capabilities its agent offers.

A connector is how DefenseClaw guards one coding agent. Hook connectors register with the agent's own hooks or plugin, and the agent keeps talking to its model provider directly. Proxy connectors send the agent's model traffic through the DefenseClaw guardrail proxy.

Connectors are the adapter layer between agent frameworks and DefenseClaw. They share one Go interface, but each connector advertises only the capabilities its agent actually exposes. Proxy routing, lifecycle hooks, subprocess wrapping, telemetry and approval support therefore vary by connector.

Pick yours

AgentTypeCan blockCan ask you firstOS
Claude CodeHookPrompts and tool callsPreToolUseLinux, macOS, Windows
CodexHookPrompts and tool callsNoLinux, macOS, Windows
GitHub Copilot CLIHookTool callsNo: a confirmation blocksLinux, macOS, Windows
CursorHookPrompts and tool callsNoLinux, macOS, Windows
DevinHookPrompts and tool callsNoLinux, macOS, Windows
AntigravityHookPreToolUsePreToolUseLinux, macOS, Windows
KiroHookTool calls; prompts in Kiro IDENoLinux, macOS, Windows
OpenCodePluginTool callsNoLinux, macOS, Windows
AmpPluginTool calls and resultstool.call, tool.resultLinux, macOS, Windows
HermesHookpre_tool_callNoLinux, macOS, Windows
OpenClawProxyRequests, responses, tool callsbefore_tool_callLinux, macOS
ZeptoClawProxyRequests, responses, tool callsNoLinux, macOS

Where an agent cannot ask, a confirm verdict becomes an alert with the original action kept; Copilot CLI blocks it instead. You can review it in audit or the TUI, but you cannot resume the call. The capability matrix has the full per-connector detail, and Human approval has the per-event matrix.

Claude Cowork, the agent mode of Claude Desktop, runs through the Claude Code connector's hooks. It is not a connector of its own. See Claude Cowork.

One gateway can serve several hook connectors, each with its own posture under guardrail.connectors.<name>. Choose Add, not Replace, when you run a second setup <connector>. Proxy connectors own the traffic plane and cannot be combined this way. See Multi-connector.

Platform support

What each OS supports, and what live tests verified. Switch to Enterprise for the managed edition. The support matrix adds features by edition.

AI coding agents by operating system, open-source edition
AgentLinuxx86_64, arm64macOSApple siliconWindowsx64Min versionlowest tested
Claude CodeNative hooks
Supported
Supported
Supported
2.1.154
CodexNative hooks
Supported
Supported
Supported
0.124.0
GitHub Copilot CLINative hooks
Supported
Supported
Supported
1.0.18
CursorNative hooks
Supported
Supported
Supported
2.4.0
DevinNative hooks
Supported
Supported
Supported
3000.4.25
AntigravityNative hooks
Supported
Supported
Supported
1.1.8
KiroNative hooks
Supported
Supported
Supported
kiro-cli 2.27.1; Kiro IDE 1.0.182
OpenCodePlugin
Supported
Supported
Supported
2.0.0
AmpPolicy plugin
Supported
Supported
Supported
0.0.1785334225
HermesNative hooks
Supported
Supported
Supported
0.19.0
Version and platform notes
Claude Code
Windows: Native executable hooks. WSL is outside the native contract.
Codex
Windows: System PowerShell bridge to the packaged hook executable.
GitHub Copilot CLI
Windows: Uses Copilot CLI's PowerShell hook field.
Cursor
Cursor Desktop 2.4.0 up to 4.0.0. The Cursor Agent CLI is covered only at the reviewed build 2026.07.23-e383d2b. Windows: Managed PowerShell adapter.
Devin
Reviewed Devin CLI 3000.4.25 on every OS and 3000.11.3 on Linux; newer builds run as untested newer versions. Windows: Devin's own hook runner starts the protected hook executable directly; no PowerShell bridge.
Antigravity
Windows: Packaged PowerShell hook launcher.
Kiro
Below 2.27.1, kiro-cli has non-interactive --v3 runs that load no hooks, and an IDE before 1.0.182 cannot read global hooks. Per-user and managed setup refuse an older kiro-cli or an older IDE, in every guardrail mode, when no supported Kiro form is installed beside it. A Kiro form whose version could not be read is unknown and not protected: action setup refuses it unless a supported form is installed, and doctor and managed status report it. Managed status reports a below-floor product as uncovered and verify fails. Earlier managed CLI enrollments keep their interactive hooks across upgrade until updated. A supported Kiro IDE can be enrolled beside an older CLI.
OpenCode
V2-only contract covers 2.0.0 up to 2.3.0. Version 2.2.5 was checked live on Linux, macOS and native Windows in per-user and managed installs; 2.2.3 and 2.2.4 were checked on selected platforms. Newer V2 minors are untested; V1 and unversioned git builds are refused.
Amp
Windows: Owner-only TypeScript plugin in the user plugin directory.
Hermes
Contract covers 0.19.0 up to 0.22.0. Before 0.21.1 the TUI (hermes --tui) and dashboard chat run tools without the hooks; setup and doctor warn. Windows: Hermes' own terminal tool needs its bundled Git Bash.

OpenClaw and ZeptoClaw need the guardrail proxy, which native Windows does not host.

OpenShell sandbox

defenseclaw sandbox run <harness> runs a coding agent in an NVIDIA OpenShell sandbox. The sandbox guide has setup and every command.

OpenClaw and ZeptoClaw do not run in a sandbox.

How a connector is structured

Every connector implements one Go interface, defined in internal/gateway/connector/connector.go. Each connector reports only the capabilities its agent offers, so proxy routing, hooks, subprocess wrapping, telemetry and approval support differ per agent. Use the capability matrix to compare them and the hook contracts page for supported agent versions.

MethodRunsPurpose
Name, DescriptionAlwaysIdentify the connector.
ToolInspectionMode, SubprocessPolicyAlwaysReport how tool calls are inspected and whether setup installs PATH shims.
SetupWhen an agent is wired inBack up the agent config and add DefenseClaw's hooks, plugin or provider entries.
TeardownWhen an agent is taken outRestore the config, or remove only DefenseClaw's entries.
VerifyCleanAfter Teardown, and before another connector's SetupFail with a list of leftover hooks, env files, config patches or shims.
AuthenticateOn each requestAccept or refuse the caller.
RouteOn each proxied LLM requestRead the request signals the proxy needs.
SetCredentialsAt gateway bootGive the connector the gateway token and master key.

Two optional interfaces cover the rest. HookEndpoint lets a connector declare its hook route, for example /api/v1/codex/hook, which the gateway's API server registers when it starts. NotifyEndpoint does the same for an auxiliary notify bridge. Cursor and the other hook-only connectors share hook_only.go. Other connectors have a file of their own, such as claudecode.go, codex.go and devin.go.

on removal
then
Wire the agent inSetup backs up the configand adds the hooks
Take it outTeardown restores the config
Check it is cleanVerifyClean finds no leftovers

List view for small screens. Use the expand button to open the drawing.

  1. 1.Wire the agent inSetup backs up the configand adds the hooks
    • on removalTake it out
  2. 2.Take it outTeardown restores the config
    • thenCheck it is clean
  3. 3.Check it is cleanVerifyClean finds no leftovers
When a connector is installed or removed. The gateway and the enterprise installer call Setup. The connector commands, switching connectors and uninstalling call Teardown, and VerifyClean then checks for leftovers.
proxied
accepted
AgentLLM request
Check the callerAuthenticate
Read the requestRoute

List view for small screens. Use the expand button to open the drawing.

  1. AgentLLM request
    • proxiedCheck the caller
  2. Check the callerAuthenticate
    • acceptedRead the request
  3. Read the requestRoute
On every LLM request through the guardrail proxy. Authenticate accepts the gateway token (X-DC-Auth), the master key (Authorization: Bearer), or a loopback caller when no gateway token is set. Route reads the upstream, model, API key, stream flag and headers.

Hook and proxy paths

Hook connectorProxy connector
Data pathThe agent talks to its upstream directly.The agent's model calls go through the guardrail proxy (port 4000 by default).
EnforcementOnly the events the selected hook contract declares as blocking.Request and response policy in the proxy, plus tool-call checks.
Several at onceYes, each with its own posture under guardrail.connectors.<name>.No. A proxy connector owns the traffic plane.
OSLinux, macOS, WindowsLinux, macOS

Next

  • Hook contracts: supported agent versions per connector.
  • Upgrade: connectors that were renamed or removed.