You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Subagent ignores active profile/provider and falls back to openai #13204
N/A (using custom provider via model_providers + env key)
Which model were you using?
N/A
What platform is your computer?
Darwin 24.6.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
Ghostty (xterm-ghostty), shell: /bin/zsh
What issue are you seeing?
When running with --profile p-name, parent session uses the correct custom provider, but role-based subagents (for example agent_type=explorer / agent_type=awaiter) fall back to openai and call https://api.openai.com/v1/responses.
This causes auth failures like:
unexpected status 401 Unauthorized: Missing bearer or basic authentication in header, url: https://api.openai.com/v1/responses
Important distinction:
spawn_agent with default role (no agent_type) keeps provider correctly.
spawn_agent with role config (explorer / awaiter) falls back to openai.
MY_PROVIDER_API_KEY=... \
codex exec --skip-git-repo-check --profile my-profile --json \
"Spawn one subagent with agent_type explorer. Ask it to reply exactly SUBAGENT_OK. Then wait."
Subagents should inherit the parent turn’s active profile/provider context (or at least the resolved provider) even when agent_type role config
is applied.
Activity
github-actions commentedon Mar 2, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
tungthedev commentedon Mar 2, 2026
Asked codex to fix the issue. See: d94f0b6...tungnguyensipher:codex:main
jif-oai commentedon Mar 2, 2026
Checking
jif-oai commentedon Mar 2, 2026
Here you are: #13235
iqdoctor commentedon Jul 9, 2026
Cross-linking the related upstream reports:
This appears to be the same subagent/provider routing failure family.