# Master 97% of Codex in 1 Hour (full course) <!-- ref: @content/youtube/nate-herk/2026-05-05-master-codex-in-one-hour-full-course version: 3 updated_at: 2026-10-31T18:23:03.505Z --> From Nate Herk | AI Automation, 2026-05-05: Codex is not a chat window with file access; it is a local agent that lives in a directory and can read, write, run, browse, and schedule. *Synthesized from Nate Herk on Nate Herk | AI Automation, 2026-05-05.* Nate Herk teaches AI automation and runs a full end-to-end Codex build — API connection, skill, dashboard, deployment, and scheduled automation — while comparing Codex against Claude Code throughout. ## Core Thesis Codex is not a chat window with file access; it is a local agent that lives in a directory and can read, write, run, browse, and schedule. Nate's argument is that Codex and Claude Code are different harnesses over different models with genuinely different strengths, so the right frame is per-task selection rather than allegiance. He demonstrates by building a YouTube comment intelligence system from an empty folder to a live Vercel URL refreshing itself weekly, and the recurring lesson is that neither skills nor automations work on the first attempt — they are things you improve by using them. ## Key Insights - **The harness/model split.** Claude Code runs Opus, Sonnet, and Haiku natively; Codex runs the ChatGPT models. Nate finds Claude better at exploratory thinking, brainstorming, and planning, and Codex better at pragmatic execution — following a plan as it grows longer, and troubleshooting failures Claude gets stuck on. He runs both. - **Everything is just files and folders.** Because a project is a directory, any harness — Codex, Claude Code, Cursor, OpenClaw — can work in it, provided instructions exist describing what lives where. Migrating a Claude Code project to Codex is mostly renaming `CLAUDE.md` to `AGENTS.md`; Nate says asking Codex to do the conversion takes about 30 seconds. - **`AGENTS.md` is Codex's onboarding doc**, read at the start of every new chat: who the user is, what the project's goal is, product direction. Knowledge that lives only in a chat window does not survive into the next session — writing it to a file is what persists it. But Nate warns against dumping everything into `AGENTS.md` as a project grows, because a bloated file burns tokens on every turn. - **Model and reasoning selection is a budget decision.** Codex exposes model (GPT-5.5, 5.4, others), speed (standard/fast), and intelligence (low/medium/high/extra-high). Nate defaults to **medium** for planning and brainstorming, escalates to **high** for large builds, and reserves **extra-high** for bugs nothing else solves — noting extra-high tends to over-engineer simple tasks and costs the most against the limit. He avoids "fast" entirely because it eats usage faster. Limits reset on a **5-hour session** window and a weekly window, both visible under settings → rate limits remaining. - **Scheduled automations silently default to the wrong model.** Nate's weekly automation was set to **GPT-5.2** by default and ran over 20 minutes; re-triggered on **GPT-5.5 high** it completed in about 7. Check the model, reasoning, and settings on every automation you create. - **Permissions have three tiers**: default (prompts constantly), auto-review, and full access (no approval requests). Nate recommends staying on default while learning a workflow and moving to full access once the flow is trustworthy, so you stop babysitting. He attributes agent horror stories to context rot and vague instructions rather than to autonomy itself. - **Plan mode first, always.** Codex plans without executing, asks clarifying questions, and lets you redirect before any work happens — Nate steered it off a reused API key toward a fresh one purely at the plan stage. - **There is no YouTube plugin**, so Nate had Codex research the connection path itself, choosing API key over OAuth. Setup: Google Cloud project, enable **YouTube Data API v3**, create a restricted API key, paste it into `.env.local`. The leading dot is what keeps the file out of public commits. - **Treat failures as golden knowledge.** When PowerShell's web request hit a local TLS issue (Node and Python connected cleanly), Nate immediately had Codex write that finding into project memory so the same dead end never recurs. - **A skill is a repeatable recipe** — a markdown file with a name, a description of when to invoke, and ordered steps. Nate builds them by reverse engineering: get an output you like, then say "turn that into a skill." Skills can be **global** (in the Codex directory, usable across every project) or **local** to one project, and you switch by simply asking. Invoke by slash command or by natural language. - **The dashboard build used GPT Image 2** for logo and UI concepts before layout, with assets stored in-project for reuse. Codex ran a built-in verification loop — automated browser check, then a visual pass that caught three issues, fix, rebuild, re-verify with screenshots. - **Browser use as a QA harness.** Nate asked Codex to open the dashboard, click everything, and try to break it; it surfaced **six** defects including dead YouTube links, a bare empty state, overly literal search, and a purely cosmetic active-tab state. He recommends baking "don't return until you've stress-tested with browser use" into skills. Browser use also covers automations with no API and authenticated sites, since it retains cookies and logins. - **Deployment chain: Codex → GitHub → Vercel.** GitHub holds the repo; Vercel auto-deploys on every commit to it. Three tools, one place to manage. Local changes stay local until you push, which is what keeps test separate from production. - **The automation is a local cron.** Close the Codex app or shut the machine off and it stops. True 24/7 needs a cloud runner — Nate names Claude's cloud routines as the comparison point. - **Interrupt long runs.** A 20-minute stall traced to an Excel file Nate had left open — a fix a human solves in seconds. Watching an unrefined automation and stopping it early saves both time and session budget. - **"Dark code"** is his term for the vibe-coded logic you shipped without understanding. You don't need every line, but you need to know fundamentally what it does and where guardrails belong. He closes the loop by asking Codex to audit its own automation, which came back recommending a repo script and dropping the full build step for weekly refreshes. - Smaller interface notes: a **side chat** answers off-topic questions without interrupting the main run (comparable to Claude Code's subagent split); `/personality` toggles friendly vs pragmatic (concise, task-focused, direct — Nate's default); the **pet** in the corner reports what Codex is working on while you're in another app; a context-fill bar sits at the bottom and Codex auto-compacts. ## Actionable Takeaways 1. Start every Codex project by having it write an `AGENTS.md`: who you are, the project goal, the product direction. Keep it lean as the project grows — long onboarding files cost tokens on every session. 2. Give exact file paths rather than letting the agent search your disk. Nate demonstrates the search working, then flags it as a poor use of tokens. 3. Default to **medium** reasoning. Escalate to high for big builds; treat extra-high as a debugging tool, not a default. Skip "fast" unless the work is genuinely time-critical. 4. Audit every scheduled automation's model and reasoning settings after creation — the default may be an older model and will quietly cost you minutes and tokens per run. 5. Put API keys in `.env.local`, never a plainly named secrets file; the dot prefix is what excludes it from commits. 6. Every time the agent hits a failure, immediately ask it to record the cause in project memory. That habit is the difference between a system that gets smarter and one where you repeat yourself. 7. Build skills by reverse engineering a good output, not by writing a spec first. Then after each use, tell it what worked and what didn't and have it revise the skill file. 8. Wire QA into the skill itself: instruct the agent to browser-test and visually verify before it ever reports back to you. 9. Ship with GitHub plus Vercel so a commit is the deploy. Iterate on localhost, push only what you approve, and production stays untouched until you say so. 10. Stop a run that is taking obviously too long and ask why — the blocker is often something trivial on your end, and letting it grind burns session limit. 11. After an automation works, ask the agent to critique it for streamlining and robustness. You don't need to know the optimization yourself. ## Notable Quotes > "In my mind, it's always about which tool is best for this specific use case, not which tool is best." — Nate Herk > "Whenever you run into a failure, you want to treat that as golden knowledge." — Nate Herk > "A skill is basically a repeatable recipe." — Nate Herk > "You're not going to just chuck a kid on a bike and say, okay, go have fun." — Nate Herk --- *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).*