openai / openai/codex

Do not interrupt an active Codex task when the 5-hour usage limit is reached

Open
#42,275 2 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug rate-limits
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What version of the Codex App are you using (From “About Codex” dialog)?

26.825.51511

What subscription do you have?

ChatGPT Plus

What platform is your computer?

macOS

What issue are you seeing?

Codex stops an active coding task immediately when the 5-hour usage limit is reached, even if the task was started while usage was still available.

This can leave the repository in a partially modified and unvalidated state. Previously, active tasks appeared to be allowed to finish before further usage was blocked.

I would expect Codex to let the currently running task reach a safe completion point and only block the next task after the usage limit is exhausted.

What steps can reproduce the bug?
  1. Use Codex normally until the remaining 5-hour usage quota is low (for example, around 5–10%).
  2. Start a coding task that requires multiple steps, such as modifying several files, running tests, and validating the implementation.
  3. Let Codex continue working until the 5-hour usage quota reaches 0%.
  4. Observe that Codex stops the active task immediately when the quota is exhausted.
  5. The task may stop after code changes have already been made but before tests, validation, fixes, or the final completion step are finished.

Expected behavior:
If a task was accepted and started while usage was still available, Codex should allow that active task to reach a safe completion point and only block starting the next task.

What is the expected behavior?

If Codex starts a task while usage quota is still available, the active task should be allowed to reach a safe completion point even if the 5-hour usage limit is reached during execution.

Codex should then block the next task or prompt until the usage window resets.

Ideally, any usage beyond the current window could be deducted from the next window, or Codex could reserve enough quota before starting a long task. The important behavior is that an active repository-changing task should not be interrupted halfway through implementation or validation.

Additional information

This behavior is especially disruptive for long-running agentic coding tasks.

A Codex task may modify many files before reaching the testing and validation stages. If the usage limit interrupts execution at that point, the repository can be left in a partially implemented state with no final validation or completion summary.

This also makes the remaining usage percentage difficult to rely on. Even when Codex accepts a task while quota is still available, there is currently no clear indication that the task may be terminated before completion.

I am not necessarily asking for the 5-hour limit to be removed. The main request is to avoid interrupting a task that has already been accepted and is actively modifying the repository.

Possible approaches could include allowing the active task to finish and deducting excess usage from the next window, reserving quota when the task starts, or warning/blocking the task before execution if there is insufficient quota to complete it safely.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by tracing the 5-hour quota check at task start and during execution; confirm an accepted task can reach a safe completion point while a subsequent task is blocked after exhaustion.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos
Domain
cli
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.