anthropics / anthropics/claude-code

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

Abierto
#94,456 0 comentarios 0 reacciones 0 asignados Ver en GitHub
area:tui bug platform:vscode platform:windows
Lenguaje dominante
Python
Estrellas
145k
Forks
23.1k
Métricas de merge de PR
Métricas de PR pendientes

Descripción

### 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_

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.