Answer: To define a custom Codex agent, add a standalone TOML file under `~/.codex/agents/` for personal agents or `.codex/agents/` for project-scoped agents; each file must define `name`, `description`, and `developer_instructions`, and you can set `model` and `model_reasoning_effort` to customize model behavior. Status: Confirmed Entry: tool/codex/agents-and-automation/configure-custom-agents Revision: 2 Digest: sha256:1ab54458715eebac (changes whenever the content changes) Timeline: Created: 2026-11-13T03:47:14Z Last changed: 2026-11-19T13:25:29Z (model precedence: If a custom agent file sets `model` or `model_reasoning_effort`, the value in the file takes precedence. → —) Last verified: 2026-11-20T13:34:52Z Next check: 2026-11-21T13:34:52Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of personal agents directory | ~/.codex/agents/ | [1] | 2026-11-20 project-scoped agents directory | .codex/agents/ | [1] | 2026-11-20 required field: name | name | [1] | 2026-11-20 required field: description | description | [1] | 2026-11-20 required field: developer_instructions | developer_instructions | [1] | 2026-11-20 model customization fields | model | [1] | 2026-11-20 Sources: [1] OpenAI. "Subagents". https://learn.chatgpt.com/docs/agent-configuration/subagents.md Role: primary. Accessed: 2026-11-20T13:34:52Z Quote: "add standalone TOML files under `~/.codex/agents/` for personal agents" (Supports: personal agents directory) Quote: "`.codex/agents/` for project-scoped agents." (Supports: project-scoped agents directory) Quote: "Every standalone custom agent file must define: - `name`" (Supports: required field: name) Quote: "- `description` - `developer_instructions`" (Supports: required field: description) Quote: "- `developer_instructions` If a custom agent file sets `model`" (Supports: required field: developer_instructions) Quote: "Use `model`, `model_reasoning_effort`, `model_reasoning_summary`, and `model_verbosity` to customize model behavior." (Supports: model customization fields) Snapshot SHA-256: cd2b9d3a74eff357c4bc58dd6c58498c6b8f1291200309292b4e34d2c74dfa39 (captured 2026-11-18T13:28:59Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-18T13:29:00Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:34:52Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:34:52Z Last attempt: 2026-11-20T13:34:52Z Notes and limitations: Extracted automatically from a single official source (section "Custom agents"). Related: https://latestn.com/tool/codex/agents-and-automation/container-caching-maintenance-script How does container caching work in Codex Cloud and when is the maintenance script run? https://latestn.com/tool/codex/agents-and-automation/create-publish-environment How do I create and publish a reusable environment in Codex Cloud? https://latestn.com/tool/codex/agents-and-automation/delegate-repo-work-codex-cloud-slack How do I delegate repository work to Codex Cloud from Slack? https://latestn.com/tool/codex/agents-and-automation/build-skill How do I build a skill for ChatGPT or Codex? https://latestn.com/tool/codex/agents-and-automation/codex-cloud-task-default-environment How do I start a Codex cloud task without choosing a repository? https://latestn.com/tool/codex/agents-and-automation/codex-prompt-examples How do I prompt Codex to explain a codebase or fix a bug? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-19T13:25:29Z | changed | model precedence: If a custom agent file sets `model` or `model_reasoning_effort`, the value in the file takes precedence. → — | [1] 2026-11-13T03:47:14Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/codex/agents-and-automation/configure-custom-agents/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/codex/agents-and-automation/configure-custom-agents POST: https://latestn.com/dispute/tool/codex/agents-and-automation/configure-custom-agents with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/codex/agents-and-automation/configure-custom-agents?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I configure a custom Codex agent with its own model and instructions? Revision 2, last verified 2026-11-20T13:34:52Z. https://latestn.com/tool/codex/agents-and-automation/configure-custom-agents (accessed 2026-11-21T10:03:51Z). @misc{LatestN_tool_codex_agents_and_automation_configure_custom_agents_r2, title = {How do I configure a custom Codex agent with its own model and instructions?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/codex/agents-and-automation/configure-custom-agents}}, note = {Revision 2; digest sha256:1ab54458715eebac; last verified 2026-11-20T13:34:52Z; accessed 2026-11-21T10:03:51Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/codex/agents-and-automation/configure-custom-agents