[FEATURE] Grace Buffer for Active Tasks When Reaching Usage Limits

Resolved 💬 3 comments Opened May 8, 2026 by joseba83 Closed May 12, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Summary
When a usage limit (e.g. 5-hour session or weekly cap) is reached while an agentic task is actively running, the system cuts execution immediately. This results in incomplete tasks and a frustrating user experience, especially when the limit is hit mid-process.

Proposed Solution
Introduce a small grace buffer (e.g. +5%) that allows an in-progress task to complete if it was already running when the limit was reached.

How it would work:

  • If a task is actively executing when the usage limit hits 100%, allow up to an additional 5% of resources to be consumed in order to finish that task.
  • This extra 5% is debited from the next usage window, so the pool starts at 95% instead of 100% after reset.
  • No grace buffer would be granted if the user deliberately submitted a very large task after the limit was nearly reached — this is purely for tasks already in flight.

Why this matters
Right now, if you submit a task at 99% usage and it runs over the limit by a small margin, the entire execution is terminated abruptly. A 5% grace window would cover the vast majority of normal in-progress tasks without meaningfully impacting resource fairness, while significantly improving the user experience for agentic workflows.

Expected behavior

  • Task submitted before limit → allowed to finish using the grace buffer
  • Grace buffer consumed → deducted from next window (e.g. next session starts at 95%)
  • No additional tasks can use the grace buffer once a session buffer it is consumed

Current behavior
Task is cut off immediately when the limit is reached, regardless of execution state.

Proposed Solution

Expected behavior

  • Task submitted before limit → allowed to finish using the grace buffer
  • Grace buffer consumed → deducted from next window (e.g. next session starts at 95%)
  • No additional tasks can use the grace buffer once a session buffer it is consumed

Alternative Solutions

_No response_

Priority

Medium - Would be very helpful

Feature Category

Other

Use Case Example

_No response_

Additional Context

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗