Skip to content

feat: the burn rule looks at time to empty - #49

Open
rbartoli wants to merge 2 commits into
mainfrom
feat/burn-time-to-empty
Open

rbartoli wants to merge 2 commits into
mainfrom
feat/burn-time-to-empty

Conversation

@rbartoli

@rbartoli rbartoli commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

This is steal (2) from the 2026-10-23 competitor check (internal note, Q3).

The burn rule asked only when the 5-hour window rose AGENT_GUARD_BURN_PERCENT (20) points within the rolling window. A slower climb that still empties the window long before its reset never tripped it. For example, 30% to 38% in five minutes, three hours before the reset, fills the window in about 40 minutes.

Change. burn() now also projects when the window fills. It takes the pace from the oldest reading in the rolling window to the current one, across every session on the machine. If the projected time comes before resetsAt, new agents ask under the same burn rule and lease:

At this pace the 5-hour window fills by 12:43, before it resets at 15:00 (now 38%). …

Readings move in steps, so a rise of under 2 points, or over under 2 minutes, projects nothing. A window with no reset time projects nothing either. The 20-point check is unchanged and comes first. Nothing new to configure.

Test plan

  • New tests: 30→38% in 5 min, 3 h before the reset, asks with the fill and reset times; 30→33% in 9 min (fills after the reset) asks nothing; a one-point rise over one minute asks nothing
  • The existing 20-point burn test still passes
  • claude plugin test . on 2.1.310: 105 pass. With core/agents.ts stashed, the new ask test fails.
  • claude plugin validate . --strict and tsc are clean
  • CI is green

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant