codex loginReconnect authentication
Recover Codex auth through ChatGPT OAuth, device auth, API key, or an access token piped over stdin.
🔒 Browser-side processing
A compact Codex reference rebuilt from the OpenAI Codex manual, focused on CLI commands, slash commands, AGENTS.md, Skills, MCP, Automations, and app settings.
Checked
Codex now spans the CLI, desktop app, IDE extension, and cloud workflows. This page stays anchored to features OpenAI documents explicitly as of June 8, 2026.
Last checked · 2026-06-08CLI First
codex loginRecover Codex auth through ChatGPT OAuth, device auth, API key, or an access token piped over stdin.
codex updateCheck for and apply a Codex CLI update when the installed release supports self-update.
codex doctorGenerate a support report for installation, auth, config, Git, terminal, app-server, and thread inventory issues.
codex execUse Codex from scripts or automation and stream output to stdout or JSONL.
codex --modelOverride the configured default model for a single invocation.
--sandbox / --ask-for-approvalFor local work, workspace-write plus on-request is usually the practical balance.
/permissionsSwitch between presets such as Read Only and Auto while the session is running.
/model / /statusConfirm the active model, effort, approval policy, writable roots, and remaining context.
/plan / /goalUse plan mode before implementation and goals for longer-running tracked work.
/diff / /reviewInspect the working tree diff and ask Codex for a review pass on local changes.
App Workflow
Keep recurring review criteria, build commands, and repository rules in AGENTS.md. Closer nested files provide more specific guidance.
Put repeatable procedures in .agents/skills or $HOME/.agents/skills. Codex reads the full SKILL.md only when needed.
Use codex mcp or config.toml MCP settings when Codex needs GitHub, Figma, browsers, internal docs, or other external systems.
Run recurring checks with Automations, and choose dedicated worktrees in Git repositories to isolate background changes from local work.
Codex app threads run in Local, Worktree, or Cloud mode. Worktree mode is usually the cleanest choice for independent work in one repo.
Think of the in-app browser and Browser plugin for web app checks, and Computer Use for desktop-app workflows.
Use Cases
Start with codex login, codex doctor, codex update, and /status to recover auth, install, version, and session state.
Use AGENTS.md for rules, Skills for repeatable procedures, MCP for external systems, and Automations for recurring runs.
Inspect changes with /diff, request a working-tree review with /review, then ask Codex to run the relevant tests.
Official Sources
For CLI commands, global flags, sandboxing, approvals, codex exec, codex doctor, and codex mcp.
For /permissions, /model, /plan, /goal, /review, and /status.
For skill structure, locations, progressive disclosure, and how skills relate to plugins.
For MCP server setup, stdio/HTTP transports, OAuth, tool approvals, and plugin-provided MCP settings.
For standalone automations, thread automations, worktree execution, and sandbox boundaries.
For Local, Worktree, and Cloud modes, built-in Git tools, browser use, computer use, and app behavior.