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

オープン
#93,808 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
api:anthropic area:core bug platform:linux regression
主要言語
Python
スター
145k
フォーク
23.1k
PR マージ指標
PR 指標を取得中

説明

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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

領域
api, cli
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
48/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。