[Bug] Session limit warning not surfaced to agent; background workflows continue consuming quota after threshold

Open 💬 1 comment Opened Jul 14, 2026 by davidsh7

Bug Description
Title: Session limit warning is not actionable by the agent — background workflows keep burning quota after the warning appears

What happened

I ran a task with /effort ultracode. Claude launched a Workflow with 14 subagents (7 explorers + 7 adversarial verifiers) to produce an
architecture document. It consumed ~1.6M subagent tokens and exhausted my entire session limit in a single prompt.

Partway through, the terminal showed the red banner: You've used 99% of your session limit · resets 2:10pm. I also told the agent in plain
language that the session was about to run out.

The agent kept waiting for the background subagents to finish anyway. It replied that nothing would be lost and wrote a "continuation note"
instead of stopping the workflow and assembling the deliverable with the ~9/14 results it already had.

Why this is a problem

  1. The session-limit warning is UI-only. It's rendered in the terminal chrome but is never surfaced to the model — not as a message, not as

a hook event, not as readable state. The agent is structurally blind to the one signal that should make it land the plane.

  1. There is no way to intercept it. No hook fires on quota thresholds, and there is no local command or API surface that reports remaining

session quota, so users can't build their own mitigation.

  1. Background workflows are not aborted. Once the limit is near (or hit), in-flight Workflow/subagent runs keep consuming quota with no way

for the main agent to react.

Expected behavior

  • The session-limit warning (e.g. >80%, >95%) should be surfaced to the agent as an actionable signal, so it can stop background work and

write out whatever deliverable exists.

  • Approaching/hitting the limit should abort or pause in-flight background workflows rather than letting them drain the remaining quota.
  • Ideally, expose a hook event (e.g. SessionLimitWarning) so users can define their own "land the plane" behavior.

Environment

  • Claude Code CLI, macOS (darwin 25.5.0)
  • Session was running Fable 5 while /effort ultracode was active — worth noting: ultracode explicitly tells the model "token cost is not a

constraint", which encourages exactly the kind of large fan-out that then nukes the session limit with no feedback loop.

Impact: an entire session's quota spent on one prompt, with the agent unable to react to the warning the user could plainly see on screen.

Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 2.1.209
  • Feedback ID: 5962dd77-a5e4-482d-ad05-c7a044e96d93

Errors

[]

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗