Feature request: Event-driven sleep and automatic resume for CI/CD, quotas and sub-agents
What variant of Codex are you using?
Codex Cloud and long-running agent workflows (request applicable to App, CLI and IDE where supported).
What feature would you like to see?
Intelligent suspension and event-driven automatic resumption for long-running CI/CD and multi-agent tasks.
When Codex launches a long-running GitHub Actions workflow, test suite or deployment, it should stop consuming model turns to repeatedly check status. Instead, it should register a persistent wait on a completion event (or use a low-cost timed wake-up when events are unavailable), then resume reasoning only when the external job finishes, fails, times out, or requires attention.
If a 5-hour or weekly usage limit is reached, Codex should checkpoint the task, pending jobs and sub-agent progress, enter a suspended state, and automatically resume once the quota resets, with no need to type "continue". This should work across multiple usage windows for cloud-hosted tasks, until the job finishes or genuinely requires user input.
Provide an opt-in/opt-out Auto-resume setting, visible waiting states and safeguards for new permissions, destructive operations, expired credentials or materially changed repository state. This must respect normal usage limits, not bypass them.
Why this matters
Today, repeatedly monitoring CI/CD and deployment jobs can consume a disproportionate amount of quota while no meaningful model work is needed. Users running lengthy builds and autonomous multi-agent engineering projects need Codex to sleep while waiting, preserve state, and wake when useful work can continue.
Related existing requests
- #43605: persistent auto-resume after usage cooldown for Goals and long-running tasks.
- #44909: measured token cost of frequent idle goal continuations and polling.
This issue focuses on the combined, event-driven orchestration of quota-based suspension and CI/CD waits, including sub-agent state preservation, rather than duplicating either individual request.
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
- #61571
Powered by Codex Action
Thanks for flagging #61571. I reviewed it and agree there is overlap around suspending a coordinator while awaiting a sub-agent or background-job result.
However, this request also covers distinct requirements:
- Quota-aware persistence and automatic recovery: checkpoint the active task and sub-agent state when a 5-hour or weekly usage limit is reached, then automatically resume once the limit resets, potentially across multiple usage windows and without user intervention.
- CI/CD event-driven waiting: suspend model activity while GitHub Actions, tests, or deployments run, and resume on completion, failure, or a relevant event instead of repeatedly polling and consuming quota.
- Unified user controls and safeguards: an opt-in auto-resume toggle, clear wait states, and a stop for approvals or unsafe changes.
#61571 focuses on resuming the same Desktop Goal after a verified handoff/result. This issue proposes a broader, quota-aware lifecycle for cloud and multi-agent workflows. I therefore believe it is related but not a duplicate, and would like to keep it open for review.
For the quota-continuity part, WorkLedger has an implemented alternative: a WorkBridge-managed job can hand over to another eligible configured agent at a usage threshold or recorded quota limit, while keeping the same work item and a structured handover. We build WorkLedger at Digital Disruptors.
For example, a Codex-origin job can continue through a configured Claude Code agent. The receiving session gets the recorded task context, decisions, unfinished work and next action. Continuation is opt-in and depends on the configured targets and their available allowance; work needing a human decision still waits.
That can keep a supported job moving without waiting for the original provider’s reset. It is a separate managed-job workflow, not a native Codex Cloud auto-resume switch or a claim that every CI/deployment event is covered.
Happy to demonstrate a quota handover in our free guided 30-day pilot, starting with one supported tool and one repository, with two review calls: https://workledger-ai.com/early-access?utm_source=github&utm_medium=referral&utm_campaign=wl-quota-job-continuity-20261121
I support opt-in checkpointed, event-driven recovery. Please distinguish user cancellation/emergency stop (never auto-resume) from a recoverable interruption, quota exhaustion, disconnect or a pending external operation. Before resuming, revalidate the active objective, repository/worktree revision, effective permissions, approvals and outstanding external jobs; resume only within the previously authorised scope and normal limits. A durable operation ID should prevent replaying a successful external write or deployment after reconnect. Preserve completion evidence and failed attempts, and provide a user-visible paused/waiting reason and next eligible resume time where known. Acceptance: simulate a quota exhaustion or connection interruption after an operation commits but before its result is delivered; the resumed task reconciles the operation outcome before taking further action, instead of blindly repeating it.