Agents and features
Which agents can run as Agent Substrate actors, how each runs unattended, and how each DefenseClaw feature compares with the host and OpenShell sandboxes.
Short answer
- Ten command-line agents are built to run in an actor. An actor is a Linux container, and DefenseClaw reuses the harness images it builds for OpenShell. The kit in the image sends hooks to the cluster gateway instead of a local one. How far each agent has been proven differs; the table below says.
- Desktop and IDE apps can't. An actor has no screen, so the Claude desktop app, Cowork, and the Cursor, Kiro and Antigravity editors keep their host connectors. Their command-line versions can run in an actor.
- The checks are the same. The same hooks, rules, guardrails, scans and asks apply.
- The surroundings are not. There's no live folder and nothing on your machine is reachable. In return you get suspend and resume, any laptop OS, model traffic that always passes the guardrail proxy, and unattended runs.
Agents
| Agent | Headless (run --task) | Model route | In an actor today |
|---|---|---|---|
| Claude Code | claude -p | DefenseClaw gateway | Supported. Interactive and headless, on a real model, from macOS and Linux laptops. Windows laptops are Preview |
| Codex | codex exec | DefenseClaw gateway (/llm/bedrock/openai or /llm/openai) | Hooks, headless and interactive work in an actor, on a real model. Model route: GPT-5.6 Luna on Bedrock (us.openai.gpt-5.6-luna) through the gateway's Bedrock OpenAI-compatible route, or OpenAI with a key in defenseclaw-llm. template build --provider bedrock or openai picks one |
| GitHub Copilot CLI | copilot -p | DefenseClaw gateway (/llm/bedrock/openai) | Hooks and a real model work in an actor. Model route: Bedrock only, through the gateway's OpenAI-compatible route |
| Hermes | hermes chat -q | DefenseClaw gateway | Same as Copilot CLI |
| OpenCode | opencode run | DefenseClaw gateway | Same as Copilot CLI. defenseclaw substrate run opencode starts it: its plugin sends its hook events through the actor kit |
| Kiro CLI | kiro-cli chat --no-interactive | Vendor sign-in only | Preview. Hooks, tamper checks and refusals work. Model access: it needs a vendor sign-in or KIRO_API_KEY |
| Antigravity CLI | agy -p | Vendor sign-in only | Preview. Hooks, tamper checks and refusals work. Model access: it needs a vendor sign-in or GEMINI_API_KEY |
| Cursor Agent CLI | cursor-agent -p | Vendor key (CURSOR_API_KEY) | Preview. The hook path works. Model access: a vendor key or sign-in. run starts it, with the sign-in rules below |
| Amp | amp -x | Vendor key (AMP_API_KEY) | Works against its API on a key, but can't run: it speaks WebSocket only, which Substrate's egress refuses (see below). run starts it in open source, with that note and the sign-in warning |
| Devin CLI | devin -p | Vendor sign-in only | Preview. The hook path works. Model access: a vendor key or sign-in. run starts it, with the sign-in rules below |
| OpenClaw, ZeptoClaw | No | No | Not in this release |
| Claude desktop and Cowork, Cursor, Kiro and Antigravity editors, Copilot in VS Code | No | No | Desktop apps need a screen |
Supported means a person can drive the agent in a real terminal, or a headless task runs, with DefenseClaw's hooks firing and a real model answering through the gateway. Only Claude Code is started through the launcher; the others run through the kit and a gateway. Preview means the hooks work, but the agent needs a vendor key or sign-in for a model.
defenseclaw substrate run starts all ten agents. For Amp it first prints that Amp's WebSocket connections are not passed through yet, so it may not reach its model. Cursor, Kiro, Antigravity, Devin and Amp follow the sign-in rules below.
Each connector has a headless command; a connector that cannot run one is interactive only, and run --task says so. The full command lines the relay runs are:
| Agent | Command |
|---|---|
| Claude Code | claude -p {prompt} --output-format stream-json --verbose --dangerously-skip-permissions |
| Codex | codex exec --skip-git-repo-check -c sandbox_mode="danger-full-access" -c approval_policy="never" {prompt} |
| OpenCode | opencode run {prompt} |
| Copilot CLI | copilot -p {prompt} --allow-all-tools |
| Hermes | hermes chat -q {prompt} -Q --yolo --accept-hooks |
| Kiro CLI | kiro-cli-chat chat --v2 --agent defenseclaw --no-interactive --trust-all-tools {prompt} |
| Antigravity CLI | agy -p {prompt} --dangerously-skip-permissions |
| Cursor Agent CLI | cursor-agent -p {prompt} --force --trust |
| Amp | amp -x {prompt} |
| Devin CLI | devin --permission-mode dangerous --respect-workspace-trust false -p {prompt} |
The "skip permissions" flags only silence the agent's own prompts, because a headless run has nobody to answer them. DefenseClaw's hooks still decide every tool call, and a hook deny holds even under --yolo.
Images. template build --connector NAME builds the image for any of the ten agents (claudecode, codex, opencode, copilot, hermes, kiro, antigravity, cursor, amp, devin) and refuses any other name. An agent needs its kit image before it can run.
Model replies. OpenAI-style models on Bedrock (Codex, OpenCode, Copilot CLI, Hermes) get prompt inspection and the model allowlist. The proxy does not yet inspect the tool calls in the model's reply; the hook stops them when they run. See the threat model.
Vendor sign-in
Substrate's egress gateway can add an API key or token to an agent's requests, so the agent never holds it. That covers API keys (Anthropic, OpenAI, Bedrock, AMP_API_KEY, CURSOR_API_KEY, KIRO_API_KEY, GEMINI_API_KEY). Subscription sign-ins that open a browser and refresh their own tokens, such as a Claude or ChatGPT plan login or devin auth login, put tokens in the actor's snapshots.
| Open source | Managed enterprise | |
|---|---|---|
| Claude Code, Codex, OpenCode, Copilot CLI, Hermes | Model through the DefenseClaw gateway; no sign-in in the actor | Same |
| Cursor, Kiro, Antigravity | Starts with a warning that the sign-in token will sit in the actor and its snapshots | Starts only when its key is bound as a Substrate secret; otherwise refused at create |
| Devin | Starts with the warning. Devin has no API key route | Refused at create |
| Amp | Starts with warnings | Refused even with a key: Amp rewrites its config folder at every start, so DefenseClaw's hook registration cannot be made root-owned |
Where the warning shows. The launcher prints it when it creates the actor. While you are attached it stays on the bottom line, the launcher's own row, which the agent cannot draw on, so a full-screen agent such as Antigravity can't clear it (asks take that row while one is waiting). The launcher prints it again when you detach or the agent exits. With --no-asks, or when the launcher's output is not a terminal, there is no bottom line: the warning is printed at create and after the attachment, and the relay also writes it at the top of the agent's terminal, where an agent that clears the screen erases it.
A managed refusal comes back before any actor exists, as 403 with the reason subscription_signin_refused (or agent_hook_tamper_refused for Amp), and the launcher shows the message. Binding a key is an admin task: add the secret to substrate.secrets with the key's environment variable as its placeholder (see Secrets).
Amp and WebSockets. Amp's thread and user connections are HTTP/1.1 WebSockets. Substrate 1.0.0's egress answers that upgrade with 403 on an inspected rule. Listing ampcode.com in substrate.allow_passthrough_for lets the upgrade through, but that host is then not inspected and no key is injected there, so Amp's key would sit in the actor. A managed install refuses that. See Troubleshooting.
Features
| Feature | On your machine | OpenShell sandbox | Agent Substrate |
|---|---|---|---|
| Tool-call checks (hooks) | Yes | Yes | Yes, same rules and messages |
| Tool chains and intent | Per session | Per session | Per session and per actor, kept across suspend and resume |
| Model request and reply guardrails | Through the guardrail proxy, where the connector routes to it | The model call goes to the provider directly | Always, for the agents that route through the gateway, because the provider is only reachable through the proxy |
| Routing, budgets and cost | Where the proxy is used | Where the proxy is used | Not merged yet. See Feature coverage |
| Network control | Not isolated | Egress proxy, block and allow lists, asks | Denied by default; DefenseClaw writes each agent's allow list and checks each request; asks |
| Secrets | In the user's environment | Placeholder key in the sandbox | No secret value in the actor; the egress gateway swaps placeholders on bound hosts only |
| Asks and approvals | In the agent | In the activity feed and approvals | In your terminal session and approvals, so you can answer after detaching |
| Unattended runs | n/a | n/a | --task, --batch, from CI |
| Your project | In place | Live (Linux, Docker) or copy | Copy or git clone only |
| Undo | No | Undo point, or pull from a copy | Restore points of the agent's folder (checkpoint, undo), and pull |
| Your local MCP servers | Yes | Imported (Claude Code, Codex) | No. Only MCP servers in the image or reachable over the network |
| Ports on your machine | Yes | --host-port, after approval | No |
| Process tree, kernel feed | Host feeds | Linux | No. Substrate reports CPU and memory per agent |
| Interactive terminal | Yes | Yes, over SSH | Yes, through the launcher and the terminal relay in the kit |
| Leave and come back | n/a | Stop and connect on the same machine | Suspends when idle; resume from any machine in under a second |
| Many agents at once | Limited by the machine | Limited by the machine | Limited by the cluster |
| Laptop OS | All | Linux, Apple-silicon Mac | All, including Windows and Intel Macs |
| Several people on one host | Yes | One account per host | Yes, each agent isolated |
| Identity | OS user | OS user | Company sign-in for the person; each agent's identity is signed by Substrate |
The interactive terminal
Substrate doesn't attach a terminal to an actor the way ssh or docker exec does. It forwards HTTP to the actor and streams its logs. So the DefenseClaw kit in the image carries a small relay that carries the agent's terminal over that HTTP path (a WebSocket, with a long-poll fallback for proxies that block WebSockets), and run and connect speak to it. Press Ctrl-] to detach.
The relay needs no inbound port on your laptop, and your laptop needs no access to Substrate's router. The launcher connects to the cluster gateway's admin address, which checks that you own the actor and carries the connection to the actor's relay. An administrator sees every person's agents in list --all and can delete them, but can't connect to, run a command in or get a session for another person's agent (403 not_your_agent); every such attempt is audited as the person who made it. The relay still requires a short-lived token for the actor's own person and that actor, and refuses a token that names anyone else, so an unauthenticated connection gets nothing.
Unattended and long-running runs
Run coding agents without a terminal attached - one task, a batch from a file, or a job in CI - and what DefenseClaw does differently when nobody is there to answer.
Feature coverage
How each DefenseClaw feature works when agents run as Agent Substrate actors - guardrails, routing, tool chains, policies, skill and MCP scanning, AI discovery, segmentation, secrets, asks, identity and observability.