AI Coding Agent Permission Generator

Pick your tool and how much access you want to give it. You get a copy-ready config snippet and launch flag, with links to the official docs. These tools change often, so check against the version you run.

1. Which tool?
2. How much access?

Config file

~/.codex/config.toml

sandbox_mode = "workspace-write"
approval_policy = "on-request"
approvals_reviewer = "user"

Or just for this session

codex --sandbox workspace-write --ask-for-approval on-request -c approvals_reviewer=user

Good to know

This explicit setup permits workspace writes, routes approval requests to you with on-request, and leaves workspace-sandbox network access off by default.

.git, .codex and .agents stay read-only even inside writable roots.

Need one more folder? Use --add-dir, or add writable_roots under [sandbox_workspace_write].

OpenAI says not to mix the newer permission profiles (default_permissions) with the older sandbox_mode keys. The snippets above use sandbox_mode; if you already use profiles, switch to the matching profile from the permissions docs.

Official sources

Verified 2026-11-08 against Codex CLI 0.167.0, the Claude Code docs (referencing up to v2.1.314) and the Gemini CLI docs (updated July 2026). If a format changes, the official docs win.