OpenCode is wrapped with one command:
agentvault run -- opencodeEverything OpenCode does through its shell flows through the shim layer; its HTTP traffic flows through the egress proxy (both configured by the supervisor's child environment).
If your opencode.json configures MCP servers, wrap them so their
tools/call traffic is policy-checked:
The proxy inherits AGENTVAULT_SOCK (unix) / AGENTVAULT_ADDR+AGENTVAULT_TOKEN
(Windows) from the supervised environment. Started outside a supervised
session, tools/call fails closed.
rules:
- name: protect-credentials
match: {action: [fs.read, fs.write, fs.delete], path: ["~/.ssh/**", "~/.aws/**"]}
effect: deny
- name: git-push-ask
match:
action: [shell.exec]
cel: 'event.cmd == "git" && event.argv.size() > 1 && event.argv[1] == "push"'
effect: require_approval
{ "mcp": { "filesystem": { "type": "local", "command": [ "agentvault", "mcp", "proxy", "--server", "filesystem", "--", "npx", "-y", "@modelcontextprotocol/server-filesystem", "." ], "enabled": true } } }