[KongchangAI]
· 2 min read· 1,398 words

Codex Practical Tutorial: From Plan Mode to Goal Mode, Mastering AI Programming

Codex Practical Tutorial: From Plan Mode to Goal Mode, Mastering AI Programming

A Bilibili tutorial-based breakdown of the Codex onboarding path, focusing on the two task modes and the Token cost trade-off.

The article combines a Bilibili creator's Codex tutorial to outline the onboarding path. The interface splits into a function area (mounting Computer Use and Chrome plugins) and a workspace where conversation happens and output is saved to a folder. Two modes exist: Plan Mode presents a plan first, suiting undefined ideas; Goal Mode works until completion but consumes huge Tokens, so plan first, then goal. Permissions come in three tiers, with full access recommended to reduce friction but requiring risk weighing. Natural language reproduces the New API system with roughly on-par results. Vaguer instructions mean greater consumption, so preparing requirements in advance saves Tokens—the real barrier is describing problems clearly.

Title

Codex Practical Tutorial: From Plan Mode to Goal Mode, Mastering AI Programming

Meta Description

Drawing on a Bilibili practical tutorial, this guide details Codex's function area and workspace, the differences between Plan Mode and Goal Mode, permission setting choices, and natural-language-driven Token consumption control and onboarding paths.

Article Content

Codex has been gaining notable traction in developer circles recently, but many people still don't realize that its operational barrier is actually much lower than they imagine. A practical tutorial posted by a Bilibili creator breaks down Codex's function area, workspace, two task modes, and permission settings in considerable detail. This article combines that tutorial's hands-on demonstration to walk through the Codex onboarding path, and adds some judgment on Token consumption and mode selection.

Codex's Two Core Areas: Function Area and Workspace

When you open the Codex page, the interface is roughly divided into two parts. The function area is responsible for mounting plugins, while the workspace is where the actual conversation happens. Among the plugins is Computer Use, whose purpose is to let Codex directly operate your computer; the Chrome plugin lets Codex access the browser to look up information. These plugins extend Codex from a mere conversational tool into an agent that can actually get things done.

According to the creator's demonstration, the first step after entering the page is to switch the language to Chinese, which makes it more comfortable to use—though not changing it doesn't affect functionality either.

Entering the Codex page

Before actually starting work, you need to open a folder first, where the subsequently generated files and code will be saved. This setting is actually a reminder to users: Codex is not a pure chat toy—its output lands in a local directory, making it essentially closer to a programming assistant that can read and write files.

The workspace is where we converse

How Computer Use and Browser Plugins Work

Plugins like Computer Use let AI agents operate the computer by recognizing interface elements through screenshots and simulating mouse clicks and keyboard input, rather than calling system APIs. Its reliability is limited by screen resolution, dynamic interface changes, and popup interference—it performs well on repetitive tasks with fixed workflows, but tends to get stuck when encountering CAPTCHAs or complex graphical interfaces. The Chrome plugin typically runs as a browser extension or headless browser, letting Codex directly scrape web content, execute searches, and read page structures, saving users the trouble of manually copying and pasting materials. Together, the two push Codex's capability boundary from "generating text" to "acquiring information and executing actions in real environments," but this also means higher permission requirements and real-world consequences when things go wrong.

Plan Mode and Goal Mode: Two Task Rhythms

The plus sign in the workspace offers two modes. In Plan Mode, Codex first presents a plan and only proceeds to actual execution after you confirm, which suits people who have an idea but haven't figured out how to implement it. Goal Mode is the opposite: you give a goal, and Codex keeps working until it's complete, which suits long, complex tasks—at the cost of enormous Token consumption.

The creator's advice is to first use Plan Mode to clarify your thinking, then switch to Goal Mode to run the execution. This order makes sense: the output of the planning phase amounts to a reviewable blueprint, which prevents Goal Mode from continuously consuming resources in the wrong direction.

Codex keeps working until the goal is complete

For permissions, there are three options: request approval, approve for me, and full access. The tutorial author recommends full access, reasoning that it reduces the friction of back-and-forth confirmation. This choice requires weighing—full access means Codex has greater operating room over your file system, which is fine for trusted projects and isolated environments, but in important repositories it's advisable to keep the approval step.

Model and speed depend on personal habits. If you're not short on Tokens, you can max them out for a smoother experience.

Why Token Consumption Surges in Goal Mode

Large models bill by token, counting both input and output toward cost. In Goal Mode, Codex repeatedly runs a "think—execute—observe results—correct" loop, and each round must feed the historical conversation, file contents, and tool return results back into the context. The longer the context grows, the higher the per-round cost. For a task requiring dozens of steps, cumulative token consumption can be several times or even an order of magnitude higher than Plan Mode. Plan Mode outputs a single plan and then pauses, keeping consumption relatively manageable. This is also the economic rationale behind the tutorial's advice to "plan first, then goal": lock in the direction with a low-cost mode, then execute the validated path with a high-cost mode.

Natural Language Driven: Low Barrier, But Prepare Instructions in Advance

The hands-on part of the tutorial uses natural language to have Codex research New API and build a system. During the process, the author specifically reminds of one thing: don't just toss instructions out directly like in the demonstration, as this consumes a lot of Tokens. It's better to prepare your requirements in advance before starting, which saves quite a bit.

This detail is worth expanding on. Natural language operation sounds easy—you just input whatever you'd normally say—but the vagueness of instructions directly determines how many rounds of trial and error Codex needs. Preparing goals, constraints, and reference materials clearly in advance is essentially trading human structured thinking for machine execution efficiency.

Research New API, let Codex help us build a system

The final result is roughly on par with common New API projects on the market. This shows that Codex can already deliver usable results when reproducing mature system structures, but "roughly on par" also implies that human intervention is still needed for detail polishing.

What Is New API

New API is an open-source API gateway and quota management project, often used to uniformly connect interfaces from multiple large model service providers while offering key distribution, usage statistics, and billing features. It has a relatively mature project structure and documentation, so it's often used as a sample to demonstrate whether Codex can independently build a real system. Choosing this type of project for hands-on testing has an advantage: there's a public reference implementation for comparison, making it intuitive to see the gap between AI-generated results and mature projects. The "roughly on par" assessment in the article precisely shows that Codex can reproduce the main architecture, but still requires human proofreading on configuration details, edge-case handling, and code standards.

Onboarding Advice and Precautions

Combining the tutorial information, the beginner path can be summarized as: switch to Chinese, choose a folder, use Plan Mode first to produce a plan, and after confirmation decide whether to switch to Goal Mode based on complexity. Enable plugins as needed, and permissions can be relaxed in trusted environments. Token is the cost variable running through the entire process—the vaguer the instructions and the more aggressive the mode, the greater the consumption.

Codex hasn't turned AI programming into magic; what it lowers is the expression barrier, and what it raises is execution speed. The real dividing line still lies in whether users can describe problems clearly and break down goals properly.

One-line Summary

Drawing on a Bilibili tutorial, this breaks down the Codex onboarding path, focusing on the two task modes and the Token cost trade-off.

Paragraph Summary

The article combines a Bilibili creator's Codex practical tutorial to outline its onboarding path. The Codex interface is divided into a function area and a workspace: the function area mounts plugins like Computer Use and Chrome, while the workspace handles conversation and saves output to a specified folder. The workspace offers Plan Mode and Goal Mode: the former presents a plan before execution, suiting undefined ideas; the latter keeps working until the goal is complete but consumes enormous Tokens, so plan first, then goal. Permissions come in three tiers—request approval, approve for me, and full access—with the tutorial recommending full access to reduce friction, though the file system risk must be weighed. In practice, natural language is used to reproduce the New API system, with results roughly on par with market projects. The article emphasizes that vaguer instructions mean greater consumption, and preparing requirements in advance can significantly save Tokens—the real barrier remains whether problems can be described clearly.

#Codex#AI programming#Plan Mode#Goal Mode#Token consumption
Share:

Related articles