Parent session waits indefinitely after resume because subagents remain paused
What version of Codex CLI is running?
codex-cli 0.144.3
What subscription do you have?
_No response_
Which model were you using?
gpt-5.6-sol, medium reasoning
What platform is your computer?
Windows 10 Pro x64, OS version 10.0.19042, locale zh-CN
What terminal emulator and version are you using (if applicable)?
WezTerm 20240203-110809-5046fc22
Codex doctor report
{
"schemaVersion": 1,
"overallStatus": "ok",
"codexVersion": "0.144.3",
"checks": {
"app_server.status": { "status": "ok", "summary": "background server is not running" },
"auth.credentials": {
"status": "ok",
"summary": "auth is configured",
"details": {
"auth storage mode": "File",
"stored API key": "false",
"stored ChatGPT tokens": "true",
"stored agent identity": "false",
"stored auth mode": "chatgpt"
}
},
"config.load": {
"status": "ok",
"summary": "config loaded",
"details": {
"config.toml parse": "ok",
"cwd": "<redacted workspace path>",
"feature flag overrides": "none",
"feature flags enabled": "35",
"mcp servers": "1",
"model": "gpt-5.6-sol",
"model provider": "openai"
}
},
"git.environment": {
"status": "ok",
"summary": "git version 2.54.0.windows.1",
"details": {
"repo detected": "true",
"repo root": "<redacted workspace path>",
"git branch": "<redacted>"
}
},
"installation": {
"status": "ok",
"summary": "installation looks consistent",
"details": {
"managed by npm": "true",
"managed by bun": "false",
"managed by pnpm": "false"
}
},
"mcp.config": {
"status": "ok",
"summary": "MCP configuration is locally consistent",
"details": { "configured servers": "1", "disabled servers": "0", "stdio servers": "1" }
},
"network.env": {
"status": "ok",
"summary": "network-related environment looks readable",
"details": { "proxy env vars": "none" }
},
"network.provider_reachability": {
"status": "ok",
"summary": "active provider endpoints are reachable over HTTP",
"details": { "ChatGPT base URL": "https://chatgpt.com/backend-api/ reachable (HTTP 403)", "reachability mode": "ChatGPT auth" }
},
"network.websocket_reachability": {
"status": "ok",
"summary": "Responses WebSocket handshake succeeded",
"details": {
"DNS": "1 IPv4, 0 IPv6, first IPv4",
"auth mode": "chatgpt",
"endpoint": "wss://chatgpt.com/backend-api/<redacted>",
"handshake result": "HTTP 101 Switching Protocols",
"model provider": "openai",
"supports websockets": "true",
"wire API": "responses"
}
},
"runtime.provenance": {
"status": "ok",
"summary": "running npm on windows-x86_64",
"details": { "commit": "unknown", "platform": "windows-x86_64", "version": "0.144.3" }
},
"sandbox.helpers": {
"status": "ok",
"summary": "sandbox configuration is readable",
"details": {
"approval policy": "OnRequest",
"filesystem sandbox": "restricted",
"network sandbox": "restricted"
}
},
"state.paths": {
"status": "ok",
"summary": "state paths and databases are inspectable",
"details": {
"CODEX_HOME": "<redacted>",
"active rollout files": "190 files, 258720510 total bytes, 1361686 average bytes",
"goals DB integrity": "ok",
"log DB integrity": "ok",
"memories DB integrity": "ok",
"state DB integrity": "ok"
}
},
"state.rollout_db_parity": {
"status": "ok",
"summary": "rollout files and state DB thread inventory agree",
"details": {
"rollout DB active files": "190",
"rollout DB active rows": "190",
"rollout DB model providers": "openai=190",
"rollout DB sources": "subagent:thread_spawn=174, cli=15, vscode=1",
"rollout DB stale rows": "0"
}
},
"system.environment": {
"status": "ok",
"summary": "OS language zh-CN",
"details": { "os": "Windows 10.0.19042 (Windows 10 Pro) [64-bit]", "os language": "zh-CN" }
},
"terminal.env": {
"status": "ok",
"summary": "terminal metadata was detected",
"details": {
"TERM_PROGRAM": "WezTerm",
"terminal": "WezTerm",
"terminal size": "211x48",
"terminal version": "20240203-110809-5046fc22"
}
},
"updates.status": {
"status": "ok",
"summary": "update configuration is locally consistent",
"details": { "cached latest version": "0.144.6", "latest version": "0.144.6", "latest version status": "newer version is available" }
}
}
}
What issue are you seeing?
When I pause the main agent and later resume it, the parent session can get stuck waiting for subagents.
The parent appears to believe that its subagents are still active or running and continues waiting for them. In reality, the subagents have already been paused and are not doing any work. The session can remain in this waiting state for a long time even though there is no child-agent progress to wait for.
This does not seem to consume many tokens, but it wastes wall-clock time and makes the session look alive while it is effectively stalled.
The current user workaround is to pause all agents and then resume them together. That appears to resynchronize the parent and child state, but it is manual, easy to miss, and poor UX for long-running multi-agent workflows.
What steps can reproduce the bug?
I do not yet have a minimal deterministic repro, but the observed workflow is:
- Start Codex CLI on Windows in WezTerm.
- Use
gpt-5.6-solwith medium reasoning. - Run a task where the parent agent dispatches one or more subagents.
- Pause the main agent while the parent/subagent workflow is active.
- Resume the main agent.
- Observe that the parent continues waiting for subagents.
- Inspect the child/subagent state: the subagents are paused and are not making progress.
- The parent keeps waiting as if the children are still running.
Workaround:
- Pause all agents.
- Resume all agents together.
- The parent/child lifecycle state appears to resynchronize and the workflow can continue.
What is the expected behavior?
When the parent agent is resumed, Codex should resynchronize parent/child lifecycle state.
Expected behavior:
- If child agents were paused with the parent, resume them as part of the same workflow.
- If child agents remain paused, the parent should not wait indefinitely as if they are still running.
- The parent should show a clear state such as "waiting for paused subagents" and offer an explicit resume-all action.
- Multi-agent wait paths should have bounded timeouts and converge to a recoverable state.
- The user should not need to manually pause all agents and resume all agents just to repair stale parent/child lifecycle state.
Additional information
Related issues found, but not exact duplicates:
- #33002: Multi-agent V2 regression: resumed root sessions cannot resume existing subagents
- #33999: Codex Desktop repeatedly routes to wait(noop) without a running exec cell, causing tool-call loops and stalled subagents
- #24951: multi_agent wait_agent/spawn_agent can block for hours
- #23700: Stale Codex subagents
- #31036: close_agent can hang indefinitely on previously interrupted subagent, blocking parent thread
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗