[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).
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗