Run Claude Code & Codex Safely at Work: Secrets, Rules, Admin, Audits
When a company uses Claude Code or Codex, the rules written in AGENTS.md or CLAUDE.md are a “request” to the AI, not a mechanism that enforces them. This article splits the work into four layers (sharing rules, blocking with settings, admin distribution, and visibility) and lays out what to use in Claude Code and in Codex. It covers why Claude Code’s deny rules leave gaps unless combined with the sandbox (WSL2 is required on Windows), how to make deny in a Codex permission profile the default and the old setting that no longer works, where admin-distributed settings live (managed settings for Claude Code, requirements.toml for Codex) and their loopholes, the differences in activity records, use for training, and retention, five rollout steps, and common misconceptions.