Branchwell

AI Resource Pro / website · airesourcepro.com / content / tutorials / chatgpt / codex-best-practices.mdx

Raw 6.3 KB on 6c7ce85c3441baadd17890ab9cc9bf8ed5112901
1---
2title: "Codex best practices: the official resources"
3description: "OpenAI's own docs, courses, talks and videos on getting good work out of Codex, collected in one place."
4level: Beginner
5minutes: 5
6publishedAt: 2026-10-30
7updatedAt: 2026-10-31
8---
9
10OpenAI builds Codex, and its team already publishes the best guidance on how to use it. Rather than rewrite that, this page points you to it. Everything below is made and kept up to date by OpenAI. We add a one-line summary so you can pick where to start.
11
12Codex changes every few months, so we favor pages OpenAI keeps current over one-off posts. Talks and webinars show their date so you can tell how recent they are.
13
14## The short version
15
16OpenAI's [best-practices guide](https://learn.chatgpt.com/guides/best-practices) asks you to treat Codex less like a one-off assistant and more like a teammate you set up once and improve over time. In practice that means:
17
18- **Write prompts with four parts.** Say the goal, the context Codex needs, the constraints, and what "done" looks like. Use lower reasoning effort for small, well-scoped tasks and higher for debugging or long changes.
19- **Plan before hard tasks.** For anything complex or fuzzy, switch on Plan mode with `/plan` or `Shift`+`Tab`, or ask Codex to interview you about the idea before it writes code.
20- **Move repeated rules into AGENTS.md.** Keep it short: how to build, test and lint, the conventions, and what done means. When Codex makes the same mistake twice, add a line. Our [AGENTS.md guide](/chatgpt/agents-md-codex) shows how.
21- **Let it check its own work.** Ask Codex to write or update tests and run the checks, then review the diff with `/review` before you accept it. Start with the default permissions and loosen them only for repos you trust.
22- **Keep chats focused.** Use one chat per piece of work rather than one for the whole project, which bloats the context and gets worse over time. Turn a prompt you keep reusing into a skill, and only schedule a task once it works reliably by hand.
23
24## Start here
25
26<Resources>
27 <Resource kind="Guide" source="OpenAI" title="Codex best practices" href="https://learn.chatgpt.com/guides/best-practices">
28 OpenAI's own guide to better results across the Codex CLI, IDE extension and app: prompting, planning, AGENTS.md, testing and review, MCP, skills, and common mistakes. If you read one thing, read this.
29 </Resource>
30 <Resource kind="Docs" source="OpenAI" title="Codex documentation" href="https://learn.chatgpt.com/docs">
31 The home of OpenAI's Codex docs, with use cases, setup guides and the latest product updates.
32 </Resource>
33 <Resource kind="Docs" source="OpenAI" title="Codex CLI" href="https://learn.chatgpt.com/docs/codex/cli">
34 Install the CLI, sign in and run your first task in the terminal, with links to the command reference and automation.
35 </Resource>
36 <Resource kind="Docs" source="OpenAI" title="Codex IDE extension" href="https://learn.chatgpt.com/docs/codex/ide">
37 Use Codex in VS Code, Cursor, Windsurf, Xcode or JetBrains, review edits inline, and hand longer tasks to the cloud.
38 </Resource>
39 <Resource kind="Docs" source="OpenAI" title="Codex Cloud" href="https://learn.chatgpt.com/docs/cloud">
40 Run coding tasks remotely: set up a cloud environment, control network access and secrets, and review changes before you open a PR.
41 </Resource>
42</Resources>
43
44## Set up your project
45
46<Resources>
47 <Resource kind="Docs" source="OpenAI" title="Custom instructions with AGENTS.md" href="https://learn.chatgpt.com/docs/agent-configuration/agents-md">
48 How Codex finds and combines AGENTS.md files, from a global file down to per-folder overrides.
49 </Resource>
50 <Resource kind="Docs" source="OpenAI" title="Config basics" href="https://learn.chatgpt.com/docs/config-file/config-basic">
51 Set defaults in config.toml, such as the model, approval prompts and sandbox level, for you or for one project.
52 </Resource>
53 <Resource kind="Docs" source="OpenAI" title="Agent approvals and security" href="https://learn.chatgpt.com/docs/agent-approvals-security">
54 Run Codex safely with sandboxing, approval policies and network controls.
55 </Resource>
56 <Resource kind="Docs" source="OpenAI" title="Build skills" href="https://learn.chatgpt.com/docs/build-skills">
57 Package instructions, resources and scripts as skills that extend Codex, and share them as plugins.
58 </Resource>
59 <Resource kind="Docs" source="OpenAI" title="Model Context Protocol" href="https://learn.chatgpt.com/docs/extend/mcp">
60 Connect Codex to outside tools by adding MCP servers.
61 </Resource>
62</Resources>
63
64## Stay current
65
66<Resources>
67 <Resource kind="Release notes" source="OpenAI" title="ChatGPT and Codex changelog" href="https://learn.chatgpt.com/docs/changelog">
68 Dated release notes for the Codex CLI, the Codex app and ChatGPT.
69 </Resource>
70 <Resource kind="Blog" source="OpenAI" title="Codex posts on the OpenAI Developers blog" href="https://developers.openai.com/blog/topic/codex">
71 OpenAI's developer blog posts about Codex, newest first.
72 </Resource>
73 <Resource kind="Cookbook" source="OpenAI" title="Codex in the OpenAI Cookbook" href="https://developers.openai.com/cookbook/topic/codex">
74 Worked examples for automating developer workflows and building with Codex agents and tools.
75 </Resource>
76</Resources>
77
78## Courses and training
79
80<Resources>
81 <Resource kind="Courses" source="OpenAI Academy" title="Codex on OpenAI Academy" href="https://openai.com/academy/codex/">
82 OpenAI Academy's Codex hub for learning to write code, run tasks and build automated workflows.
83 </Resource>
84 <Resource kind="Webinar" source="OpenAI Academy" date="March 2026" title="Codex Fundamentals" href="https://academy.openai.com/public/clubs/builders-etkn1/videos/codex-for-software-engineers-2026-03-13">
85 A recorded OpenAI Academy webinar on the fundamentals of working with Codex. Free sign-in to watch.
86 </Resource>
87</Resources>
88
89## Talks and videos
90
91<Resources>
92 <Resource kind="Videos" source="OpenAI" title="ChatGPT and Codex videos" href="https://learn.chatgpt.com/videos">
93 OpenAI's library of Codex demos, walkthroughs and talks, grouped by topic.
94 </Resource>
95 <Resource kind="Learning hub" source="OpenAI Developers" title="Learn Codex" href="https://developers.openai.com/learn/codex">
96 OpenAI's Codex learning page, with product videos on the Codex app, code review, JetBrains and building frontends.
97 </Resource>
98</Resources>