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
Resuscitate stopped agent trees after provider disconnects/quota exhaustion/reboots #22033
Codex should provide a way to recover an agent/subagent tree after transient infrastructure failures such as network loss (hence failure to connect to OpenAI), quota exhaustion, and host machine reboots.
Requested behavior:
Persist parent-child agent tree state durably.
Preserve each agent's task, last status, and failure/interruption reason.
Distinguish quota exhaustion, transport failure, timeout, user interruption, and normal completion.
Provide a user-visible command/action to resume a stopped tree (or multiple trees, handy when working in multiple projects at the same time).
Optionally auto-resume eligible agents after connectivity returns or quota resets.
Avoid resuming agents that completed normally, were explicitly cancelled, or require user approval.
This is broader than ordinary session resume: the goal is recursive recovery of the active multi-agent work tree.
Additional information
Current possible workarounds
Currently, a possible workaround is to manually text each agent to ask it to wake up its subagents (asking is necessary, since otherwise it's not possible to derive the state, check #16900 (comment)), ask them to resume their work if they suffered from this sort of issues (disconnections/quota exhaustion), to this for their subagents of their own (if applicable) as well, and that this message should be recursively propagated down the agent tree.
This could be packaged into a skill, and then it's a matter of calling the skill in each of the top sessions that were running. But of course, this is likely more frail than a built-in Codex feature for this.
This issue is asking for a tree-level recovery mechanism: persist the parent-child agent graph, preserve each agent's task/status/interruption reason, distinguish quota exhaustion vs transport failure vs timeout vs cancellation vs normal completion, and provide a way to resume eligible stopped agents recursively across one or more active agent trees.
A fix for either suggested issue would help, but would not fully satisfy this request unless it also supports recursive agent-tree recovery and selective resume semantics.
changed the title [-]Resuscitate stopped agent trees after provider disconnects or quota exhaustion[/-][+]Resuscitate stopped agent trees after provider disconnects/quota exhaustion/reboots[/+]on Jul 4, 2026
Resuscitating stopped agent trees — same problem I hit with overnight Codex tasks dying silently. agentwatch watches ~/.codex's sqlite stores (per-turn status, goals, logs) + rollout JSONLs, detects orphaned inProgress turns / stalls / disconnects, and revives the exact thread via codex exec resume or codex queue (auto-routed by thread source; queue only works while a surface holds the thread). Verifies resumption, escalates via ntfy/webhook when retries are exhausted. MIT, zero deps: https://github.com/piemvibes-hue/agentwatch
Activity
github-actions commentedon May 10, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
diogovalada commentedon May 10, 2026
I reviewed the suggested duplicates. I think this issue is related to both, but not a duplicate.
This issue is asking for a tree-level recovery mechanism: persist the parent-child agent graph, preserve each agent's task/status/interruption reason, distinguish quota exhaustion vs transport failure vs timeout vs cancellation vs normal completion, and provide a way to resume eligible stopped agents recursively across one or more active agent trees.
A fix for either suggested issue would help, but would not fully satisfy this request unless it also supports recursive agent-tree recovery and selective resume semantics.
diogovalada commentedon Jul 4, 2026
Also, I forgot: host machine reboots.
If I for some reason I have to reboot my machine, would be cool not to have to manually ressuscitate all the threads
[-]Resuscitate stopped agent trees after provider disconnects or quota exhaustion[/-][+]Resuscitate stopped agent trees after provider disconnects/quota exhaustion/reboots[/+]piemvibes-hue commentedon Oct 8, 2026
Resuscitating stopped agent trees — same problem I hit with overnight Codex tasks dying silently. agentwatch watches
~/.codex's sqlite stores (per-turn status, goals, logs) + rollout JSONLs, detects orphaned inProgress turns / stalls / disconnects, and revives the exact thread viacodex exec resumeorcodex queue(auto-routed by thread source; queue only works while a surface holds the thread). Verifies resumption, escalates via ntfy/webhook when retries are exhausted. MIT, zero deps: https://github.com/piemvibes-hue/agentwatch