/agent command takes extremely long to switch back to the main agent
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start by reproducing the regression with /agent and session resume in Codex CLI 0.145.0 using the uploaded thread 019f6908-95ff-73d2-92c5-ba698e0e9bec, then compare behavior with 0.144.6. Focus on the long-session path and the difference between switching to a subagent and switching back to the main agent. Done means agent switching completes within 2 seconds and session resume within 15 seconds, or provides progress for longer operations.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
A-linter
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxc-project/oxc#26863 ·