Project-scoped custom subagent in `.codex/agents` is advertised but cannot be spawned
What version of the Codex App are you using (From “About Codex” dialog)?
CLI: codex-cli 0.137.0 Codex app bundled CLI: codex-cli 0.136.0-alpha.2
What subscription do you have?
Plan through my company - oracle Corporation
What platform is your computer?
macOS 26.5.0, Apple Silicon / aarch64
What issue are you seeing?
A trusted project-scoped custom agent under .codex/agents/ is visible/advertised as an available spawn_agent role, but attempting to spawn it fails with:
agent type is currently not available
The same TOML agent definition works when copied to ~/.codex/agents/ and renamed, so the TOML appears valid. The failure seems specific to project-scoped custom agent loading/spawning.
What steps can reproduce the bug?
Feedback ID: 019e9295-9d3b-74a2-81d4-7093d8cf9796
- In a trusted project, create
.codex/agents/oracle-devtools.toml.
- Use a valid custom-agent TOML, for example:
name = "oracle-devtools"
description = "Specialist for BugDB and OraReview workflows backed by devvm-hosted MCP servers."
developer_instructions = """
You are the Oracle internal development-tools specialist.
"""
- Confirm the project is trusted in
~/.codex/config.toml:
[projects."/Users/kmizuta/Personal Assistant"]
trust_level = "trusted"
- Start Codex from the project root:
cd "/Users/kmizuta/Personal Assistant"
codex
- Ask Codex to spawn the project-scoped custom agent:
spawn_agent(agent_type="oracle-devtools")
- Observe the failure:
agent type is currently not available
- Copy the same TOML to
~/.codex/agents/, rename the file andnameproperty, then start Codex again.
- The global custom agent can be launched successfully from both
~and/Users/kmizuta/Personal Assistant.
What is the expected behavior?
A trusted project-scoped custom agent defined under .codex/agents/*.toml should be spawnable from that trusted project, the same way a global custom agent under ~/.codex/agents/*.toml is spawnable.
Additional information
Project root:
/Users/kmizuta/Personal Assistant
Project agent file:
/Users/kmizuta/Personal Assistant/.codex/agents/oracle-devtools.toml
Relevant local config:
/Users/kmizuta/Personal Assistant/.codex/config.toml
/Users/kmizuta/.codex/config.toml
The project AGENTS.md is loaded in the session, and project skills are visible, but the project-scoped custom agent cannot be spawned.
codex doctor also reports the project as detected and trusted, but only lists ~/.codex/config.toml as the loaded config file. There may be a mismatch between project context loading and project .codex/agents loading in the app/runtime surface.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗