Codex is OpenAI's CLI coding agent. ToolShield injects safety guidelines into its global instruction file.
ToolShield appends guidelines to ~/.codex/AGENTS.md, which Codex loads as persistent agent instructions.
toolshield import \
--exp-file postgres-mcp.json \
--agent codexYou can import multiple tools — each appends to the same file:
toolshield import --exp-file terminal-mcp.json --agent codex
toolshield import --exp-file filesystem-mcp.json --agent codextoolshield unload --agent codexThis removes all ToolShield-injected guidelines while preserving your existing AGENTS.md content.
| Platform | Path |
|---|---|
| All | ~/.codex/AGENTS.md |
If your AGENTS.md is in a non-default location:
toolshield import --exp-file <path> --agent codex --source_location /path/to/AGENTS.md