What version of Codex CLI is running?
0.137.0
What subscription do you have?
Pro Lite
Which model were you using?
gpt-5.5
What platform is your computer?
Linux (WSL2)
What terminal emulator and version are you using (if applicable)?
VSCode
What issue are you seeing?
Summary
In Codex CLI v0.137.0, project-scoped custom subagents under .codex/agents/*.toml are no longer selectable from the model-visible spawn_agent tool surface. Spawned subagents fall back to generic multi_agent_v1 threads, inherit the parent model/reasoning settings, and do not record agent_role or agent_path in session metadata.
This is a regression from earlier CLI versions where spawn_agent accepted an agent_type argument and correctly spawned the configured custom agent.
Environment
- Codex CLI version:
0.137.0
- Platform: Linux
- Auth mode: ChatGPT
- Parent model:
gpt-5.5
- Custom agents are defined under project scope:
.codex/agents/researcher.toml
Custom agent shape
Example custom agent file:
name = "researcher"
description = "Read-only source researcher."
model = "gpt-5.4-mini"
model_reasoning_effort = "medium"
sandbox_mode = "read-only"
nickname_candidates = ["Researcher", "Source Researcher"]
developer_instructions = """
You are a read-only researcher. Do not edit files. Return concise findings.
"""
Expected behavior
When asking Codex to spawn the custom researcher agent, the spawned thread should:
- Load .codex/agents/researcher.toml
- Use model = "gpt-5.4-mini"
- Use model_reasoning_effort = "medium"
- Record agent_role = "researcher" or equivalent custom-agent identity in session metadata
- Record an agent_path or otherwise show that the custom agent config was loaded
This worked in an earlier Codex CLI version. In that version, the model-visible spawn call accepted an argument like:
{
"agent_type": "researcher",
"message": "...",
"fork_context": false
}
Actual behavior in v0.137.0
The exposed tool is multi_agent_v1.spawn_agent, and its schema only accepts:
fork_context
items
message
There is no agent_type, agent, name, model, or custom-agent selector field.
When a subagent is spawned with prompt text like “You are acting as researcher,” the spawned session is generic:
source=subagent:thread_spawn
agent_role=None
agent_path=None
model=gpt-5.5
effort=high
multi_agent_version=v1
So the child thread inherits the parent gpt-5.5/high configuration instead of using the custom agent’s pinned gpt-5.4-mini/medium.
What steps can reproduce the bug?
Reproduction Steps
- Create a project-scoped custom agent:
.codex/agents/researcher.toml
with:
name = "researcher"
description = "Read-only researcher."
model = "gpt-5.4-mini"
model_reasoning_effort = "medium"
sandbox_mode = "read-only"
developer_instructions = "You are a read-only researcher."
- Start Codex CLI v0.137.0 in that project.
- Ask Codex to spawn the custom researcher agent.
- Inspect the available spawn_agent tool schema and the resulting child session metadata.
What version of Codex CLI is running?
0.137.0
What subscription do you have?
Pro Lite
Which model were you using?
gpt-5.5
What platform is your computer?
Linux (WSL2)
What terminal emulator and version are you using (if applicable)?
VSCode
What issue are you seeing?
Summary
In Codex CLI v0.137.0, project-scoped custom subagents under
.codex/agents/*.tomlare no longer selectable from the model-visiblespawn_agenttool surface. Spawned subagents fall back to genericmulti_agent_v1threads, inherit the parent model/reasoning settings, and do not recordagent_roleoragent_pathin session metadata.This is a regression from earlier CLI versions where
spawn_agentaccepted anagent_typeargument and correctly spawned the configured custom agent.Environment
0.137.0gpt-5.5.codex/agents/researcher.tomlCustom agent shape
Example custom agent file:
Expected behavior
When asking Codex to spawn the custom researcher agent, the spawned thread should:
This worked in an earlier Codex CLI version. In that version, the model-visible spawn call accepted an argument like:
{
"agent_type": "researcher",
"message": "...",
"fork_context": false
}
Actual behavior in v0.137.0
The exposed tool is multi_agent_v1.spawn_agent, and its schema only accepts:
fork_context
items
message
There is no agent_type, agent, name, model, or custom-agent selector field.
When a subagent is spawned with prompt text like “You are acting as researcher,” the spawned session is generic:
source=subagent:thread_spawn
agent_role=None
agent_path=None
model=gpt-5.5
effort=high
multi_agent_version=v1
So the child thread inherits the parent gpt-5.5/high configuration instead of using the custom agent’s pinned gpt-5.4-mini/medium.
What steps can reproduce the bug?
Reproduction Steps
.codex/agents/researcher.toml
with: