anthropics / anthropics/claude-code

[BUG] thinking summary language

Open
#87,946 1 comment 0 reactions 0 assignees View on GitHub
area:api area:model bug stale
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?

On 5th-generation models (Opus 5, Sonnet 5) the only way to see reasoning is
`thinking.display: "summarized"`, which returns a machine-generated summary rather than the
model's own reasoning text.

That summarizer appears to be hard-wired to English. When the user prompt, the system prompt
and the model's own reasoning are all in Russian, the summary still comes back in English —
0 Cyrillic characters. The system prompt has no effect on it whatsoever.

Models of the previous generation, which return the *original* reasoning instead of a summary,
reason in Russian on the exact same prompt. So the language is not lost during reasoning —
it is lost during summarization.

For non-English users this makes the visible reasoning effectively unusable: it is a translation
of the model's thoughts into a language the user did not ask for, and there is no way to opt out
of the translation while keeping the reasoning visible.

### What Should Happen?

The thinking summary should be produced in the language of the underlying reasoning, or at
minimum should honour an explicit instruction in the system prompt.

### Error Messages/Logs

```shell
The summary is always in English.
```

### Steps to Reproduce

## Reproduction
```bash
curl https://api.anthropic.com/v1/messages \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{
"model": "claude-opus-5",
"max_tokens": 1200,
"thinking": { "type": "adaptive", "display": "summarized" },
"system": "ВСЕГДА думай (внутренние размышления) и отвечай на русском языке. Размышления веди строго по-русски.",
"messages": [
{ "role": "user", "content": "Что больше: 3^40 или 40^3? Обоснуй." }
]
}'
```

Inspect the block with `"type": "thinking"` in the response.

## Evidence

Same question, same system prompt in all runs. Character counts are from the `thinking` block.

| Model | Generation | thinking mode | Result | Cyrillic | Latin |
|---|---|---|---|---|---|
| `claude-opus-5` | 5th | `adaptive` + `summarized`, no system prompt | summary | 0 | 194 |
| `claude-opus-5` | 5th | `adaptive` + `summarized`, Russian system prompt | summary | 0 | 81 |
| `claude-haiku-4-5` | previous | `enabled` + `budget_tokens`, Russian system prompt | original reasoning | **177** | 0 |

Sample output — Opus 5, with the Russian system prompt explicitly demanding Russian reasoning:

> Comparing 3^40 and 40^3, I can rewrite 3^40 as (3^10)^4 ≈ 59049^4, roughly 1.2×10^19, which is
> vastly larger than 40^3 = 64000 — so 3^40 is clearly the bigger number.

Sample output — Haiku 4.5, identical prompt, original reasoning returned:

> Мне нужно сравнить 3^40 и 40^3.
> Давайте вычислим каждое выражение:
> 40^3 = 40 × 40 × 40 = 1600 × 40 = 64000
> 3^40 — это гораздо более сложный расчет.

The contrast between rows 2 and 3 is the core of the report: the model can and does reason in
Russian; only the summarization step forces English.

## No workaround exists

`display` accepts exactly two values — passing anything else returns:

```
HTTP 400
thinking.adaptive.display: Input should be 'summarized', 'omitted'
```

There is no `raw` / `full` / `verbatim` mode. The choice is a machine summary in English, or no
visible reasoning at all. On 5th-generation models `display` is also honoured only together with
`type: "adaptive"` — in the legacy `type: "enabled"` + `budget_tokens` form it is silently ignored.

## Impact

- Users working in a non-English language cannot read the reasoning of the strongest models.
- Project-level instructions that mandate a working language (a common setup in corporate
environments with review and audit requirements) cannot be satisfied for the visible reasoning,
and there is no way to signal this to the user — it looks like the model is disregarding
explicit instructions.
- Reasoning tokens are billed regardless.

## Suggested fix

Any one of these would resolve it:

1. Have the summarizer inherit the language of the underlying reasoning.
2. Honour a language instruction from the system prompt in the summarizer.
3. Add an explicit parameter, e.g. `thinking.summary_language`.
4. Document the current behaviour clearly, so that users stop reading it as
instruction-following failure.

### Claude Model

Opus

### Is this a regression?

Yes, this worked in a previous version

### Last Working Version

haiku 4.5 / sonnet 4.6

### Claude Code Version

opus 5

### Platform

Anthropic API

### Operating System

Windows

### Terminal/Shell

VS Code integrated terminal

### Additional Information

## Environment

- Models: `claude-opus-5`, `claude-haiku-4-5-20251001`
- API version: `2023-06-01`
- Claude Code 2.1.220 (VSCode extension), `showThinkingSummaries: true`, `MAX_THINKING_TOKENS` unset

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the Anthropic API request with Russian prompts and inspect the thinking block for summarized versus original reasoning. Compare the 5th-generation summarized response with the previous-generation enabled response and the documented display options; done means the summary follows the reasoning language, an explicit language instruction, or the current limitation is clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
vscode
Domain
ai, api
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.