# CODEX FULL COURSE: From Zero to Deployed App (2026)
<!--
ref: @content/youtube/david-ondrej/2026-04-11-codex-full-course-zero-to-deployed-app
version: 3
updated_at: 2026-10-31T19:04:26.464Z
-->

David Ondrej (2026-04-11): David Ondrej's claim is that Codex is the most persistent coding agent available — it runs longer, handles deeper errors, and makes fewer mistakes on complex applications than Claude Code — and that the barrier to using it is two terminal commands, not a computer science degree.

*Synthesized from David Ondrej on David Ondrej, 2026-04-11.*

David Ondrej has logged over a thousand hours coding with AI and built Vectal, an AI startup he sold for $1.8 million, largely with Codex.

## Core Thesis

David Ondrej's claim is that Codex is the most persistent coding agent available — it runs longer, handles deeper errors, and makes fewer mistakes on complex applications than Claude Code — and that the barrier to using it is two terminal commands, not a computer science degree. He walks the full loop from install to a live Vercel URL in a single session, and argues throughout that treating Codex as merely a coding tool is the central mistake: the same agent does market research, chooses your hosting platform, and walks you through deployment.

## Key Insights

- There are four distinct ways to run Codex, and they share state. The CLI, the IDE extension (over 3 million installs), the Codex desktop app, and cloud agents all read the same sessions, so a conversation started in the terminal can be resumed in the app.
- Sign-in works with a ChatGPT subscription, including the $8/month Go tier; Plus is $20 and Pro now starts at $100 rather than only $200. The alternatives are a device code (only useful if another device is signed in) or an API key.
- Model and reasoning effort are the two settings that matter most. Ondrej's guidance: always the newest model (GPT 5.4 at recording), never a mini model; never use low reasoning effort; medium is a sensible default that conserves limits; high is his usual setting because it costs five seconds on simple edits but can run for minutes when needed; extra-high is reserved for deep bugs you have already failed to fix and for risky whole-backend refactors.
- `/fast` roughly doubles inference speed at the cost of faster limit consumption — he leaves it permanently on with a Pro plan.
- Where you launch the agent is a real decision. Running Codex from the machine root is right for chores like cleaning a Downloads folder; for building software, `cd` into a per-project folder first. He argues saving projects to the desktop is an amateur habit worth breaking. The only terminal commands needed are `ls`, `cd`, `cd ..`, and `pwd`.
- The first file in any project should be `AGENTS.md`, the cross-tool system prompt convention followed by over 60,000 open-source projects and by every major agent except Claude Code, which uses CLAUDE.md — including Gemini CLI, Cursor, Warp, Kilo Code, Aider, Windsurf, RooCode, and Factory.
- Wrap any large paste in XML tags. Ondrej names this as a context-engineering trick that lets the agent see where the pasted block starts and ends.
- Image input is the most underused feature. He attaches a screenshot on roughly every other prompt — reference layouts, error states, deployment settings screens he's unsure about — and notes the paste shortcut inside the CLI is Ctrl+V even on macOS, where Cmd+V does not work.
- Web search is built into Codex and separate from deep research. He uses it for current documentation and obscure frameworks; when he needed the exact OpenRouter request format for a model, he ran a real deep-research pass elsewhere, saved the 520-line output to a `/docs` markdown file, then tagged that file into the prompt — which is what actually fixed the bug.
- His prompt-engineering position, delivered as the midwit curve: beginners are too vague for the agent to know what they want, the middle spends fifteen minutes per prompt with elaborate purchased templates, and the top writes concise, unambiguous prompts and refines by iterating.
- Codex runs the dev server inside itself as a background terminal, so it sees the logs, can kill it, and can restart it. He points out he was debugging badly by checking a server the agent could not observe, then moved the screenshot to the agent that owned the terminal.
- The permission model has two independent layers. Sandbox mode: workspace-write (default — writes only in the project folder, no network, no other directories), read-only (what plan mode uses), and danger-full-access. Approval policy: untrusted (asks before every action), on-request (default — free inside the sandbox, asks to go beyond), never, and granular per-category. `--full-auto` loosens it partway; `--yolo` maxes both layers.
- `/plan` puts Codex in read-only plan mode where it interviews you about scope before writing anything — his recommendation for starting a project or a large refactor when you don't yet have a clear picture.
- The Codex desktop app (macOS and Windows; not Linux) gives each parallel thread its own git worktree, so a front-end agent and a back-end agent work simultaneously without conflicting. It also carries a diff editor, thread pinning, and an "open in VS Code / Cursor" button that acknowledges it is not a full IDE.
- Skills in the app are invoked with `$` and are shared across CLI, extension, and app. Built-ins include image-gen, OpenAI docs, plugin-creator, and skill-creator; Ondrej singles out the Playwright skill as the one everyone should install because it lets the agent click through the front end and verify buttons actually work. New skills install via the skill-installer skill or by pointing it at a GitHub repo.
- App automations are effectively cron jobs with a prompt — pick worktree or local, project, and cadence. Ondrej reports they are considerably more reliable than Open Claw's cron jobs and points at non-coding uses: documentation updates, turning changelogs into articles, lead scraping.
- Sub-agents dispatch to faster models (GPT 5.4 mini) for mechanical work like adding header comments across a codebase, without blocking the main thread.
- Cursor's own agent is worth keeping alongside Codex because it is model-agnostic. Ondrej's working setup is Opus 4.6 in the sidebar as an advisor — Anthropic models are better at explaining — with GPT 5.4 Codex agents in the CLI on high or extra-high doing the long builds. He notes Cursor warns that fast mode there is six times the cost of regular mode.

## Actionable Takeaways

1. Install with OpenAI's one-line command, run `codex`, take the update prompt, and if the installer fails check `node -v` — a missing Node.js is the usual cause.
2. Run `/model`, pick the newest model and high reasoning effort, then `/fast` if your plan can absorb it.
3. `cd` into a dedicated project folder before launching, and answer yes to the trust-this-directory prompt only on your own machine.
4. Have Codex create `AGENTS.md` as step one, seeded with project name, target user, and your skill level. Update it as decisions get made — Ondrej repeatedly tells the agent to save answers back into both `AGENTS.md` and `README.md`.
5. Learn four slash commands: `/resume` reopens a past session, `/new` or `/clear` starts fresh (worth doing when the current context is full of noise), `/plan` toggles read-only planning, `/fast` toggles speed.
6. Run `codex --yolo` for real work. The equivalent on Claude Code is `--dangerously-skip-permissions`. Ondrej's caveat is that git is what makes this safe.
7. Initialize git immediately — before you think the project deserves it — and commit every 10 to 15 minutes. Git is version control by Linus Torvalds and works entirely locally; GitHub is a separate hosting product.
8. Generate a `.gitignore` before pushing, keep secrets in `.env.local`, and set a spending limit (he used $20) on every API key you create.
9. For image generation via OpenRouter, the Nano Banana 2 slug is `gemini-3.1-flash-image-preview` — Google's fast image-editing model, cheaper and faster than Nano Banana Pro. One OpenRouter key covers every model.
10. Make parallel API calls independent and modular. Ondrej's app initially waited on the slowest generation and failed as a batch; he refactored so each variation is its own call, streaming in one at a time, so one failure doesn't take down the rest.
11. Ask the agent which hosting platform fits your stack, then follow its own instructions. He cross-checked GPT 5.4 and Opus 4.6 — both picked Vercel for a Next.js app — and deployment from GitHub took about 20 seconds. Remember to add environment variables in the platform's project settings.
12. Use `Cmd+J` for the integrated terminal in Cursor or VS Code (an agent launched there is already in the right folder), `Cmd+P` to jump to a file by name, `Cmd+B` and `Cmd+I` to collapse the sidebars, and rename terminal tabs when running multiple agents.
13. Reduce technical debt by asking a conversational model to explain the last three commits in plain terms — understanding what was fixed, not just that it was fixed.

## Notable Quotes

> "All of the people who achieve stuff with AI agents use them in YOLO mode." — David Ondrej

> "With AI you can be as stupid sounding as possible. No prompt is too dumb." — David Ondrej

> "You should be doing a commit every 10 to 15 minutes on average." — David Ondrej

> "Technical debt is a term when you're building something faster than understanding it." — David Ondrej

---

*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*

*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*