codex - 💡(How to fix) Fix Custom agent requests are easy to misrout to skills instead of .codex/agents/*.toml custom agents [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#18823Fetched 2026-04-22 07:52:06
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Participants
Timeline (top)
labeled ×4unlabeled ×1
RAW_BUFFERClick to expand / collapse

What version of the IDE extension are you using?

26.5417.40842

What subscription do you have?

pro

Which IDE are you using?

VS Code

What platform is your computer?

codespace

What issue are you seeing?

Codex supports true custom agents, but it is too easy for both users and Codex itself to confuse custom agents with skills.

Official Codex docs say custom agents are standalone TOML files under:

  • ~/.codex/agents/ for personal agents
  • .codex/agents/ for project-scoped agents

and each custom agent must define:

  • name
  • description
  • developer_instructions

References:

However, when I asked Codex to create an agent, it steered the implementation toward the skills system instead:

  • SKILL.md
  • optional agents/openai.yaml
  • references/scripts inside a skill bundle

That produced a skill, not a true custom agent.

This makes the product behavior and docs/discoverability confusing:

  • “custom agent” and “skill” are different mechanisms
  • but the skill path is much more visible/easy to fall into
  • so even explicit requests for “an agent, not a skill” can still end up on the skill path

What steps can reproduce the bug?

  1. Ask Codex something like: Create a custom Kpler agent for me. I want an agent, not a skill.

  2. Codex may choose the skill-authoring path first, such as:

    • creating or modifying SKILL.md
    • creating agents/openai.yaml
    • building references/scripts as a skill bundle
  3. The result is a skill-based artifact, not a true custom agent in:

    • ~/.codex/agents/<name>.toml
    • or .codex/agents/<name>.toml
  4. Only after checking the official docs does it become clear that the correct mechanism for a real custom agent is the custom-agent TOML path documented under Subagents / Config.

Example of the kind of request that triggered the confusion: I want an agent, not a skill.

What is the expected behavior?

If the user explicitly asks for a custom Codex agent, Codex should strongly prefer the true custom-agent mechanism:

  • ~/.codex/agents/<name>.toml
  • or .codex/agents/<name>.toml

and clearly distinguish that from:

  • skills
  • AGENTS.md
  • agents/openai.yaml inside a skill bundle

At minimum, the docs/navigation and in-product guidance should make the distinction much more obvious.

Additional information

This looks like a docs/discoverability and product-guidance issue, not a model-quality issue.

The current official docs do describe custom agents, but they are documented under Subagents / Config, while skills are more discoverable and easier to author. That makes it easy to choose the wrong extension mechanism even when the user is explicit.

Concrete improvement ideas:

  1. Add a dedicated top-level “Custom Agents” docs page
  2. Add a comparison table for:
    • Custom agents
    • Skills
    • AGENTS.md
  3. Make Codex more likely to recommend .codex/agents/*.toml when the user explicitly says “agent, not skill”

Local Codex CLI version in my environment: codex-cli 0.121.0

extent analysis

TL;DR

To resolve the issue, Codex should be updated to strongly prefer the true custom-agent mechanism when a user explicitly asks for a custom agent, and the documentation should be improved for better discoverability and clarity.

Guidance

  • Review the official Codex documentation under Subagents / Config to understand the correct mechanism for creating custom agents using TOML files.
  • When asking Codex to create a custom agent, try specifying the desired location of the agent file, such as ~/.codex/agents/<name>.toml or .codex/agents/<name>.toml, to help Codex understand the request.
  • Consider providing feedback to the Codex development team to improve the documentation and in-product guidance, such as adding a dedicated top-level "Custom Agents" docs page and a comparison table for custom agents, skills, and AGENTS.md.
  • Verify that the created agent is a true custom agent by checking the file location and contents, rather than a skill-based artifact.

Example

No code snippet is provided as the issue is related to documentation and product guidance rather than code.

Notes

The issue seems to be related to documentation and product guidance, rather than a technical bug. The user has provided concrete improvement ideas, such as adding a dedicated top-level "Custom Agents" docs page and a comparison table, which could help resolve the issue.

Recommendation

Apply workaround: Provide clear and specific requests to Codex, such as specifying the desired location of the agent file, to help Codex understand the request and create a true custom agent. Additionally, consider providing feedback to the Codex development team to improve the documentation and in-product guidance.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Custom agent requests are easy to misrout to skills instead of .codex/agents/*.toml custom agents [1 participants]