Subchapter 40.2
references/codex-network.mdMarkdown2 KBView on GitHub
This file is for the fallback CLI mode only. Read it only after the user explicitly asks to use scripts/image_gen.py.
This guidance is intentionally isolated from SKILL.md because it can vary by environment and may become stale. Prefer the defaults in your environment when in doubt.
The fallback CLI uses the OpenAI Image API, so it needs outbound network access. In many Codex setups, network access is disabled by default and/or the approval policy requires confirmation before networked commands run.
--ask-for-approval never suppresses approval prompts.workspace-write, network access still depends on your Codex configuration (for example [sandbox_workspace_write] network_access = true).If you trust the repo and want fewer prompts, use a configuration or profile that both:
Example ~/.codex/config.toml pattern:
approval_policy = "on-request"
sandbox_mode = "workspace-write"
[sandbox_workspace_write]
network_access = trueIf you want quieter automation after network is enabled, you can choose a stricter approval policy, but do that intentionally and with care.
Enabling network and reducing approvals lowers friction, but increases risk if you run untrusted code or work in an untrusted repository.