Prepare · Aesthetary Original

Steer a coding agent with plan mode and Esc

You'll be able to run a Claude Code or Codex session that plans before it changes anything, and stop it when it goes wrong.

3 min video · captions on

In this skill

First, find out who approves what.

Just ask
  • Fix one typo
  • Rename a heading
  • A change you can say in a line
Plan first
  • Touches several files
  • You are unsure how
  • Anything could be deleted
Reading a plan (fictional bakery)
1Plan: add an order page
2
31. Create order.html, the order page
42. Add "Order ahead" to the menu
53. Replace the contact form with an order form

Know which mode you're in, and read the plan before you approve it.

1 more scene is in the video and the transcript.

The mechanics, from the source

These come from the organizations that make the tools. They teach how the tool works; the skill above is about when and why to use it.

  • Official resource · Anthropic · Claude CodeOfficial documentation · Documentation

    Quickstart

    Docs · 6 min read

    Installing Claude Code, signing in, a first session and a first edit.

  • Official resource · Anthropic · Claude CodeOfficial documentation · Documentation

    Choose a permission mode

    Docs · Long reference

    Every permission mode, including auto and plan, and how to switch with Shift+Tab.

  • Official resource · OpenAI · CodexOfficial documentation · Documentation

    Codex CLI

    Docs · 5 min read

    Installing the Codex CLI, signing in, a first prompt, and setting permissions.

  • Official resource · OpenAI · CodexOfficial documentation · Documentation

    Agent approvals & security

    Docs · 18 min read

    Codex sandbox modes and approval policies, and the safe defaults for a git repo.

Transcript

An agent that can edit your files and run commands will happily do both for twenty minutes in the wrong direction. Keep the decisions yours.

Start every session by checking whether your agent asks before it acts, or acts and tells you afterward. Most agents have a setting for this, and some don't ask by default. Know which one you're in before you hand it anything big.

When should you ask for a plan first? If you could describe the change in one sentence, just ask. Fix this typo. Rename this heading. But if it touches several pages, or you aren't sure how it should be done, or anything might be deleted or moved, ask for the plan first, and read it before anything changes.

Here's a plan for the bakery site, from the day the agent drafted the order page. Read it as a list of decisions, because that's what it is. Steps one, two and five are what I asked for. Step three replaces the contact form, and I never asked for that. Step four deletes the wholesale page, because the agent thinks nobody uses it. Those two lines are decisions dressed up as tasks, and they aren't the agent's to make. So send the plan back, and say exactly what to leave alone. The revised plan has three steps, and every one of them is yours.

When it asks permission to run something, read the request the same way. What's the command? Which path does it touch? Is that path inside this project? Did I ask for this? This one deletes a folder outside the project, and nothing you asked for needs that. Say no, and ask for a plan instead.

If you can see it heading the wrong way, stop it, mid-turn, and redirect it. But stopping isn't undoing. The three files it changed before you stopped it are still changed. Undoing is what your save point is for, and that's the next lesson.

The last decision is when to throw the session away. Every session carries everything said in it, including the wrong turns. Start fresh when you move to an unrelated task. Start fresh when you've corrected it twice on the same thing and it's still wrong, because by then the conversation is full of failed attempts. And once a plan is agreed and saved to a file, a fresh session can build from the file with nothing else in its way.

Know which mode you're in, and read the plan before you approve it.