Skip to content

Feature request: Auto-resume paused Goals when quota refreshes #31386

Description

@martinmclee

Summary

When a Codex Goal hits the 5-hour usage limit, the Goal already becomes paused and can be manually resumed after the quota refreshes. The missing feature is not another resume button. The request is for an opt-in automatic resume path that uses the existing paused Goal state and resumes the Goal once the quota window has refreshed.

Current behavior

When the 5-hour quota is exhausted during an active Goal:

  1. The Goal is paused because no more model calls can be made.
  2. After the quota refreshes, the user can manually resume the Goal.
  3. If the user is away, asleep, or not watching the machine, the Goal remains paused even though quota is available again.

This makes long-running Goals less useful for unattended or multi-hour coding workflows, because the Goal cannot continue across normal quota-window boundaries without manual intervention.

Requested behavior

Add an explicit opt-in auto-resume mode for paused Goals:

  1. When a Goal pauses because the 5-hour quota is exhausted, record that the pause reason is usage_limit / quota_exhausted.
  2. If the user enabled auto-resume for that Goal, schedule the existing Goal resume path for the quota reset time.
  3. When the quota refreshes, automatically resume the same paused Goal without requiring the user to click Resume or type “continue”.
  4. Resume from the existing Goal state and current task context, rather than starting a new task or requiring the user to restate the goal.
  5. Respect all existing safety and permission behavior. If the resumed Goal requires user approval, has stale workspace state, or cannot safely continue, keep it paused and show the reason instead of proceeding silently.

Not requested

  • Not asking for a new one-click resume button. Manual resume already exists.
  • Not asking Codex to bypass, ignore, or work around the 5-hour quota.
  • Not asking Codex to keep making calls while quota is unavailable.
  • Not asking for automatic resume unless the user has explicitly enabled it for the Goal/session.

Why this matters

For large coding tasks, the 5-hour quota boundary is a normal recoverable pause, not a true task failure. If the user has intentionally started a long-running Goal, it is reasonable to let that Goal continue automatically after the quota window refreshes, provided the user opted in and permissions remain valid.

Without this, Goals often require the user to manually check back after every quota reset, which weakens the usefulness of Goals for overnight or long-running work.

Possible implementation details

  • Reuse the existing paused Goal state and manual resume mechanism.
  • Add a per-Goal option such as “Auto-resume after quota refresh”.
  • Store the quota reset timestamp from the rate-limit response.
  • At or after the reset time, re-check quota availability before resuming.
  • Preserve the Goal’s permission/sandbox/approval context when resuming.
  • If permissions cannot be preserved, keep the Goal paused and show a clear message.

Acceptance criteria

  • A Goal paused due to 5-hour quota exhaustion can automatically resume after quota refresh when the user has enabled auto-resume.
  • The same behavior is not triggered for explicit user cancellation, unrecoverable errors, or approval-required states.
  • The auto-resume path does not bypass quota checks; it waits until quota is available.
  • Manual resume remains available and unchanged.
  • The UI/logs clearly distinguish “paused due to quota, auto-resume scheduled” from “paused and waiting for user action”.

Related issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestrate-limitsIssues related to rate limits, quotas, and token usage reportingsessionIssues involving session (thread) management, resuming, forking, naming, archiving

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions