anthropics / anthropics/claude-code

[BUG] Title: 2.1.26x rejects >200K prompts on Max subscription ("Prompt is too long"); 2.1.257 serves the same 664K prompt

Ouverte
#93,808 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
api:anthropic area:core bug platform:linux regression
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?



▎ Claude Max (claude.ai OAuth). Same resumed session, same 663,871-token prompt (~1.2 MB of @-injected files + history), same account, same day.
▎ - 2.1.257: served by claude-fable-5-1, 663,871 input tokens.
▎ - 2.1.269: API invalid_request: Prompt is too long on claude-fable-5-1, claude-fable-5, and claude-opus-4-8[1m] — the last of which carried this same conversation at
▎ 679,998 tokens on 2.1.197 (2026-07-01).
▎ - Not set: CLAUDE_CODE_DISABLE_1M_CONTEXT, ANTHROPIC_BETAS. CLAUDE_CODE_DISABLE_UNKNOWN_MODEL_WINDOW_ENFORCEMENT=1 made no difference. autoCompactEnabled: false.
▎ - Downgrading to 2.1.257 fixes it immediately. Suspect the 1M-context/Fable changes in v2.1.260–2.1.261. Same class as #43989 / #34158 / #11281.

### What Should Happen?

Letting me continue a >200k token conversation the previous version did fine

### Error Messages/Logs

```shell
⎿  Context limit reached · /compact or /clear to continue · auto-compact is off ·
/config to turn it on
```

### Steps to Reproduce

Take the same >200k conversation without compacting and try to continue, with both installed, one launched with
~/.local/bin/claude-2.1.257

or equivalent, instead of claude (where it will work)

and another with ~/.local/bin/claude-2.1.269

where it will request a compact, essentially negating the 1M context feature of the models

### Claude Model

None

### Is this a regression?

Yes, this worked in a previous version

### Last Working Version

2.1.257

### Claude Code Version

2.1.269

### Platform

Anthropic API

### Operating System

Ubuntu/Debian Linux

### Terminal/Shell

Terminal.app (macOS)

### Additional Information

_No response_

Guide de contribution

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

Piste de recherche

Reproduce the resumed 663,871-token conversation with ~/.local/bin/claude-2.1.257 and claude-2.1.269, keeping auto-compaction off. Compare the context-window enforcement behavior around versions 2.1.260–2.1.261 and verify whether the listed environment variables affect it. Done means version 2.1.269 continues the same conversation without requesting /compact.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Domaine
api, cli
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
Active
Clarté
Plutôt claire
Accessibilité débutants
48/100

Recevez les nouvelles issues par e-mail

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