anthropics / anthropics/claude-code

[BUG] Cache expiry warning shown in VS Code extension but not in terminal CLI on --resume

Ouverte
#94,456 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
area:tui bug platform:vscode platform:windows
Langage dominant
Python
Étoiles
145k
Forks
23.1k
Métriques de merge des PR
Métriques de PR en attente

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?

When resuming a session that has been idle for days, the VS Code extension shows a warning like Idle 3d 7h. The prompt cache has likely expired, so your next message will re-cache about 594k tokens.

The same session resumed from the terminal with claude --resume shows no such warning.

Environment

CLI: 2.1.272 (Windows, PowerShell)
VS Code extension: anthropic.claude-code 2.1.270
Plan: Max subscription

### What Should Happen?

Expected: the warning should appear in both clients, since the cache state is a property of the session, not the client.

### Error Messages/Logs

```shell

```

### Steps to Reproduce

Leave a session with large context idle for several days
Open the workspace in VS Code — warning appears
Run claude --resume in PowerShell, select the same session — no warning

Expected: the warning appears in both clients, since the cache state is a property of the session, not the client

### Claude Model

Opus

### Is this a regression?

I don't know

### Last Working Version

_No response_

### Claude Code Version

2.1.272

### Platform

Anthropic API

### Operating System

Windows

### Terminal/Shell

PowerShell

### Additional Information

_No response_

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.