Observed since 20 Oct, 23:31 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Approve or deny your AI coding agent's risky commands from your phone, with an audit trail. Works with Claude Code and OpenAI Codex.
A guardrail layer for autonomous coding agents. Agentsward classifies the risk of every shell command and file edit your AI coding agent attempts, routes the risky ones to your phone for approval, and — critically — denies by default when no one responds. Every decision is logged.
Not a remote-control app. Anthropic's Remote Control already lets you drive a Claude session from your phone. Agentsward is the policy layer underneath: it decides what an agent is allowed to do, enforces protected files unconditionally, fails safe, and is built to gate any agent — not just one vendor's.
Native permission prompts (and Remote Control's mirrored version of them) ask "allow this?" with no risk model, no protected-file enforcement, and no fail-safe: ignore the prompt and nothing is denied. Agentsward adds the missing governance layer:
| Native prompt / Remote Control | Agentsward | |
|---|---|---|
| Risk classification | — | CRITICAL → LOW, defaults to "ask" |
Protected files (.env, CI, lockfiles, .claude/) | — | Always re-affirm, bypass auto-allow |
| No-response behavior | nothing denied | default-deny (fail-safe timeout) |
| Phone-set guards / auto-rules | — | yes |
| Audit trail | — | every classify/approve/deny logged |
A PreToolUse hook intercepts the agent's tool call, a classifier scores it, and:
pip install agentsward # the CLI command is `agentsward`
agentsward setup # one step: pair phone + wire every installed agent
agentsward setup (or agentsward install) auto-detects and wires Claude Code, OpenAI Codex, and Google Gemini CLI — whichever are installed. To target one explicitly:
agentsward install --claude # Claude Code (or install-hooks / --global for all projects)
agentsward install --codex # OpenAI Codex (or install-codex-hooks)
agentsward install --gemini # Google Gemini CLI (or install-gemini-hooks)
agentsward install --all # every supported agent
Then restart the agent you wired — Claude Code (or run /hooks), Codex, or Gemini (in auto-accept/YOLO so the phone is the sole gate). It's idempotent and leaves any other hooks in place.
Agentsward is transport-agnostic — the gate is the product, the channel is a detail:
agentsward init # bot token + chat id
agentsward pair # link this machine to the phone app
Quick manual test (no agent needed):
agentsward approve-command "git push origin main" # exits 0 (allow) / 1 (deny)
agentsward mode)| Mode | Who approves | Use when |
|---|---|---|
phone (default) | Only your phone. The local popup is suppressed — the hook tells Claude Code allow/deny directly, so work continues the instant you tap. | You're away, or don't want anyone at the keyboard approving for you. |
laptop | Only the local prompt. No phone notifications; the hook steps aside. | You're at the desk and don't want phone pings. |
agentsward mode laptop takes effect immediately (read at runtime).
install-hooks wires the gating + notification hooks with the correct local path filled in.
The gating hook looks like:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{ "type": "command", "command": "agentsward hook --timeout 1800", "timeout": 1800 }
]
}
]
}
}
--timeout must be ≤ the outer "timeout", or Claude
Code kills the hook before your phone can respond. install-hooks keeps them matched.agentsward logs -n 20 # activity timeline
agentsward pending # is a command awaiting me, or did it stop?
agentsward resume # lift a Stop kill-switch
agentsward instructions # show instructions sent from the phone
All state lives in ~/.agentsward/: config.json, approvals.json, instructions.json,
audit_log.json.
Proprietary. See LICENSE.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.5.1 | 9 Aug 2026 | 4 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 23:31 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:cf7c29a2be890a5c4f51a10409fa74b53f8edd2cdb34417f89243c7394144069