Scope: Personal operator playbook for using Codex to run reusable, bounded, multi-role workflows safely and consistently.
Evidence standard: This SOP is based on March 2026 official Codex documentation and guidance. Where a capability is documented only in the changelog or marked experimental, that status is called out explicitly.
Codex documents a layered customization model built around:
AGENTS.md for persistent project guidanceThis is the core architecture surface for orchestration as of March 2026.
The Codex app supports slash commands from the thread composer. It also supports explicit skill invocation by typing $ in the composer. Enabled skills also appear in the slash command list.
Available slash commands (March 2026):
/feedback — submit feedback and optionally include logs/mcp — view connected MCP servers/plan-mode — toggle multi-step planning mode/review — start code review mode for uncommitted changes or branch comparison/status — show thread ID, context usage, and rate limitsDeeplinks: The Codex app supports codex:// URL scheme for direct navigation to settings, skills, automations, threads, and new thread creation with optional prompt parameters.
Operational meaning:
$skill-name when you want to invoke a specific skill intentionally.Skills are Codex’s reusable capability layer. Official docs describe them as bundles of instructions, references, and optional scripts, with progressive disclosure so Codex only loads the full skill content when needed.
Skills follow the open Agent Skills standard (agentskills.io). This is an open format originally developed by Anthropic and adopted across multiple platforms including Codex, Claude Code, Cursor, GitHub Copilot, Windsurf, Gemini CLI, and others. Authoring skills to the open standard ensures portability.
Codex-specific extension: Skills can optionally include agents/openai.yaml for Codex-specific UI metadata (interface), invocation policy (policy.allow_implicit_invocation), and tool dependencies (dependencies.tools). This file is ignored by non-Codex platforms.
Operational meaning:
SKILL.md to the agentskills.io spec for portability.agents/openai.yaml only for Codex-specific enhancements (UI, policy, MCP dependencies).SKILL.md body under 500 lines / ~5000 tokens. Move detail to references/.AGENTS.md is the documented place for standing project instructions. Codex reads it before doing work.
Discovery model: Codex builds an instruction chain on startup by scanning from global (~/.codex/) through repo root to current directory. Later files override earlier ones. AGENTS.override.md takes precedence over AGENTS.md at the same level.
Size limit: project_doc_max_bytes defaults to 32 KiB. Beyond that, content is truncated.
Operational meaning:
AGENTS.md.AGENTS.override.md for temporary overrides without deleting base files.config.toml.Subagents are officially documented and can run specialized agents in parallel, wait for results, and return a consolidated response.
Official docs recommend it for highly parallel work such as codebase exploration or multi-part review. They also warn about context pollution and coordination issues, especially for write-heavy tasks.
Platform support (March 2026):
Configuration: Custom agents are defined in TOML files under .codex/agents/*.toml (repo) or ~/.codex/agents/*.toml (global), including name, description, and developer_instructions.
Concurrency limits: agents.max_threads defaults to 6; agents.max_depth defaults to 1 (prevents deep nesting). agents.job_max_runtime_seconds defaults to 1800s for CSV batch jobs.
Operational meaning:
Codex automations are officially documented as scheduled recurring background tasks in the Codex app. The app must be running and the selected project must be available on disk. In Git repos, automations can run either in the local project or in a dedicated worktree.
Automations can invoke skills by including $skill-name in the automation prompt.
Sandbox modes: Read-only, workspace-write, or full access. Admin-enforced requirements may restrict modes.
Operational meaning:
Codex’s official top-level docs for app orchestration center on scheduled automations, not general lifecycle hooks. The Codex changelog for CLI 0.114.0 mentions an experimental hooks engine with SessionStart and Stop events.
Operational meaning:
All skills in this repo must comply with both:
skill-name/
├── SKILL.md # Required: frontmatter + instructions
├── scripts/ # Optional: executable code
├── references/ # Optional: documentation
├── assets/ # Optional: templates, resources
└── agents/
└── openai.yaml # Optional: Codex-specific UI/policy/dependencies
| Field | Required | Constraints |
|---|---|---|
name |
Yes | Max 64 chars. Lowercase letters, numbers, hyphens only. Must match parent directory name. No leading/trailing/consecutive hyphens. |
description |
Yes | Max 1024 chars. Describe what the skill does AND when to use it. Include keywords for auto-selection. |
license |
No | License name or reference to bundled file. |
compatibility |
No | Max 500 chars. Environment requirements if any. |
metadata |
No | Arbitrary key-value map (e.g., author, version). |
allowed-tools |
No | Space-delimited tool list. Experimental. |
Example:
---
name: red-team
description: >
Apply red teaming / devil's advocate reasoning to challenge assumptions,
find flaws, and stress-test plans. Use when evaluating architecture decisions,
editorial content, or any proposal that needs adversarial review.
license: MIT
metadata:
author: codewithshabib
version: "1.0"
one-piece-name: "Mihawk the Rival"
---
Only add when needed. This file is ignored by non-Codex platforms.
interface:
display_name: "Red Team"
short_description: "Devil's advocate reasoning"
icon_small: "./assets/icon.svg"
brand_color: "#DC2626"
policy:
allow_implicit_invocation: true
dependencies:
tools: []
| Layer | Token budget | Loaded when |
|---|---|---|
Metadata (name + description) |
~100 tokens | Startup, all skills |
Full SKILL.md body |
< 5000 tokens (~500 lines) | Skill activated |
references/, scripts/, assets/ |
As needed | Explicitly referenced |
SKILL.md. It must work on any skills-compatible agent.agents/openai.yaml.name field matches the parent directory name.skills-ref validate ./skill-name before committing.Use this layered model:
AGENTS.md holds standing project rules.$skill invocation starts the workflow.Key rule: Interactive invocation, reusable capability, parallel execution, validation, scheduling, and side effects should not all live in one prompt.
AGENTS.md whenExamples:
Examples:
$skill whenExamples:
$red-team, $first-principles)Examples:
Examples:
Examples:
main first.AGENTS.md reflects current project rules.Use one of these entry modes:
$skill invocation.Rule: the workflow should always have one clear entry point.
The top-level orchestration skill should do the following:
Rule: the orchestration skill coordinates; it should not become a giant catch-all skill that owns everything.
Use multi-agent only when justified.
Preferred first use cases:
Avoid or minimize parallelism when:
Before packaging or integration, run deterministic checks.
Examples:
Rule: “looks good” is not a gate.
Human review remains the final control point.
Check:
When the workflow should run on a schedule:
$skill-name.For publish, PR, notify, or chain-next-step behavior:
AGENTS.md stores standing repo rules.$skill to launch the orchestration interactively.SKILL.md — use agents/openai.yaml instead.SKILL.md body — move detail to references/.| Capability | Official status in March 2026 | Best use |
|---|---|---|
AGENTS.md |
Documented, stable | Standing project rules |
| Skills (agentskills.io spec) | Documented, stable, open standard | Reusable portable workflows and capability bundles |
agents/openai.yaml |
Codex-specific extension | UI metadata, invocation policy, MCP dependencies |
| Slash commands | Documented in app | Interactive operator control |
$skill invocation |
Documented in app/CLI | Explicit skill launch |
| Subagents | Documented | Parallel bounded tasks |
| Automations | Documented in app | Scheduled recurring background runs |
| Worktree automations | Documented | Isolated recurring runs in Git repos |
| Hooks engine | Mentioned in CLI changelog, experimental | Emerging; do not rely on broadly |
Deeplinks (codex://) |
Documented in app | Direct navigation to app features |
| Version | Date | Changes |
|---|---|---|
| 1.0 | 2026-03-15 | Initial SOP |
| 2.0 | 2026-03-15 | Added Agent Skills open standard (agentskills.io) as dual-compliance requirement. Added Section 2 (Skill authoring standard) with portable structure, frontmatter spec, Codex extension, progressive disclosure budget, and portability rules. Added slash command reference list. Added deeplinks. Added AGENTS.md discovery model and size limit. Added multi-agent platform support status (CLI-only). Added concurrency limits. Added automation sandbox modes. Updated capability table with stable/experimental status clarification. Added portability anti-pattern to Section 7. |
| 2.1 | 2026-03-17 | Updated subagent/platform guidance: CLI and Codex App visibility, IDE extension visibility pending, custom-agent TOML location under .codex/agents/*.toml, explicit-operator delegation rule, and source link moved from multi-agent to subagents docs. |