Agent security¶
archvow does not configure your AI agents. It looks at where it runs, and stops when the agent that runs it is not protected: in YOLO mode (it acts without asking anyone), or outside a sandbox (it can write outside the project). The same checks for every tool.
What archvow checks¶
An agent runs archvow itself: archvow next first, archvow check while it codes, the Git hook
when it commits. So archvow runs inside the agent, with the agent's rights, and sees three things
before every command:
| How archvow sees it | When it stops | |
|---|---|---|
| Is an AI agent running me? | a parent process named after the tool (claude, codex, copilot, cursor-agent, junie), or a variable the tool sets only in the terminals where it runs commands (CLAUDECODE, COPILOT_AGENT, CURSOR_AGENT, and the common AGENT / AI_AGENT). Never the editor itself: your own terminal in the editor has the editor as parent too |
- (no agent: a person runs archvow, nothing changes) |
| ARCH051 Is it in a sandbox? | archvow tries to create an empty file in the home folder, outside the project, and deletes it at once - the test Claude Code's own documentation gives. A container counts as a sandbox, and so does an agent started by archvow review (the CI job) |
the project's sandbox answer is yes and the agent can write there |
| ARCH052 Is it in YOLO mode? | the options of its command line that let it act without asking: --dangerously-skip-permissions, --yolo, --allow-all... (the list per tool is below) |
always |
When archvow stops, the command fails before doing anything, the Git hook refuses the commit, and the message names the agent, what is wrong and how to start it protected:
✖ ARCH051 claude-code runs outside a sandbox (it can write in /home/marc, outside the project) - stopped
fix: start Claude Code with its sandbox on (/sandbox; on Windows inside WSL2) and without --dangerously-skip-permissions ...
The agent's instructions (AGENTS.md) tell it to stop too and to tell you. To see what archvow
sees, run archvow doctor - it is never stopped:
[FAIL] AI agent claude-code (process claude) · sandbox: no (it can write in /home/marc, outside the project) · YOLO: no
The architect's choice: sandbox¶
archvow init <package> --force -a sandbox=yes # or no
yes(the default in mode strict): an agent that can write outside the project is stopped.no(the default in modes guided and free): only YOLO mode stops it.- YOLO mode is stopped whatever the answer. There is no variable that switches the checks off.
- Turning the sandbox off is a weakening:
archvow check --basefails until the architects approve it (ARCH020).
When a person commits code an agent wrote (ARCH053)¶
The usual way: the agent writes, you review and commit from your own terminal. Then archvow runs
for a person, not inside the agent. So archvow keeps each agent's last state in
.archvow/agents.local (one line per agent: when, sandbox, YOLO, stopped or not; local, never
committed), and the file header says which agent wrote a file (@assisted claude-code).
At your commit, for every file an agent wrote:
| The agent's last run here | The commit |
|---|---|
| protected | passes; the commit message gets a line Archvow-Agent: claude-code sandbox=yes yolo=no |
| stopped by archvow (ARCH051 or ARCH052) | refused: let the agent run archvow check protected, then commit again |
| never ran archvow here | refused in mode strict, a warning otherwise - ask the agent to run archvow check |
| an agent archvow cannot see (below) | a warning, never a refusal |
In the merge request, archvow check --base (CI) looks at every commit of the branch: a commit
of agent-written code without the Archvow-Agent: line was made without the Git hooks
(git commit --no-verify) and fails in mode strict.
Commands only a person runs (ARCH054)¶
The commands that decide or change the spec - component, decision make, decision add,
decision accept, question remove, assumption accept / reject, hazard, invariant,
rule, column, dependency, brief, specify, freeze, init - are a person's. Run by an
agent archvow sees, they stop before doing anything, whatever the tool's own permissions say:
✖ ARCH054 claude-code ran `archvow decision make`: only a person runs it (it decides or changes the spec) - stopped
fix: give the person the exact command; they run it in their own terminal
The agent still adds a question (question add) or an assumption (assumption add), and in modes
guided and free proposes a decision (decision propose) that a person accepts. Its instructions
(AGENTS.md) tell it to give the commands, with the answers the description or a brief already
gives, in one block for the person to check and run.
Each tool¶
| Tool | How archvow sees it | YOLO options archvow refuses | Its sandbox | Where archvow cannot see it |
|---|---|---|---|---|
| Claude Code | process claude, CLAUDECODE |
--dangerously-skip-permissions, --permission-mode bypassPermissions |
/sandbox (docs); macOS, Linux, WSL2 - not native Windows |
- |
| OpenAI Codex | process codex |
--yolo, --dangerously-bypass-approvals-and-sandbox |
--sandbox workspace-write, its default (docs) |
- |
| GitHub Copilot | process copilot (CLI), COPILOT_AGENT (VS Code agent terminals) |
--yolo, --allow-all, --allow-all-tools |
none in the CLI: run it in a container (docs) | JetBrains IDEs |
| Cursor | process cursor-agent, CURSOR_AGENT |
--force, --yolo |
a run mode with the sandbox, not Run Everything (docs) | - |
| JetBrains Junie | process junie (CLI) |
- (brave mode is set inside the session) | its sandbox, brave mode off (docs) | the IDE plugin |
| JetBrains AI chat, Antigravity, Continue | - | - | - | everywhere: archvow cannot check them |
archvow init and archvow doctor warn about every approved tool archvow cannot see. An agent
running inside JetBrains AI chat (Claude Code or Codex through ACP) is its own process: archvow
sees it. A YOLO mode set inside a session (Cursor's Run Everything, Copilot's /yolo, Junie's
brave mode) leaves no option on the command line; the sandbox test still stops an agent that can
write outside the project.
A company pack adds its own agent, or how archvow recognises it, in a profile (Packs).
Windows: work inside WSL2¶
Claude Code's sandbox runs on macOS, Linux and WSL2, not on native Windows. On Windows, run Claude Code and archvow inside the WSL2 distribution, on a project stored there:
wsl -d bigdata-spark # a terminal in the distribution
cd ~/archvow-projects/<project> # not \\wsl.localhost\bigdata-spark\home\spark\...
claude # then /sandbox
Your editor stays on Windows and opens the project in WSL: VS Code with the WSL extension, or IntelliJ with a WSL project. Codex and Cursor have a sandbox on native Windows too.
What IT locks, and what archvow cannot¶
archvow sees what the agent does, not how it was configured. A developer can change their own settings; only the settings an IT department deploys are locked:
- Claude Code: managed settings, e.g.
"permissions": {"disableBypassPermissionsMode": "disable"}and"sandbox": {"enabled": true, "allowUnsandboxedCommands": false, "failIfUnavailable": true}. - Codex: a managed configuration (it takes precedence over the user's and the command line's).
Logs and dashboards¶
archvow does not collect shell histories (they hold personal data and sometimes secrets). For a
dashboard, use the agents' own OpenTelemetry export (Claude Code: managed or user settings; Codex:
an [otel] block), and archvow's --json outputs in CI (check, next, changes).
Limits¶
- A protection against mistakes and forgetting, not against someone who cheats on purpose: an
agent outside a sandbox could write
.archvow/agents.local, a person could type theArchvow-Agent:line by hand. - An agent that never runs archvow is seen only when its code is committed (ARCH053).
- Code an agent wrote without
@assistedin its file header looks like a person's. - Only the last state counts: code written during an unprotected run, then a protected run of the same agent, then the commit, passes.
- Each tool decides what its sandbox covers (Claude Code's covers the commands it runs, not its own file edits, which ask you first).
- On native Windows archvow reads the names of the parent processes, not their command lines: the YOLO options are not seen there (inside WSL2 they are).
- The network is not tested: it would mean reaching an outside host.