/agent command takes extremely long to switch back to the main agent
Open 💬 4 comments Opened Jul 22, 2026 by cowwoc
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of Codex CLI is running?
codex-cli 0.145.0
What subscription do you have?
Pro 20x
Which model were you using?
gpt-5.6-luna
What platform is your computer?
Linux 6.18.33.2-microsoft-standard-WSL2 x86_64 x86_64
What terminal emulator and version are you using (if applicable)?
Windows Terminal
Codex doctor report
{
"schemaVersion": 1,
"generatedAt": "1784733292s since unix epoch",
"overallStatus": "warning",
"codexVersion": "0.145.0",
"checks": {
"app_server.status": {
"id": "app_server.status",
"category": "app-server",
"status": "ok",
"summary": "background server is not running",
"details": {
"control socket": "/home/gili/cat/.codex/app-server-control/app-server-control.sock",
"daemon state dir": "/home/gili/cat/.codex/app-server-daemon",
"mode": "ephemeral",
"pid file": "/home/gili/cat/.codex/app-server-daemon/app-server.pid (missing)",
"settings": "/home/gili/cat/.codex/app-server-daemon/settings.json (missing)",
"status": "not running",
"update-loop pid file": "/home/gili/cat/.codex/app-server-daemon/app-server-updater.pid (missing)"
},
"remediation": null,
"durationMs": 0
},
"auth.credentials": {
… +301 lines (ctrl + t to view transcript)
"terminal title project value": "2.1-add-divide-and-co...",
"terminal title source": "default"
},
"remediation": null,
"durationMs": 0
},
"updates.status": {
"id": "updates.status",
"category": "updates",
"status": "ok",
"summary": "update configuration is locally consistent",
"details": {
"cached latest version": "0.145.0",
"check for update on startup": "true",
"last checked at": "2026-07-22T14:22:04.036380264Z",
"latest version": "0.145.0",
"latest version status": "current version is not older",
"update action": "manual or unknown",
"version cache": "/home/gili/cat/.codex/version.json"
},
"remediation": null,
"durationMs": 262
}
}
}
What issue are you seeing?
I am seeing a major performance regression when switching agents or resuming sessions in version 0.145.0 compared to 0.144.6.
In version 0.144.6, switching agents using /agent was almost instantaneous. Resuming the session took ~15-30 seconds, not 8 minutes.
In version 0.145.0 resuming the session or using /agent to switch from a subagent back to the main agent takes 8 minutes to complete with little to no visible CPU, disk or network usage.
Switching from the main agent to a subagent remains fast.
What steps can reproduce the bug?
Uploaded thread: 019f6908-95ff-73d2-92c5-ba698e0e9bec
What is the expected behavior?
- Switching between agents using
/agentshould take no longer than 2 seconds - Resuming sessions should take no longer than 15 seconds. Consider showing a progress indicator for long operations.
Additional information
This is a long session, spanning continuous work over ~2-3 days of work.
4 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
@etraut-openai For what it's worth, in version 0.147.0 I'm able to
/resumelong sessions fairly quickly but switching back from a subagent to the main agent still seems to hang forever. I keep on having to kill codex and/resumeto return to the main agent.All this to say, it sounds like there are two separate bugs at play.
Closing this as fixed in 0.148.0
Reopening this issue as I'm seeing the behavior again in version 0.149.1. Maybe it was never fully fixed...