[BUG] CLAUDE.md language instructions (Spanish accents) ignored inconsistently in long sessions
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code
What's Wrong?
CLAUDE.md files at multiple directory levels explicitly instruct Claude Code to use Spanish with correct accent marks (a, e, i, o, u, n). The instruction is respected at the start of a session but ignored intermittently as the conversation grows longer.
Directory chain loaded (4 CLAUDE.md files):
~/CLAUDE.md— global rules including: "Usar correctamente: tildes (a, e, i, o, u), ene (n), signos de apertura"~/Trabajo/RSM/CLAUDE.md~/Trabajo/RSM/RSM Peru/CLAUDE.md~/Trabajo/RSM/RSM Peru/MVP-Planillas/CLAUDE.md
Observed pattern:
- Early in session: Spanish accents appear correctly ("ano fiscal", "segun", "codigo")
- Later in session (after ~30+ tool calls): accents drop randomly ("ano", "segun", "codigo")
- The pattern is inconsistent — not every word, not every message
- The same CLAUDE.md instructions that were followed at the start are ignored later
In Spanish, missing accents changes meaning. "ano" (year) vs "ano" (anus) is not a cosmetic issue — it's a semantic error that makes professional documents unusable.
What Should Happen?
CLAUDE.md language instructions should be respected consistently throughout the entire session, regardless of conversation length or context window usage.
Error Messages/Logs
No error messages. The issue is silent — accents simply stop appearing without any indication that the instruction is being ignored.
Steps to Reproduce
- Create
~/CLAUDE.mdwith content including:
```
## Idioma
- Idioma por defecto: espanol
- Usar correctamente: tildes (a, e, i, o, u), ene (n), signos de apertura
```
- Start a long Claude Code session (30+ tool calls) in a project directory
- Early messages will use correct accents: "ano", "segun", "codigo"
- After extended interaction (context compression kicks in?), accents start dropping: "ano", "segun", "codigo"
- The degradation is gradual and inconsistent
Is this a regression?
I don't know
Claude Code Version
2.1.76 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
- Locale:
C.UTF-8(terminal encoding is NOT the cause — renders accents fine independently) - Model: Opus 4.6 (1M context)
- Hypothesis: CLAUDE.md instructions may be getting deprioritized or truncated as context window fills up during long sessions, possibly during automatic context compression.
- This affects professional document generation where accent correctness is mandatory (legal/financial documents in Spanish).
7 Comments
Related issues: This appears to be the same root cause as #32886 (which has
has reproandarea:corelabels).Our report adds an additional observation: the accent dropping worsens progressively as the conversation grows longer (30+ tool calls). Early in the session, CLAUDE.md instructions are respected. Later, they are ignored intermittently. This suggests the issue may be related to context compression deprioritizing CLAUDE.md instructions.
Also related: #13006, #26128.
I've run into a very similar pattern with Japanese language instructions in CLAUDE.md across long sessions. A few workarounds that have helped:
/compactproactively before the degradation window. If you consistently see it at ~30 tool calls, compact at ~25 with a summary that includes "Language: Spanish with proper diacritics." This reloads CLAUDE.md at full weight in the compacted context.The root cause is instruction adherence degrading under context pressure — it's a model-level issue. But CLAUDE.md positioning (rule 1) and proactive compaction (rule 3) together have made it manageable in my experience.
Reactivating this issue with additional context that explains the root cause.
Issue #32886 contains a detailed analysis of
cli.jsthat explains exactly why language instructions degrade in long sessions:Point 3 is directly responsible for what this issue describes: CLAUDE.md instructions working correctly at the start of a session and then silently failing after context compaction. It's not that the model forgets — it's that the compaction pipeline actively discards the language rules.
This is the same structural issue affecting Spanish (#26128, closed), German (#14131), Japanese (#15768), Chinese (#14287), Arabic (#34134), and others. It warrants a fix at the template/compaction level, not per-language workarounds.
Following up on this. The technical root cause is well documented (see my previous comment and #32886), but I want to emphasize why this matters beyond my specific case.
Claude Code is being used internationally to build production software for non-English-speaking clients. We developers may code and communicate in English, but our end users don't. We're building apps in Spanish, Japanese, German, Arabic, Chinese -- and Claude Code's output goes directly into user-facing interfaces, professional documents, and client deliverables.
This isn't a niche concern. Issues have been filed for Spanish (#26128), German (#14131), Japanese (#15768), Chinese (#14287), and Arabic (#34134). That's a pattern, not an edge case.
The fix is structural and has been identified:
These are small, targeted changes that would make Claude Code a truly international tool. Right now, it works perfectly for English users and degrades for everyone else. I know we're a minority in the developer community, but our clients aren't -- and they're the ones who see the broken output.
Closing — the root cause issue #32886 was fixed and closed on 2026-04-13 by @bcherny. The fix is included in Claude Code 2.1.110. Since both issues share the same structural root cause (language instructions lost during context compaction), this should be resolved as well. Will reopen if the behavior persists in long sessions after updating.
I used Claude for the translation because I don't speak English. I checked the reverse translation, and it perfectly reflects what I meant.
I'm leaving this note in case it feels like it was written by an AI.
---
Hi — I'd like to request that this issue be reopened. I'm hitting what I believe is the exact same underlying bug that @msouga reported, just with a different surface symptom, and I'd rather add context here than fragment the signal across a new issue.
Same root cause, different symptom
añovsano,segúnvssegun) are respected early in the session and silently dropped later.vos,tenés,sos,querés,podés,mirá, etc.). Claude Code respects this at the start of a session and then drifts into voseo after a while — exactly the same degradation pattern msouga describes.The fact that two different users, with different CLAUDE.md rules about Spanish, are seeing the same "works at first, ignored later" pattern strongly suggests this isn't a prompt-authoring problem on the user side. It's a context/instruction-persistence problem.
Why this is worse than a cosmetic issue
Voseo isn't just "an accent" — several verb forms collide semantically with neutral Spanish:
corregíin neutral Spanish = first person past tense ("I corrected it")corregíin Rioplatense voseo = second person imperative ("correct it [you]")When this happens in a long, technical response (e.g. a code review or a refactor plan), every instruction to me reads as a statement by Claude about itself, and vice versa. The output becomes genuinely ambiguous, not just stylistically off. Multiply that by many occurrences in a long response and the reply is effectively unusable — I have to re-read every sentence to figure out who is the subject.
Instructions I currently have configured
I am not under-specifying this. These rules exist in three separate layers, all of which are supposed to be authoritative:
1. Global
~/.claude/CLAUDE.md:2. Project-level
CLAUDE.mdreinforcement:3. A persistent memory entry (feedback type):
That is three redundant, explicit, hierarchical instructions all saying the same thing. And it still fails.
Observed pattern (matches msouga's)
What I'd like
CLAUDE.mdand memory not persisting reliably across long sessions.This has a multi-year history of being reported in various forms for Spanish specifically, and I suspect it affects other languages with strong regional registers too (Portuguese BR vs PT, Arabic dialects, etc.). It would be great to see it treated as a first-class correctness issue rather than a styling preference.
Thanks for taking a look.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.