This is Part 2 of the Codex CLI series. Today, we’ll learn how to control Codex’s capabilities and make your first safe edits.
This post is about speed with control, not automation for its own sake.
Codex CLI Part 2: Controlling Permissions and Making Safe Edits
Codex CLI is a terminal-based coding agent from [OpenAI][1] that can read, edit, and run commands directly in your local development environment, rather than only suggesting changes like a chatbot. In the last post, we installed Codex CLI and took our first steps with read-only exploration. Today, we go deeper: learning how to control what Codex CLI can do, understanding the essential commands you will use daily, and making your first actual code edits—safely.
Codex CLI’s productive use depends on understanding its control mechanisms. Unlike a chatbot that only gives suggestions, Codex CLI can actually change your files and run commands. That power is valuable, but it requires proper guardrails.
Let me show you how to stay in control while getting real work done.
Codex CLI Security Model: Permissions vs. Approvals
Permissions are the technical boundaries that define what Codex CLI is capable of doing, and approvals are the workflow checkpoints that determine when Codex CLI must pause and ask for your explicit consent. Understanding the distinction between the two is the most important concept before you let Codex CLI make any changes.
At first, permissions and approvals might seem like the same thing, but understanding the distinction helps you think clearly about how Codex CLI operates and how to stay in control.
Permissions vs Approvals: The Conceptual Difference
Permissions: WHAT Codex Can Do
Permissions define the technical boundaries—what Codex is actually capable of doing in your environment:
- Network Access: Can Codex connect to the internet, external APIs, or package registries?
- File Access Scope: Can Codex only read? Edit workspace files? Edit files anywhere on your system?
- Command Execution: Can Codex run shell commands, install packages, or execute scripts?
Think of permissions as the capabilities Codex has been granted. They are the “can it” question.
Approvals: WHEN Codex Must Ask
Approvals determine the workflow control—when Codex needs to pause and get your explicit consent before taking action:
- Should Codex ask before accessing the network?
- Should Codex ask before editing any file?
- Should Codex proceed autonomously within its granted permissions?
Think of approvals as the checkpoints where you maintain control. They are the “must it ask first” question.
Essential Slash Commands
🔒 Subscribe to keep reading.
Making Your First Safe Edit
🔒 Subscribe to keep reading.
Codex CLI Best Practices for Safe, Auditable Edits
🔒 Subscribe to keep reading.
Codex CLI Practice Exercise: The Safe Edit Challenge
🔒 Subscribe to keep reading.
Codex CLI Series Roadmap: What’s Covered in Part 3
🔒 Subscribe to keep reading.
Codex CLI Security Model Summary: Key Takeaways
🔒 Subscribe to keep reading.
Subscribe to unlock the full article ❤️
I keep most of the site completely open. A few unusually detailed tutorials need a free subscriber login so I can keep publishing this kind of work.
Log in to unlock
The form below signs you up for the newsletter. It does not log you into the app — log in afterwards (same email) to unlock this article and download your subscriber gifts. New subscribers get an inbox mail: Set a password to unlock articles.
Full content temporarily unavailable — refresh in a moment