# Codex playbooks

OpenAI's coding agent. It runs as an open-source CLI, an IDE extension, inside the ChatGPT desktop app, and as Codex Cloud, which works on GitHub repos in its own cloud workspace. Developers use it to explore code, build features, fix bugs and review pull requests.

- Vendor: OpenAI
- Kind: coding-agent
- Surfaces: terminal, ide, desktop, web, mobile, slack
- Connects: Add MCP servers with codex mcp add or in ~/.codex/config.toml. The CLI, IDE extension and desktop app share that setup. Skills are folders with a SKILL.md file in .agents/skills or ~/.agents/skills. Plugins bundle skills and MCP servers. Browser and Computer Use run in the ChatGPT desktop app.

- Docs: https://learn.chatgpt.com/codex/cli

## Good at

- Editing a local repository and running commands with the tools already on your machine
- Running cloud tasks in parallel that end in a diff and a pull request you review
- Scripted and CI runs with codex exec
- Steering local or cloud tasks from the ChatGPT mobile app

## Limits

- The built-in browser works in the ChatGPT desktop app and web, not in the Codex CLI or IDE extension
- Usage limits depend on your ChatGPT plan, and an API key does not cover cloud features such as GitHub code review or Slack
- Cloud tasks only see what the environment setup installs, so a weak setup means weak test runs

## Playbooks (12)

- [Build a personal knowledge base wiki that a coding agent maintains from your notes](https://agentshandbook.com/p/build-a-personal-knowledge-base-wiki-from-your-notes.md): You have a folder of interlinked markdown pages with an index and a change log, built from your sources, that you can read in Obsidian and query through the agent, with every change reviewable in git.
 (trust: corroborated, risk: low)
- [Map an unfamiliar codebase into a checked architecture document before you change it](https://agentshandbook.com/p/map-an-unfamiliar-codebase-before-you-change-it.md): You have a docs/architecture.md that names the entry points, modules and data flow with file references, a list of open questions, and a short instruction file with the build and test commands.
 (trust: corroborated, risk: low)
- [Map your internal links, fix orphan pages and point each topic cluster at one hub page](https://agentshandbook.com/p/fix-internal-links-and-orphan-pages.md): Every important page gets links from related pages, orphan pages are linked or removed, and each topic has one hub page. (trust: corroborated, risk: low)
- [Move pages that rank on page two of Google onto page one with Search Console data](https://agentshandbook.com/p/move-pages-from-page-two-onto-page-one.md): A short list of pages close to page one, each with changes you approved and a date to check the result. (trust: corroborated, risk: low)
- [Rewrite title tags and meta descriptions for pages that get impressions but few clicks](https://agentshandbook.com/p/rewrite-titles-for-pages-with-low-click-rates.md): Your weakest pages get titles and descriptions that match the queries people type, and you have a dated log to measure the change. (trust: corroborated, risk: low)
- [Run a technical SEO audit of your site and fix what stops Google from crawling it](https://agentshandbook.com/p/run-a-technical-seo-audit-of-your-site.md): You get a ranked list of crawl and index problems, the file that causes each one, and fixes that you reviewed and deployed. (trust: corroborated, risk: medium)
- [Run a weekly SEO agent that checks your site and opens fixes for you to review](https://agentshandbook.com/p/run-a-weekly-seo-agent-that-proposes-fixes.md): Each week you get a short report with numbers and their sources, and one or more pull requests that fix real SEO problems on your site. (trust: corroborated, risk: medium)
- [Sort a messy Downloads or photos folder without losing a single file](https://agentshandbook.com/p/sort-a-messy-downloads-folder.md): Your folder is sorted into a small set of named subfolders, nothing is deleted, and you have a log of every move that you can reverse. (trust: corroborated, risk: high)
- [Test your local web app in a real browser and fix console errors in one loop](https://agentshandbook.com/p/test-local-web-app-in-browser-and-fix-console-errors.md): You get a table of the console errors and failed requests on each route you named, a small fix for each one, and proof from a reload that the error is gone.
 (trust: corroborated, risk: low)
- [Triage a production error from Sentry or logs into a tested fix pull request](https://agentshandbook.com/p/triage-production-error-into-a-fix-pr.md): You get a short root cause note backed by the stack trace and code, a failing test that reproduces the error, a small fix that makes it pass, and a local branch ready for your review.
 (trust: corroborated, risk: medium)
- [Turn small tracker issues into reviewed pull requests with cloud coding agents](https://agentshandbook.com/p/turn-issues-into-pull-requests-with-cloud-agents.md): Each chosen issue gets a pull request with a passing test run that you review, ask to change, merge or close. You stay in control of every merge.
 (trust: corroborated, risk: medium)
- [Upgrade a framework across a repo with a coding agent and the test suite as the gate](https://agentshandbook.com/p/upgrade-a-framework-across-a-repo-with-tests-as-the-gate.md): The repo runs on the new version on a branch of small commits, the full test suite passes with no tests removed, and you have a list of behaviour changes to check in staging.
 (trust: corroborated, risk: medium)

## Lessons

- [Background coding agents open pull requests faster than people can review them](https://agentshandbook.com/lessons/background-agent-prs-overwhelm-reviewers.md)
- [Coding agents write code for old library versions or invent APIs](https://agentshandbook.com/lessons/coding-agents-use-outdated-library-apis.md)
- [Coding agents change, skip or misreport tests to reach a green run](https://agentshandbook.com/lessons/coding-agents-weaken-tests-to-pass.md)
