Lesson 3 of 8 · 15 min · Checked on 6 October 2026
Your first task: plan, diff and permissions
By the end of this lesson you will be able to:
- Put the agent in a mode where it asks permission, and start with the plan
- Read the plan and the diff before you accept each action
- Accept or refuse actions one by one and open the result in the browser
- Recognise the “do not ask” options and leave them alone
Mr Manuel has a bakery on the street below and has never had a page on the Internet. You are going to make him one, just for fun, with a made-up name, opening hours and address. It is the first real task with an agent, and the page is not what matters: the habit is. Plan first, diff next, and only then yes.
This is how it looks on 6 October 2026; your screen may differ. Look for the button with the same name.
The request
You will write this to the agent, but not yet. First, the right mode.
Create a simple HTML page for the bakery on my street, with a made-up name, opening hours and address. One file only, index.html, no external libraries. Before you create anything, show me the plan.
Step 1: the right mode
Open the terminal, go into the folder and check where you are:
cd experiencias
pwd
Claude Code. Open it like this:
claude --permission-mode manual
Below the text box you should see ⏸ manual mode on: the agent asks permission before editing files or running commands. This matters because recent versions start in auto mode, where a second model approves actions for you. To learn, you want it to be you. Then press Shift + Tab until ⏸ plan mode on appears (or start your message with /plan). Now paste the request.
Codex. Open it with codex. Type /permissions and choose Read Only: it can read and run commands that change nothing, but it must ask you before changing files. (Auto is something else: it edits and runs commands inside the folder without asking.) Then type /plan, press Enter and paste the request.
Sources: Claude Code permission modes, Codex approvals and security and Codex commands.
Tip
Always check with pwd that you are in experiencias before you open the agent. The agent works in the folder where you open it, and it is very easy to open it in the wrong one.
Step 2: read the plan
The agent reads the (empty) folder and answers with a plan. A good plan for this says, more or less:
- it will create one file,
index.html; - what it will put in it: name, opening hours, address, a bit of colour;
- that it will not download anything or touch anything outside the folder.
If the plan mentions several files, installing things or libraries, tell it what you want to change. In Claude Code choose No, keep planning and write the correction; in Codex just reply in the conversation.
When the plan is good:
- Claude Code: choose Yes, manually approve edits. Do not choose the option that mentions auto mode.
- Codex: if it asks whether to put the plan into practice, say yes; if it does not ask, type “You can go ahead with the plan.” It stays in Read Only, so it must ask you before saving.
Tip
Also write in the request what you do not want: “one file only”, “no external libraries”, “do not touch anything else”. The agent keeps to clear limits better than it guesses your tastes.
Step 3: the diff before you accept
Now the agent wants to create index.html and asks your permission. Claude Code shows you what it will write. In Codex, the request may not show the whole file: before you accept, ask “Show me the full contents of the file first”. Because the file is new, every line appears with a + (lesson 0/03). Before you say yes, look at:
- the name, the opening hours and the address (made up, as you asked);
- lines that fetch things from other sites, such as
<script src="https://…">; - the name and the place of the file:
index.html, insideexperiencias.
Accept or refuse each action. If it asks to run a command you do not understand, refuse and ask what it does. If it asks to open the browser, you can refuse and open it yourself.
In Codex, if the folder is in Git (lesson 1/05), the /diff command then shows everything that changed at once.
Watch out
While you are learning, do not accept the “do not ask” options, not even inside experiencias: a folder for experiments does not make this safe. They are options such as “Yes, and use auto mode” or the accept edits mode in Claude Code, and Auto in /permissions in Codex. Worse still, --yolo or bypassPermissions remove all the protections and are only for isolated environments, such as a virtual machine (lesson 1/06). In a folder with the accounts, the family photos or a client's website, a mistake is real, and it does not ask permission to happen.
Step 4: see the result
Open the page in the browser. Double-click index.html in the file explorer, or, in the terminal, inside experiencias:
- Windows:
start index.html - Mac:
open index.html - Linux:
xdg-open index.html
A small change
Now ask for a change:
Change Saturday's opening hours to 7:00–13:00. Do not touch anything else.
This time the diff has lines with − (the old hours) and with + (the new ones). If more lines appear than the Saturday ones, refuse and ask why.
Tip
Refusing is normal and offends nobody. When you refuse, say why in one sentence (“I do not want outside scripts”): the agent uses that on the next attempt.
Exercise
How I know it worked the plan mentions one file only; the first diff has only + lines; the folder now has index.html; the browser shows a page with a made-up name, opening hours and address; the second diff shows only the Saturday line going out and coming in.
If it didn't work
- The agent created the file without showing a plan or asking permission: it was in another mode. In Claude Code, look at what it says below the text box; in Codex, type
/permissions. Deleteindex.htmland repeat. - The browser shows the code instead of the page: the file does not end in
.html. Turn on file extensions (lesson 0/02) and check the name. - The file ended up in another folder: you opened the agent outside
experiencias. Leave it, runcd experiencias, check withpwdand open it again. - Codex says it cannot write and does not ask permission: type
/permissions, choose Read Only again and repeat the request. Do not switch to Auto to get round it. If it persists, ask it for the file's contents in the conversation and save them yourself in an editor, asindex.html.
Videos
In the specified section: running Claude Code, integrating it with VS Code, creating a project and the execution modes.
An official Anthropic video on the explore, plan, code and commit workflow, with success criteria and a review before pushing.
Test what you learned
Corrections to this lesson (1)
- : After an external review: Codex Read Only mode is now described as «asks before changing files», not as a preview of every edit; the Codex and Claude Code paths are separated; the «If it did not work» box no longer tells you to switch to Auto; sources became named links. Quiz options were reordered.