Project-scoped custom subagent in `.codex/agents` is advertised but cannot be spawned

Open 💬 2 comments Opened Jun 4, 2026 by kmizuta

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

  1. In a trusted project, create .codex/agents/oracle-devtools.toml.
  1. 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.
"""

  1. Confirm the project is trusted in ~/.codex/config.toml:

[projects."/Users/kmizuta/Personal Assistant"]
trust_level = "trusted"

  1. Start Codex from the project root:

cd "/Users/kmizuta/Personal Assistant"
codex

  1. Ask Codex to spawn the project-scoped custom agent:

spawn_agent(agent_type="oracle-devtools")

  1. Observe the failure:

agent type is currently not available

  1. Copy the same TOML to ~/.codex/agents/, rename the file and name property, then start Codex again.
  1. 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.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗