The Complete Codex Guide: From Beginner to Pro with the All-in-One AI Assistant

A complete guide to OpenAI Codex, the AI agent that codes, creates docs, and controls your computer.
OpenAI Codex has evolved from a coding tool into an all-in-one AI agent capable of writing code, generating Office documents, and operating browsers and computers. This guide walks through its four versions, permission modes, models, skills and plugins, memory system, automation, work environments, and six best practices for getting the most out of it.
From AI Coding Tool to All-in-One Assistant
OpenAI's Codex is often mistaken for a simple AI coding tool, but it has long evolved into an AI Agent capable of autonomously executing tasks. It can not only write code, but also create PowerPoint presentations, generate Excel spreadsheets, write Word reports, operate browsers, and even produce videos.
What is an AI Agent? AI Agents represent the core evolutionary direction of current large model applications. Unlike traditional Q&A-style AI, Agents possess a closed-loop capability of "perception-planning-action": perceiving the environment (reading files, taking screenshots, retrieving web content), formulating multi-step plans (breaking down complex goals into executable subtasks), and calling tools to complete actions (writing files, running code, operating browsers). The key breakthrough of this paradigm lies in the "Tool Use / Function Calling" capability, which allows large models to interact with external systems rather than merely generating text within the chat window.
Technical Background: The Evolutionary Roots of the Agent Paradigm The rise of the Agent architecture stems from the fundamental shift of large models from "single-turn dialogue" to "multi-step reasoning + tool calling." Around 2023, as OpenAI introduced Function Calling and Anthropic released the Tool Use specification, the industry formally established the technical standards for Agents: models no longer merely output text, but output structured "action instructions," with an external execution engine responsible for calling APIs, operating file systems, or controlling browsers. The ReAct (Reasoning + Acting) framework further validated that the "think-act-observe" loop can significantly improve completion rates for complex tasks. Codex was initially released in 2021 as a code completion model, built on a code-fine-tuned version of GPT-3, and integrated into GitHub Copilot. Later, as GPT-4's tool-calling capabilities matured, Codex completed its transformation from a "code completer" to an "all-in-one Agent." It's worth noting that the essence of Function Calling is to have the model output structured parameters conforming to a predefined JSON Schema, which external code then parses to call real APIs—this design standardizes and makes pluggable the integration of AI with any third-party service, laying the technical foundation for the entire current Agent ecosystem.
After OpenAI deeply integrated Codex technology into the GPT-4 series, its Agent capabilities took a qualitative leap.
To understand the essential difference between Codex and ChatGPT, consider a home renovation analogy: ChatGPT is like a consultant—you send it a photo of your kitchen, and it tells you the stove should move left and the cabinets should be cream-white. It sounds well-reasoned, but it won't lift a finger. Codex is more like a construction foreman—it measures the dimensions, draws the blueprints, moves the stove, applies the paint, and takes photos for your inspection when done.
More importantly, Codex can directly open folders on your computer, create files, run programs, search the internet, and operate browsers. After making changes, it can automatically commit to code repositories and deploy them online. This is precisely why it's called an Agent (an AI that can actually get work done) rather than a Q&A bot.
Four Versions and Account Setup
Codex offers four ways to use it: CLI command line, VS Code plugin, desktop client, and web version. All four versions have identical performance and mostly overlapping features, but considering overall ease of use, comprehensiveness of features, and beginner-friendliness, the desktop client is the top choice.
Technical positioning of each version: The CLI (Command Line Interface) version is a professional tool for developers, calling the Codex API directly through the terminal, suitable for integration into CI/CD automation pipelines or scripting projects. CI/CD (Continuous Integration/Continuous Deployment) is a core practice of modern software engineering—each code commit automatically triggers build, test, and deployment pipelines, minimizing manual intervention. GitHub Actions, GitLab CI, and Jenkins are mainstream platforms, and the Codex CLI is exactly the key link embedded into this workflow, for example automatically analyzing potential bugs in a PR during the code review stage, or automatically generating changelogs before deployment. The VS Code plugin version is deeply embedded into Microsoft's mainstream development environment, capable of sensing editor context in real time, highlighting suggested lines, and inlining code completions. The common limitation of both is a relatively high barrier for non-technical users. The value of the desktop client lies precisely in packaging these underlying capabilities into a graphical interface, enabling non-developers to drive an equally powerful AI engine—essentially a concrete realization of technology democratization.
Before use, you need a ChatGPT account, and it's recommended to subscribe to Plus or Pro membership. Although free accounts can now also use Codex, the quota is extremely limited. Plus users can send 30 to 150 messages every 5 hours, which is sufficient for a normal day; heavy or team users are advised to choose Pro.
Compared to the similar tool Claude Code, one major advantage of Codex is its more generous quota, more frequent resets, and looser restrictions on accounts. There are two login methods:
- ChatGPT account login: Directly uses your subscription quota, gives you access to the most powerful models first, and fully unlocks advanced features like cloud tasks.
- API Key login: Models update slowly, cloud tasks are unavailable, and it's pay-as-you-go—running large tasks might burn through tens of yuan quickly.
Overall, subscribing directly to Plus and logging in with a ChatGPT account is the most cost-effective solution.
Interface Structure and Core Concepts
After logging in, the left sidebar of the main interface contains four function buttons: New Chat, Search, Plugins, and Automation. In the center are two key lists: "Projects" and "Conversations."
The distinction between the two is crucial: Conversations are similar to the web version of ChatGPT, suitable for scattered tasks like searching for information, writing copy, or translating. Projects correspond to a folder on your computer, where all generated files (PPT, Excel, code) are saved for unified management. Simply put, a project is a large folder, and conversations are the working threads within that folder—a single project can have multiple parallel conversations.

In the input box, you can describe your requirements directly in natural language. Typing @ lets you select plugins or specify files as context, and typing $ triggers a specific skill. The plus sign in the bottom-left corner is for uploading files. In addition, there's an important Plan Mode—when enabled, Codex only discusses plans with you without actually modifying files, executing only after the plan is confirmed.
The design philosophy of Plan Mode stems from the "design first, then implement" best practice in software engineering, and also echoes the "Chain-of-Thought" methodology in Prompt Engineering. Chain-of-Thought was formally quantified and validated by Google Brain researcher Jason Wei and others in the 2022 paper Chain-of-Thought Prompting Elicits Reasoning in Large Language Models: when prompts include step-by-step reasoning examples, model accuracy on complex reasoning tasks can improve by 2 to 8 times. Subsequent research further developed "zero-shot chain-of-thought" (adding "let's think step by step" at the end of prompts), as well as the implicit reasoning mechanisms built into OpenAI's o1/o3 series—these models perform extensive "draft-style" reasoning steps internally before generating final answers, invisible to users but significantly improving accuracy on math, coding, and logical reasoning tasks. Plan Mode makes this "think it through before acting" mindset explicit, serving as an "intent alignment" safety valve: AI explicitly presents its understanding, allowing humans to spot misunderstandings and correct them before files are actually modified, avoiding wasted operations and quota due to ambiguous requirement descriptions.
Three Permission Modes
Since Codex can directly modify files and run commands, it has three tiers of permissions:
- Default permission: The safest—it can only operate within the project folder, and networking, running terminal commands, etc. all require your consent. Suitable for beginners.
- Auto-review: Codex evaluates the risk of operations itself, automatically approving safe operations and only asking when there's risk—essentially like having an internal approval officer.
- Full access: The highest permission—it can do anything without asking, offering maximum efficiency but with some risk.
Beginners are advised to use default permission in the first week, try auto-review in the second week, and only consider full access once very familiar with the tool and the project has Git backups.
Models and Thinking Intensity
In the bottom-right corner of the input box, you can switch models and thinking intensity. It's recommended to use the most powerful GPT-5.5 by default, and use the mini version for simple tasks to save quota. Thinking intensity has four levels: low, medium, high, and ultra-high. The low level is fastest but error-prone, the medium level is balanced and suitable for daily use, and the ultra-high level is slowest but smartest, suitable for tricky bugs or large-scale refactoring. The "ultra-high" level essentially corresponds to OpenAI's o-series extended reasoning mode—the model executes extensive internal reasoning tokens before answering. This "slow thinking" mode draws on the concept of "System 2 thinking" from cognitive science (in Thinking, Fast and Slow, Daniel Kahneman divides human cognition into fast, intuitive System 1 and slow, rational System 2), which also explains why this mode consumes more quota but achieves higher accuracy. There are also two speed options: standard and fast, with fast mode being about 1.5x the speed of standard mode but consuming more quota.
Queuing, Interrupting, and Multitasking
The desktop version has three high-frequency operations worth mastering:
Task queuing: While Codex is executing Task A, you can directly send a new message, and it will queue after A, automatically starting B once A is complete.
Task interruption: If you want the currently executing task to immediately consider a new requirement (for example, changing to an iOS-style UI before the website is even finished), click the "Steer" button next to the message, and the requirement will be injected directly into the current task rather than queued.
Multitasking in parallel: Simply open a new conversation to run multiple tasks simultaneously without interference, and you can even run them in parallel across projects. Note that chat memory is not shared between different conversations, but they can all see the files in the same project folder.
Skills and Plugin Ecosystem
Many people can't distinguish between "Skills" and "Plugins," but the difference is actually simple:
- Skills: A set of pre-written execution steps, packaged into a Markdown file. For example, an image-generation workflow like "determine description → choose style → call model → generate image" written as an instruction manual. The most commonly used built-in skill is
imagegen, which can generate images directly in conversations. - Plugins: One level larger than skills, containing multiple skills plus the ability to connect to external applications. For example, the
computer-useplugin can take over your computer, containing multiple skills like operating apps, screen recording, and keyboard operations.
In terms of triggering, Codex usually judges autonomously whether to invoke them. If you want to manually specify, use @ to trigger plugins and $ to trigger skills, and you can also use both in a single message.
Office Scenarios in Practice
With the help of the plugin ecosystem, Codex can handle many everyday office needs:
- Word reports: Install the Document plugin, and by sending a command it can automatically search the internet for information and generate an analysis report with a table of contents and tables.
- Excel spreadsheets: Use the SuperSheets plugin to generate color-coded comparison tables.
- PPT presentations: Use the Presentation plugin to generate clean business-style slides with key points and illustrations.
You can even request Word, Excel, PPT, and a cover image all in a single message, obtaining a complete set of files at once.

Memory System and Automation
AGENTS.md Project Guidelines
Memory is not shared between different conversations, and repeatedly reminding Codex of things to note can be troublesome. The solution is to create an AGENTS.md file in the project root directory. Codex automatically reads and follows the rules within it every time it starts, like an onboarding handbook prepared for a new colleague.
Why keep it within 150 lines? A large language model's "memory" is essentially a limited context window—that is, the total amount of text the model can "see" simultaneously during each inference (the GPT-4 series supports up to about 128K tokens, roughly 100,000 Chinese characters). AGENTS.md works by injecting its content at the very front of the context each time a conversation starts, serving as persistent "system-level instructions." When the context is filled up, the model "forgets" earlier content, causing a decline in instruction-following quality—much like the capacity limit of human working memory. The limitation of context windows essentially stems from the fact that the computational complexity of the Transformer architecture's attention mechanism grows quadratically with sequence length. Although optimization techniques like Flash Attention and sparse attention have emerged in recent years, context usage still needs careful management in engineering practice. Therefore, "concise rules" are more effective than "exhaustive rules"—an overly long rules file compresses the space available for AI to process actual task content. It's worth noting that RAG (Retrieval-Augmented Generation) is another approach to solving the long-memory problem—it stores knowledge in an external vector database and retrieves relevant fragments to inject into the context on demand, rather than loading all content at once. However, the Codex desktop version has not yet opened this capability. It's recommended to write core constraints clearly and keep it within 150 lines.
Automated Scheduled Tasks
For daily repetitive work (like generating a stock analysis report every day), you can use natural language to have Codex create scheduled tasks, for example "automatically search for AI-related stock information at 9 AM every day and generate reports, tables, and PPTs." It's recommended to first run the command in a normal conversation on the first use, confirm the results meet expectations, and then set it as a scheduled task to avoid wasting quota.
Work Environments and Diff Review
Codex offers three work environments:
- Local mode: Directly modifies files in the project folder, with changes immediately visible. Suitable for minor modifications, but be sure to back up promptly.
- Worktree mode: Creates a parallel copy in the background, where Codex operates on the copy without touching the original files. This perfectly solves the conflict of multiple AIs modifying the same file simultaneously, like making multiple photocopies of a contract for different lawyers to review separately.
- Cloud mode: Tasks are sent to a server for execution, so your computer doesn't need to stay on. Suitable for large, time-consuming tasks, but configuration is more complex, so beginners can skip it for now.
Why is Git version control so important? Git was born in 2005, developed by Linux founder Linus Torvalds to manage the Linux kernel code, and has now become the standard collaboration infrastructure for over 94 million developers worldwide. Its distributed architecture means each local repository is a complete historical copy, so no data is lost even if the server goes down. In workflows where AI writes frequently, Git's value elevates from a "team collaboration tool" to a "safety net for AI operations"—when AI generates incorrect code or accidentally deletes files, a single git revert command can restore the project to the last clean state. Git's underlying data model is equally ingenious: each commit is essentially a snapshot of the entire project at a specific moment, rather than a diff patch, making historical rollback far more efficient than traditional incremental backup methods. Worktree is a native feature introduced in Git 2.5, allowing the same repository to check out different branches simultaneously in multiple directories on disk, with each branch operating independently without interference—highly compatible with Codex's need for parallel multi-conversation file modification. It's recommended that all Codex users run git init before starting any AI task, and develop the habit of "small, frequent commits": commit each time you complete a verifiable subtask, bringing every step of AI's operations into a traceable, rollback-able history.
After changes are complete, clicking the review button in the top-right corner expands the diff panel, clearly comparing old and new code with green (additions) and red (deletions), and you can also add line-by-line comments to have Codex make precise modifications. Once satisfied, you can complete the Git commit and push directly within Codex.

Operating Browsers and Computers
Operating browsers and computers is a standout capability of Codex compared to similar tools. After installing the BrowserUse plugin, it can autonomously open browsers, visit websites, click buttons, fill out forms, take screenshots and screen recordings, and scrape information—only requiring manual intervention when account login is needed.
The technical principles of browser and computer control: BrowserUse is implemented based on the Playwright framework—Playwright is a cross-browser automation tool open-sourced by Microsoft, supporting Chromium, Firefox, and WebKit, communicating directly with the browser kernel through the Chrome DevTools Protocol (CDP) to precisely control page interactions and capture network requests. CDP is a low-level debugging protocol opened by the Chrome team, allowing external programs to send JSON-formatted control instructions to the browser via WebSocket connections, covering dozens of areas such as DOM operations, network interception, and performance analysis—which is why Playwright can achieve more precise and stable element control than simulating mouse clicks. Compared to the earlier Selenium, Playwright has more stable asynchronous support and more reliable element-waiting mechanisms, making it the mainstream underlying choice for current AI Agents implementing web operations. AI understands the current interface state by parsing the page DOM structure and screenshots, then generates operation instructions like click coordinates and input content, forming an "observe-act" loop. computer-use represents a higher-dimensional breakthrough—Anthropic pioneered the release of the Computer Use capability based on screenshot recognition of UI elements in 2024, drawing on vision-driven automation technology: by capturing screen pixels and identifying UI elements to control any desktop application, without requiring the application to provide an API interface. The core value of this "pixel-level control" paradigm lies in expanding the operational boundary of AI Agents from "only being able to operate services with APIs" to "being able to operate any interface visible to humans," at the cost of slower speed and greater sensitivity to screen resolution and UI changes.
Through the computer-use plugin (currently only supporting Mac), Codex can also operate other applications on the computer. For example, you can have it open Chrome, search for keywords on Xiaohongshu, download the latest illustrated notes, and save them to the desktop—all completed autonomously by the AI, and it can even download high-quality original images without watermarks.
In addition, the desktop version has a built-in terminal (open with Cmd/Ctrl+J), whose working directory automatically follows the current conversation, and Codex can also read terminal output to judge server status. If you have Claude Code installed at the same time, you can launch it directly in the terminal, letting the two AIs each play to their strengths.

Six Best Practices
- Use projects for anything involving files, and use conversations for casual questions, ensuring generated files are managed uniformly.
- One task per conversation—the more focused the conversation, the more stable the AI's performance.
- Get a plan first for complex tasks—use Plan Mode to have it list a plan first, then execute after confirmation.
- Write clear completion criteria, such as "all tests pass, manually verified as usable, no unrelated files modified," and Codex will self-check accordingly.
- Develop the habit of frequent commits—commit to Git after each small step, so you can quickly roll back if something breaks.
- Have Codex review its own code—open a new conversation specifically to check security and performance, which often uncovers overlooked issues.
Final Thoughts
Codex has evolved from a pure coding tool into an all-in-one AI assistant. Whether you're in operations, a photographer, or a self-media blogger, you can integrate it into your actual workflow to boost efficiency—no need to understand HTML, CSS, or JavaScript, just clearly describe your requirements in natural language.
But one thing to keep in mind: how much power Codex can unleash fundamentally depends on you. The better you understand your project and the more clearly you can describe your requirements, the higher the quality of the tasks it can complete. Vague instructions will only yield vague results.
Key Takeaways
Key Takeaways
Related articles

The Truth Behind Codex 'Build a Website in 5 Minutes': AI Isn't Creating Sites—It's Helping You Copy Them
Exposing the truth behind viral Codex 5-minute website videos: creators aren't building original sites with AI—they're copying shared prompts or scraping others' work. Learn AI coding tools' real limits.

Getting Started with AI Agent Development: A Complete Guide from Concept to Practice
A comprehensive guide to AI Agent architecture and development, covering automated marketing, intelligent customer service, and investment analysis scenarios with single and multi-agent collaboration.

The Truth Behind Codex 'Build a Website in 5 Minutes': AI Isn't Creating Sites — It's Helping You Copy Them
Exposing the truth behind viral Codex 5-minute website videos: creators aren't building original sites with AI — they're copying shared prompts or scraping others' work.