# Working with an AI agent

> An AI agent is an AI tool that writes and changes your code when you ask in plain words. Working with one means asking clearly, planning before it builds and checking its work. Claude Code, Codex and Cursor all work this way.

Web page: https://buildladder.com/concepts/working-with-an-ai-agent

## Do I need it?

**Do I need an AI tool to build without learning to code?** Yes. Your AI tool writes the code, so you don’t have to. What you learn instead is how to work with it: ask clearly, plan first and check each change.

- If you’ve never built software: Learn six words first: folder, file, prompt, agent, diff and commit. Each one links to the Glossary.
- If you already write code: Skip to the table that compares Claude Code, Codex and Cursor. Each tool page lists its buttons for planning, permissions and undo.

## What’s the fastest way to add it?

**What’s the fastest way to start working with an AI tool?** Set up one AI tool on the page “Set up your AI tool”, open your product’s folder in it, and paste the prompt below. The prompt tells it how you want to work together.

- If your AI tool is already set up: Paste the prompt, then follow your tool’s steps on its tool page: an instructions file, a permission mode, a plan and a check.
- If you’re not sure how to ask for something: Describe the result, not the steps. Say what done looks like, like “a contact form that emails me”. Name the page or file if you know it.

Prompt to copy:

```text
I’m learning to build software with you. Please work like this in this folder:
- Explain things in plain words. Define any hard word the first time you use it.
- Before you change anything, show me your plan as a short list and wait for my yes.
- Make one small change at a time. After each one, tell me how to check it worked.
- Ask me before you install anything, delete anything, or change files outside this folder.
- Never ask me to paste a password or secret key into this chat.
- If you’re not sure what I mean, ask me instead of guessing.

Start by reading the files here. Tell me in two or three sentences what you see. Don’t change anything yet.
```

## Which one?

**Claude Code, Codex or Cursor: which AI tool fits me?** It comes down to where you want to work and whether you want to start for free. All three read your folder, write code, plan first when you ask and show you each change.

- If you’ve heard of GitHub Copilot: It works inside code editors such as VS Code. It has its own page in Resources.

- Claude Code: Pick Claude Code if you already pay for Claude Pro or higher, or you want a chat window with no code editor. Steps: https://buildladder.com/tools/claude-code.md
- Codex: Pick Codex if you want to start for $0, or you already use ChatGPT. Steps: https://buildladder.com/tools/codex.md
- Cursor: Pick Cursor if you want to see every file as it changes, or you’ve used VS Code before. Steps: https://buildladder.com/tools/cursor.md

|  | Claude Code | Codex | Cursor |
| --- | --- | --- | --- |
| Where it runs | The Code tab in the Claude desktop app, or a terminal. | The ChatGPT desktop app, a terminal or a code editor. | Its own code editor, or a terminal. |
| Planning first | Choose Plan in the mode selector. It writes a plan and edits nothing until you approve. | Type /plan in the message box. It suggests an approach before editing. | Press Shift+Tab in the chat box, or choose Plan in the mode picker. |
| How it asks first | Permission modes. Manual asks before every edit. Auto runs a safety check on risky steps instead. | Permission modes. Ask for approval works in your folder and asks before going outside it. | Run Modes. Auto-review, the default, uses a sandbox when it can and checks the rest. |
| Checking changes | Click Changes to see every edited line. Type /code-review for a second look. | The review pane shows each change. Type /review for a second look. | The diff view shows changes as they happen. Click Review, then Find Issues. |
| Undoing a change | Ask it to undo, or type /rewind in a terminal session. Git covers the rest. | Click Revert all, or revert one file, in the review pane. It needs Git. | Click Restore Checkpoint on an earlier message to put your files back. |
| Instructions file | CLAUDE.md in your product’s folder. | AGENTS.md in your product’s folder. | AGENTS.md, or rules in the .cursor/rules folder. |

## Free or paid?

**Are Claude Code, Codex and Cursor free?** Codex and Cursor each have a free way in. Claude Code needs a paid Claude plan.

- If you want to try before you pay: Start with Codex or Cursor. Your code stays in your folder, so you can switch tools later.
- If you already pay for Claude or ChatGPT: Claude Pro includes Claude Code, and every ChatGPT plan includes Codex.
- If you hit a usage limit: Wait for it to reset, or move up a plan.

|  | Claude Code | Codex | Cursor |
| --- | --- | --- | --- |
| Free way in | No. Claude’s free plan doesn’t include Claude Code. | Yes, in the ChatGPT desktop app. It’s still rolling out. | Yes. The Free plan has limited agent requests. |
| Paid plans | Pro is $20 a month, or $17 a month paid yearly. Max is from $100 a month. | Go is $8 a month and Plus is $20 a month. Pro is from $100 a month. | Plus is $8 a month and Premium is $30 a month. Claude, GPT and Gemini models need Premium. |

## What changes when you grow?

**What changes about working with an AI tool as my product grows?** There’s more for your AI tool to read, so short instructions and small tasks matter more. Each change can also break something older, so checking matters more too.

- If it keeps making the same mistake: Add one short line about it to your instructions file. Keep the file short, because your AI tool reads all of it every time.
- If a chat gets long and your AI tool loses track: Start a new chat for each new task. Your instructions file and PLAN.md carry over, so it doesn’t start from nothing.
- If new changes break older features: Ask your AI tool to add tests and run them after every change. A failing test tells it something broke before you find out.
- If you want it to ask you less often: Use Auto in Claude Code, Approve for me in Codex, or Auto-review in Cursor. Keep saving versions with Git.

## How does it work underneath?

**How does an AI tool like Claude Code work underneath?** Your AI tool sends your message and parts of your files to an AI model on the company’s computers. The model picks the next action, like reading a file or running a command. The tool does it on your computer and repeats until the task is done.

- If it asks for permission: Each action runs on your computer, with your files. Your permission mode decides which actions need your yes.
- If it reads a file or page that gives it orders: That’s prompt injection. It’s why careful modes ask before risky steps. Be extra careful with code you downloaded from strangers.
- If it forgets things between chats: The model only sees the current chat, plus your instructions file.

## Sources

Updated 2026-11-10.

- [GitHub Copilot in code editors](https://github.com/features/copilot)
- [Claude Code: Best practices](https://code.claude.com/docs/en/best-practices)
- [Claude Code: Permission modes](https://code.claude.com/docs/en/permission-modes)
- [Claude Code: Checkpointing](https://code.claude.com/docs/en/checkpointing)
- [Claude Code: Desktop app](https://code.claude.com/docs/en/desktop)
- [Claude pricing](https://claude.com/pricing)
- [Codex: Permission modes](https://learn.chatgpt.com/codex/permission-modes)
- [Codex: Prompting](https://learn.chatgpt.com/codex/prompting)
- [Codex: Code review](https://learn.chatgpt.com/codex/code-review)
- [Codex: AGENTS.md](https://learn.chatgpt.com/codex/agent-configuration/agents-md)
- [Codex pricing](https://learn.chatgpt.com/codex/pricing)
- [Cursor: Plan Mode](https://cursor.com/docs/agent/modes)
- [Cursor: Checkpoints](https://cursor.com/docs/agent/chat/checkpoints)
- [Cursor: Rules and AGENTS.md](https://cursor.com/docs/context/rules)
- [Cursor: Run Modes](https://cursor.com/docs/agent/security/run-modes)
- [Cursor pricing](https://cursor.com/pricing)
- [Stack Overflow Developer Survey 2025: AI](https://survey.stackoverflow.co/2025/ai)
- [Stack Overflow Developer Survey 2025: Technology](https://survey.stackoverflow.co/2025/technology)
- [npm: @openai/codex downloads](https://www.npmjs.com/package/@openai/codex)
- [npm: @anthropic-ai/claude-code downloads](https://www.npmjs.com/package/@anthropic-ai/claude-code)
