Install Codex CLI for Team Workflows

The Codex CLI quickstart lists four install paths: a standalone installer for macOS and Linux, plus Windows, npm and Homebrew. After installing, you open a project directory, run codex, and choose Sign in with ChatGPT or another available sign-in method. Link the official docs from your team runbook, because a copied install command goes stale. For a team, the Codex CLI install step should also create repo instructions, MCP boundaries, and a verification loop.
Install the CLI around one repeatable workflow
As of November 2026, the official Codex CLI docs carry the current install and sign-in steps. The package name, auth flow, and feature flags are product details. The workflow is your team's responsibility.
A practical first pass:
- Install Codex CLI from the official docs on one clean developer machine.
- Authenticate with the account path your organization supports.
- Open the repository root.
- Run one small task that changes code and one task that only explains code.
- Record the files Codex read, the files it changed, and the checks you ran.
- Turn that record into AGENTS.md and a verification script before rolling it out.
This belongs with your other CLI workflows. If each developer installs Codex and invents their own rules, review cost goes up.
Rolling this out in your team?
We train engineering teams on their own codebase in two days. Codex setup, shared rules and review included.
Put AGENTS.md close to the code it governs
Codex needs repo rules before it needs more freedom. The /init command creates an AGENTS.md file with instructions for Codex. Put broad rules at the root, then add narrower AGENTS.md files where local conventions differ.
Codex reads those files from the project root down to your current working directory, as the AGENTS.md docs describe. In a pnpm monorepo, that can mean a root AGENTS.md for repo-wide rules, apps/web/AGENTS.md for UI commands, and packages/db/AGENTS.md for schema rules. When Codex works under apps/web, it reads the root file and the apps/web file.
Keep the files short. Codex stops adding files once their combined size reaches 32 KiB by default.
Add MCP access as a read path first
MCP is the integration layer that lets Codex reach external systems such as GitHub issues, project tickets, docs, or internal knowledge stores. Start with read-only access. Write access can come later, after the team can review what Codex did with the information.
A safe first Codex MCP pattern is simple. Let Codex read the issue, inspect related pull requests, and quote the acceptance criteria in its plan. Do not let it close the issue, update the ticket, or post a summary until a human has reviewed the patch.
This is slower at first. It also gives you an audit trail for the first few runs, which is more useful than a fast demo nobody can safely repeat.
Run the verification loop before accepting the patch
The useful part of a Codex workflow is the loop from task, to patch, to checks, to review. In the Delegate, Review, Own method, this sits in Review, because the team has to verify the work before it owns the result through our methodology.
For a small TypeScript change, ask Codex to say which tests it expects to matter before it edits. After the patch, it should run the narrow test, run the lint check if the repo requires it, and summarize any check it could not run. Put that summary in the pull request. Codex also has a /review command that reviews any changes and finds issues.
For a wider guardrail setup, pair this install work with Run Codex Agents With Team Guardrails. The install gives every developer the tool. The guardrails give the team a shared review surface.
Paste this AGENTS.md starter
Use this as a small starting file, then replace the commands with the ones your repo actually uses. The important part is the shape: task rules, MCP boundaries, and verification in one place.
# AGENTS.md
## Repo intent
This repository favors small, reviewable changes. Codex should prefer the narrowest patch that satisfies the task.
## Working rules for Codex
- Before editing, summarize the files you expect to touch and why.
- Do not change public APIs, database schemas, or auth behavior unless the task explicitly asks for it.
- Keep unrelated formatting changes out of the patch.
- When unsure, ask for the missing constraint instead of guessing.
## MCP boundaries
- GitHub, Jira, Slack, and docs MCP access is read-only by default.
- Use MCP context to understand the task, not to make external updates.
- Do not post comments, close issues, move tickets, or send messages unless a human asks for that action in the task.
## Verification loop
- For TypeScript changes, run: pnpm lint
- For unit-tested changes, run the narrowest relevant test command first.
- For web app changes, run the app build command before marking the task complete.
- If a check cannot run locally, say why and name the check a reviewer should run.
## Pull request summary
Include:
- What changed
- Why it changed
- Checks run
- Checks not run, with the reason
Further reading
Set up one repo this week
Pick one repository, install Codex CLI from the official docs, and commit a small AGENTS.md before you invite the whole team in. If you want a guided version, bring that repo to hands-on training and we will turn it into a repeatable Codex workflow.
Train your team on Codex
Two days on your team's own repository, onsite or remote, with a written proposal before you commit.
Book a callPrefer to measure first? Take the free team check.