Global instructions
They guide recurring work across projects.
Project AGENTS.md
It adds the goal, commands, and rules for one repository.
Start here: see what belongs globally, then read only the rule you need.
Source and privacy
This article explains a sanitized public version of Adrian’s real setup. The download excludes private accounts, company data, and local paths.
Before you start
The global AGENTS.md gives Codex shared rules across projects. Choose only the one of nine rules you need below.
1. Priorities and scope
What it says: First define a correct, useful, and verifiable outcome; only then choose the scope of work.
Show details and the complete excerptHide details
Problem it solves / interpretation: This order evaluates work by its effect, rather than the number of parts or how quickly it was written. Naming assumptions makes it clear what still needs confirmation.
When Codex uses it: When choosing scope, proposing an approach, resolving instruction conflicts, or deciding whether clarification is necessary. It asks only when the answer materially changes scope, target, account, risk, or an external action.
What the reader adapts: The priority order can reflect the reader’s own work, while preserving correctness and verifiability. Details of one product or repository belong in its local AGENTS.md.
Result: Codex can choose the smallest useful scope, and you can see which assumptions still need confirmation.
2. Approved work packages and autonomy
What it says: For work in a company or shared environment, first describe one concrete package: outcome, areas, checks, material risks, and blast radius. One approval covers ordinary completion of that package, but not commits, pushes, or another external action unless it explicitly names them.
Show details and the complete excerptHide details
Problem and interpretation: You do not need to ask again for every ordinary repair, failed check, or review finding. A new decision is needed only if the goal, scope, acceptance criteria, material risk, or a separate Human Gate changes. A sandbox, account, or policy block remains a block from that mechanism; never bypass it or describe it as a general need to reapprove ordinary repairs.
When Codex uses it: Before changing a shared environment and throughout the approved stage while it repairs, tests, runs regressions, obtains independent review, synchronizes documentation, or makes reversible updates to an approved local demo.
What the reader adapts: State your own gates, contract source, and external actions. Do not turn a package description into universal authorization.
Result: you have one verifiable work boundary, and Codex can finish ordinary steps without multiplying questions.
3. BALANCED: task lead and bounded delegation
What it says: The model selected for the current task leads the whole result. Routine, independent work can be handed off with a clear brief when the environment supports it.
Show details and the complete excerptHide details
Problem it solves / interpretation: Delegation does not transfer responsibility for the whole result. A short, self-contained brief reduces guessing, duplicated effort, and the chance that several people change the same area without coordination.
When Codex uses it: When a subtask has a clear result and can be completed independently, such as focused file analysis, a mechanical change, simple refactoring, testing, logs, references, or documentation. Small tasks stay with the lead. The lead handles architecture and difficult debugging. Select a supported, permitted model and reasoning effort according to the task's needs and risk. A helper receives a no-history, self-contained brief with task, context, files, constraints, expected outcome, safety boundaries, known findings, and acceptance criteria.
What the reader adapts: Keep model names and default reasoning levels in your configuration, not in this rule. Adapt the available helper model, effort, and delegation mechanism to the environment, or remove delegation when helpers are unavailable. Keep the required brief fields and the independence of required review.
Result: the supporting agent receives a bounded task while the lead remains responsible for the whole outcome.
4. Repository and documentation on demand
What it says: Before changing code, find the source of truth, the existing pattern, and the right check.
Show details and the complete excerptHide details
Problem it solves / interpretation: A framework is not the source of truth for a repository’s commands or architecture. Progressive reading reduces work in the wrong place and prevents important signals from being buried in long logs.
When Codex uses it: Before coding, while diagnosing, selecting tests, or researching decisions. It also checks authorization before gated actions and never treats a summary as approval for a later action.
What the reader adapts: Put real commands, structure, sources of truth, and acceptance criteria in the project file. Keep the method of investigation and the rule against guessing from the stack globally.
Result: the change follows the project’s real rules and has an appropriate check.
5. Stage checkpoints and handoff
What it says: After a meaningful stage, leave a short, concrete record of the state and next action.
Show details and the complete excerptHide details
Problem it solves / interpretation: A checkpoint is concise operating state for the next session or person. It does not grant authority and should not become a second journal after every small correction.
When Codex uses it: At a stage boundary, before handoff, or before switching projects. If no plan exists or writing is not allowed, it reports that state in the task.
What the reader adapts: Use one existing place for the plan and name the format that fits the team. Keep information about unapproved work, evidence, and approvals.
Result: the next person or session can verify the state and take the next step without guessing.
6. UX and Live/Demo work
What it says: Show a small, safe slice, collect feedback, and finalize only after explicit acceptance.
Show details and the complete excerptHide details
Problem it solves / interpretation: It draws a boundary between quickly refining a view and fully finalizing a stage. Approval of a named stage starts its finalization work but does not itself authorize a merge, publication, or deployment.
When Codex uses it: During new interface or technology decisions and demos. It immediately verifies risky changes involving backend, logic, data, authorization, or migration.
What the reader adapts: Point to the team’s own UX guidance and stage-approval language. Do not turn it into general authorization for external actions.
Result: small fixes stay quick, while external actions still need separate approval.
7. Evidence, verification, and tools
What it says: Match verification to risk, then show the evidence, limits, and open risks.
Show details and the complete excerptHide details
Problem it solves / interpretation: One kind of check cannot answer every question. Tests, artifact readback, source research, and a real interface flow produce different evidence. Required review cannot be replaced by an author’s self-assessment.
When Codex uses it: When verifying time-sensitive facts, choosing tests, finalizing material changes, and selecting tools. It prefers repository-native tools, then specialist APIs and connectors, then browser or computer control in their specified cases.
What the reader adapts: Add repository-specific checks only to the project file. Keep reporting discrepancies, unverified work, and risks; where independent review is required, report its absence instead of claiming technical acceptance.
Result: the outcome has evidence that matches the risk, and any uncertainty or gaps remain visible.
8. Safety, accounts, and external actions
What it says: Before acting outside the local project, verify the context, account, and exact target; consequential actions need specific approval.
Show details and the complete excerptHide details
Problem it solves / interpretation: A correct command executed in the wrong account or project is still an error. General permission and silence do not define an irreversible, production, financial, regulated, security-sensitive, or communicative operation.
When Codex uses it: Before connecting, disconnecting, changing, or switching an account or connector, and before external activity. It first uses read-only inspection to establish the active context. The routing map remains private and must be checked before shared or external action.
What the reader adapts: Fill in a private account map only in a non-public copy. Replace placeholders with the reader’s own identities, but do not move them into an article, template, or shared repository.
Result: an action reaches the intended context without using private data without approval.
9. Company and shared environments
What it says: In a team environment, first show the scope and verification; wait for explicit approval before changing anything.
Show details and the complete excerptHide details
Problem it solves / interpretation: Approval to inspect, diagnose, or plan is not approval to change. Shared resources have owners, audiences, and dependencies, so commits, publication, messages, and infrastructure changes each need precise authorization.
When Codex uses it: Before editing a company or shared environment and before an external action affecting it. Once approved, it makes the smallest change that can be reviewed and traced.
What the reader adapts: Adapt the checklist name, approval process, and team-environment definition to the organization. Keep the prohibition on leaving private AI instructions, memory, experiments, helpers, or temporary artifacts unless they are part of the approved change.
Result: the team sees the proposed change before editing and can review it safely.
How to adapt the global file
APPLY IT YOURSELF · 3 STEPS
- 01
Download the file
Get the English original below. It is a reference to compare with your current instructions.
- 02
Ask Codex to compare
Attach the download in a conversation and paste the prompt below. Start with a proposal, before changing files.
- 03
Review, then verify
Approve only the rules that fit your work. In a fresh task, ask Codex to summarise the applicable instructions.
The global file is for recurring work across projects. In a private copy, fill in the account map, name the mechanism used by the reader’s Codex installation, and remove delegation when it is unavailable. Keep architecture, commands, sources of truth, and acceptance criteria in the project’s AGENTS.md.
Result: you have a compared, safely adapted proposal before the global file changes.
Where to find global instructions in Codex
In the Codex app, open Settings → Personalization → Codex instructions. This is where the instructions that apply globally to your Codex work are stored. Change them only after comparing them with your current setup, and keep private data out of public material.

Personalizacja and Instrukcje Codex. Click the image to open it at full size. The visible content was checked for private accounts and secrets.