openai / openai/codex

[Feature Request] Focus Session — trade a full 5-hour allowance for one guaranteed 5-hour single-task session

Open
#45,083 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement rate-limits
Dominant language
Rust
Stars
125k
Forks
19.5k
PR merge metrics
PR metrics pending

Description

Summary

Codex is increasingly useful for long-running engineering work, but percentage-based usage limits are difficult to predict for complex agentic tasks.

A user may begin with 100% of the current 5-hour allowance, start one demanding task, and exhaust that allowance after a relatively short period of intensive agent work.

That may be valid from a compute-accounting perspective, but it creates a workflow problem:

How long can I actually let this task run uninterrupted?

I would like to propose an optional mode called Focus Session.

Focus Session would let the user voluntarily exchange flexibility and concurrency for predictability:

Consume the entire current 5-hour allowance up front, lock Codex to one task, and receive five guaranteed wall-clock hours of execution for that task.

This is not a request for unlimited parallel compute.

Focus is not additional capacity. It is exclusive capacity.


Normal mode vs. Focus Session

Normal mode Focus Session
Tasks Flexible Exactly one
Current 5-hour allowance Metered normally Consumed completely at activation
Weekly allowance Metered normally Paused
Credits Available Locked
New Codex chats Available Disabled
Other conversations Usable Read-only
Parallel execution Subject to normal limits Forbidden
Cancellation Normal behavior Focus cannot be cancelled
Duration Usage-dependent Exactly 5 wall-clock hours
Focus eligibility Once per calendar day

The two modes serve different workflows:

Normal mode optimizes for flexibility.
Focus Session optimizes for continuity.


Why this matters

For a complex task, a seemingly simple instruction such as:

Continue.

may cause Codex to perform substantial internal work: reload accumulated context, inspect files, execute commands, build, test, diagnose failures, modify code, validate results, and continue through multiple agent/tool cycles.

From the user's perspective, the experience may look like:

5-hour allowance: 100%

Start one complex engineering task

~15–20 minutes of intensive agent work

5-hour allowance: 0%

The accounting may be correct, but the amount of usable uninterrupted working time is unpredictable.

For serious agentic work, some users would reasonably prefer a different trade:

I am willing to give up every other Codex task for five hours if this one task can continue predictably.


Proposed behavior

1. Activation requirements

Focus Session may only be activated when:

  • the current 5-hour allowance is at 99–100%;
  • Focus has not already been activated during the current calendar day;
  • no other Focus Session is active.

Activation immediately performs the following transition:

Current 5-hour allowance → 0%

Focus Session → active for exactly 5 wall-clock hours

Weekly usage → paused

Maximum executable Codex/Work tasks → 1

The session becomes bound to the thread in which it was activated.

2. Strict single-task exclusivity

While Focus Session is active, only the selected thread may execute.

Inside that thread, the user may interact normally:

  • send follow-up instructions;
  • stop an individual agent turn;
  • correct the agent;
  • inspect results;
  • ask it to continue.

Outside that thread, Codex becomes read-only.

Until the Focus timer naturally expires:

  • no new Codex chat may be created;
  • no other Codex or Work task may be resumed;
  • no second task may execute from another device;
  • Credits cannot be spent;
  • quota resets cannot unlock another task;
  • Focus cannot be transferred to another thread;
  • Focus cannot be shortened or cancelled;
  • Focus cannot be ended early, either for free or by paying.

Stopping an individual agent turn does not stop or pause the Focus timer.

The core rule is simple:

Nothing may create a second executable Codex/Work task while Focus Session is active.

3. Irreversible activation

Because Focus is intentionally restrictive, activation should require explicit confirmation.

For example:

Start Focus Session?

Your entire current 5-hour allowance will be consumed.

For the next 5 hours:

  • only this task may use Codex or Work;
  • all other conversations will be read-only;
  • Credits will be unavailable;
  • weekly usage will be paused;
  • Focus cannot be cancelled, transferred, shortened, or bypassed;
  • unused Focus time will not be refunded if you stop working early.

Cancel
Consume 100% and start Focus

Once activated, the decision remains in force until the timer expires.


Daily reset behavior

Focus Session may be activated once per calendar day.

The daily Focus entitlement resets at 00:00 using a fixed account timezone.

However, midnight must not terminate, weaken, or unlock an already active Focus Session.

If a new day begins while Focus is active, the next day's allowance becomes available internally but remains locked until the current Focus Session ends.

Example A — Focus activated at 04:27
04:27
Focus starts
Current 5-hour allowance → 0%

04:27–09:27
Only the Focus task may execute

09:27
Focus ends

09:27–00:00
No new 5-hour allowance
Today's Focus entitlement has already been used

00:00
New daily allowance → 100%
Focus becomes eligible again
Example B — Focus activated at 22:20
22:20
Focus starts

00:00
A new calendar day begins

The next day's allowance becomes ready,
but remains locked because the existing Focus Session is still active

00:01–03:20
Only the original Focus task may execute

03:20
Focus ends

At 03:20, the new day's allowance becomes usable.

The user may then choose either:

A) Use the fresh 100% allowance in normal metered mode

or:

B) Activate the new day's Focus Session
   and continue for another five hours

This can produce up to ten consecutive Focus hours across two calendar days, but it never creates parallel compute.

At all times:

Maximum active Focus tasks = 1

Weekly allowance behavior

Weekly usage should be paused while Focus Session is active.

The user has already exchanged:

100% of the current 5-hour allowance
+
all concurrency
+
all task switching
+
Credits
+
the ability to cancel Focus

for one dedicated five-hour session.

Continuing to consume weekly allowance at the same time would make Focus double-metered rather than an alternative usage mode.

Normal weekly accounting resumes immediately when Focus ends.


Credits and quota resets

Credits remain untouched during Focus, but they cannot be used.

They are neither consumed nor lost. They simply remain unavailable until the session ends.

Likewise:

  • a manual quota reset;
  • a newly available daily allowance;
  • a device change;
  • a second client session;

must not override the active Focus lock.

Once Focus naturally expires, normal quota usage, Credits, task creation, and task switching become available again.


Service outages

User inactivity should not pause Focus time.

If the user closes the application, stops the current turn, or leaves the computer idle, the timer continues.

However, time lost because of a confirmed OpenAI-side outage or internal service failure could reasonably be restored by extending the Focus expiration time.

For example:

User stops working for 45 minutes
→ Focus timer continues

Confirmed OpenAI outage lasts 17 minutes
→ Focus expiration extends by 17 minutes

This preserves the strict nature of Focus without charging the user for time during which the service itself was unavailable.


Abuse prevention

Focus Session is intentionally restrictive.

It cannot be:

  • activated with only a small fraction of the 5-hour allowance remaining;
  • run in parallel;
  • moved between threads;
  • cancelled and reactivated;
  • bypassed through Credits;
  • bypassed through quota resets;
  • duplicated across devices;
  • weakened by midnight;
  • activated repeatedly during the same calendar day.

A server-authoritative Focus state and fixed account timezone would keep its behavior consistent across Codex surfaces.


Why this could benefit OpenAI too

This proposal is not simply asking for a larger quota.

It creates an explicit exchange between compute flexibility and compute predictability.

OpenAI receives a tightly constrained workload:

1 executable task
1 fixed session
0 parallel tasks
0 Credit-based bypass
0 early cancellation
1 daily activation

The user receives:

predictable execution time

This may be particularly useful for long-running coding, migration, build, testing, debugging, and repository-wide engineering tasks where continuity matters more than concurrency.


Suggested UI

Before activation:

5-hour allowance: 100%
Weekly allowance: 64%

[ Start Focus Session ]

During Focus:

FOCUS SESSION

Task
Production packaging correction

Time remaining
04:37:18

Weekly usage
Paused

Other Codex / Work tasks
Read-only until Focus ends

Credits
Locked until Focus ends

If midnight passes during Focus:

FOCUS SESSION

Time remaining
02:41:09

Next daily allowance
Ready — locked until Focus Session ends

Closing

Long-running agentic work has a different requirement from ordinary interactive prompting:

Predictability.

Some users would willingly give up concurrency, task switching, Credits, cancellation, and an entire short-window allowance in exchange for a clearly defined block of uninterrupted work.

Focus Session would make that trade explicit.

It would not provide unlimited parallel compute.

It would provide something much simpler:

One task. One session. Five predictable hours.

For users who rely on Codex for serious long-running engineering work, that could make the difference between treating it as an occasional assistant and treating it as a dependable engineering agent.

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, tests, or entry points are named in the issue. Start by identifying the existing usage, task, and session-state entry points; completion would require an agreed implementation plan covering activation, exclusivity, daily reset, expiration, and outage behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.