anthropics / anthropics/claude-code

[BUG] [New Version Issue: v2.1.270] Random Session Expiry with reset time >5 hours beyond current time.

Open
#93,955 3 comments 0 reactions 0 assignees View on GitHub
api:anthropic area:cost bug platform:macos
Dominant language
Python
Stars
145k
Forks
23.1k
PR merge metrics
PR metrics pending

Description

### Preflight Checklist

- [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) 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?

Claude suddenly reset my 5hr window by suggesting limit used but the return time was set for almost 6 hrs from the time the reset was applied.

This is very strange because, my then current session had 1 hr remaining to session reset. This made me wait 6 hours (from the time of reset).

### What Should Happen?

Session should only restrict you from the sliding window of the session not 5hrs from the time when claude perceived the 5h session limit is reached.

### Error Messages/Logs

```shell

```

### Steps to Reproduce

1. Use claude code normally
2. Burn tokens upto for 4 hrs with 1 hr remaining for the 5hr window.
3. Burn up to 100%
4. Usage restricted for 5hrs from the time it hit 100% not 1 hr because 100% is reached at 4th hr of the session.

### Claude Model

Sonnet (default)

### Is this a regression?

Yes, this worked in a previous version

### Last Working Version

_No response_

### Claude Code Version

2.1.270

### Platform

Anthropic API

### Operating System

macOS

### Terminal/Shell

VS Code integrated terminal

### Additional Information

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.