[BUG] Reaching the 5-hour session limit kills in-flight workflow agents instead of pausing them

Status Open
Reported on v2.1.271
Maintainer reply None cached
Activity 2 comments · opened Sep 30, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When the 5-hour session limit is reached in the middle of a Workflow run, the agents still running fail with "You've hit your session limit" instead of pausing. On 2026-09-28, 26 in-flight agents of one run failed this way. Plain background agents (the Agent tool) have no pause at the limit either.

Agents that had already finished stay saved, and resumeFromRunId after the reset re-runs only the failed ones, so no finished work is lost, but the run has to be resumed by hand.

What Should Happen?

The 2.1.271 changelog says dynamic workflows pause at the usage limit and continue automatically after the reset instead of dropping agents. The run should pause and continue on its own after the reset.

Error Messages/Logs

Steps to Reproduce

  1. Start a Workflow that runs many agents in parallel (here a research run of 26+ agents) close to the 5-hour session limit.
  2. Let the limit be reached while agents are still running.
  3. The running agents end with "You've hit your session limit"; the run neither pauses nor continues after the reset.
  4. After the reset, re-run with resumeFromRunId: only the failed agents run again.

Claude Model

_No response_

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.281 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

Claude desktop app (Code tab), Windows 11 Home 10.0.26200. Not re-run on a later version, because reproducing it means exhausting the 5-hour limit on purpose; no changelog entry through 2.1.285 mentions a fix.

View original on GitHub ↗

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