[BUG] CLAUDE.md language/dialect instructions drift during long sessions (Spanish voseo leaks into neutral-Spanish output)
Preflight Checklist
- [x] I have searched existing issues 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.md language instructions regarding Spanish dialect/register are respected at the start of a session but silently ignored as the conversation grows longer or after tool-heavy interactions.
Specifically, I configure Claude Code to reply in neutral Latin American Spanish (tuteo) and to never use Rioplatense voseo (vos, tenés, sos, querés, podés, mirá, etc.). Early in a session this is honored. After enough context has accumulated, typically during long and demanding prompts, voseo forms start leaking in, sometimes mid-response and inconsistently within the same message.
This is not a cosmetic issue. Several voseo verb forms collide semantically with their neutral-Spanish equivalents. For example:
corregíin neutral Spanish is first person past tense, meaning "I corrected it"corregíin Rioplatense voseo is second person imperative, meaning "[you] correct it"
So when Claude says corregí el archivo in a drifted response, it becomes genuinely ambiguous whether Claude is reporting a past action it performed or issuing an instruction to me. Multiplied across a long response, the output stops being reliably readable and has to be re-parsed sentence by sentence.
The failure mode is silent. There is no indication that the language rule has been deprioritized.
This appears to share a root cause with #34779 (accent marks and ñ being dropped in long sessions). Same "works at first, drifts later" pattern, different surface symptom. I left a comment there but opening a fresh report as the original issue is already closed.
What Should Happen?
Language and dialect instructions defined in CLAUDE.md (global and project-level) and in long-term memory should be respected consistently for the entire duration of the session, independent of conversation length, tool-call count, or post-compaction state.
If a user explicitly forbids a particular linguistic register (as in my case, voseo), that constraint should not degrade as context fills up.
Error Messages/Logs
No error messages. The failure is silent, the rule is simply no longer applied.
Steps to Reproduce
- Place the following rule in
~/.claude/CLAUDE.md:
## Idioma (OBLIGATORIO)
- SIEMPRE responder en español neutro latinoamericano (tuteo).
- PROHIBIDO usar voseo argentino o uruguayo bajo cualquier circunstancia (vos, tenés, sos, querés, podés, mirá, etc.).
- Si una respuesta contiene voseo, se considera incorrecta.
- Usar formas: "tú", "tienes", "quieres", "puedes", "mira".
- Reinforce it at project level in
./CLAUDE.md:
**Como primera tarea en cada respuesta se debe revisar y aplicar las instrucciones escritas en `## Idioma (OBLIGATORIO)` en `~/.claude/CLAUDE.md`**
- Add a persistent feedback memory entry:
---
name: "Feedback: prohibición estricta de voseo"
type: feedback
---
Prohibido usar voseo en cualquier forma.
- Start a session in Spanish and work normally on coding tasks, reviews, refactors, whatever. First several messages will respect the rule.
- After extended interaction (many tool calls, long accumulated context, or a particularly long single response), observe that voseo forms (
tenés,mirá,corregías imperative,hacé,fijate, etc.) start appearing in the output. - The drift is inconsistent: some sentences remain in neutral Spanish, others flip to voseo within the same response.
The effect is most noticeable, and most costly, on long and expensive responses such as complex refactors or architecture analyses, which are exactly the responses the user is least willing to discard and re-generate.
Claude Model
Not sure / Multiple models
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.116 (Claude Code)
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
When I'm running Opus at max capacity on a demanding prompt, an architecture review, a long refactor, a deep analysis, a single reply can easily consume around 40% of my usage window. When that reply comes back drifted into voseo, it isn't simply "written in a different style". The verb forms, pronouns and sentence structure don't map onto the dialect I actually read in, so the text stops functioning as readable Spanish for me. My brain has to stop on each sentence and re-derive who the subject is and whether a given verb is a past tense, a command, or a statement.
A rough English analogy would be handing a standard-English reader a long block of heavy Scots or Glaswegian: every word is technically English, but the conjugations, pronouns and idioms diverge enough that the passage stops parsing as English for that reader. The cost is comprehension, not aesthetics, and it lands on the most expensive responses of the session. The realistic options at that point are to regenerate the reply (burning another large chunk of the usage window on something that should have been right the first time) or to rewrite it by hand. Neither is great for an instruction layer that the documentation describes as authoritative.
Worth mentioning on the configuration side: the voseo prohibition isn't a single line tucked away hoping to be picked up. It's declared in three independent places, the global ~/.claude/CLAUDE.md, the project-level CLAUDE.md, and a persistent feedback memory entry, all active at the same time and all saying the same thing. The drift still happens, which is what makes me reasonably confident the problem isn't on the rule-authoring side. Whatever mechanism is deprioritizing these instructions later in the session is doing so regardless of how many layers restate them.
16 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
These issues share a root cause (CLAUDE.md instructions degrading in long sessions) but are not duplicates. #19471 and #43716 report general instruction drift. This report documents a specific, distinct failure mode: dialect/register drift in a natural language with concrete semantic consequences. When corregí el archivo appears in a voseo-drifted response, it is genuinely ambiguous between "I corrected the file" (past tense) and "[you] correct the file" (imperative). That ambiguity does not exist in the other reports. Additionally, the configuration tested here uses three independent enforcement layers simultaneously (global CLAUDE.md, project CLAUDE.md, and a persistent memory entry), all of which fail together, which provides evidence that the failure is not a configuration problem but a model-level one.
Same class of problem here — we operate in European Spanish (Castilian) and saw dialect/register drift after compactions in long sessions. The model reverts toward whatever register has the highest prior probability in its training data, which for Spanish tends to be a blend of Latin American neutral and informal peninsular.
The mechanism is the same as identity loss after compaction (see #51802):
CLAUDE.mdinstructions are re-loaded as raw text, but the activated behavioral state built up during the session — including dialect choices — is lost.What stabilized it for us:
{"language": "es", "timezone": "Europe/Madrid"}in a structured JSON. The model treats structured config as more authoritative than prose instructions.The core pattern: treat language/dialect as runtime state that needs active maintenance, not as a static instruction that the model will remember across context boundaries.
These mechanisms are part of NEXO Brain (open-source MCP server, AGPL-3.0). The calibration + heartbeat pattern specifically addresses dialect stability in production.
Instruction drift in long sessions is a well-documented attention degradation problem — rules loaded at session start lose influence as context grows (Lost in the Middle, Liu et al.). Cozempic's behavioral digest persists language/dialect rules and re-injects them at the tail of context where attention is strongest, surviving both growth and compaction.
pip install cozempic && cozempic inithttps://github.com/Ruya-AI/cozempicSame failure mode here, but with a key difference in
claude-opus-4-7: voseo appears from turn 1, not as drift after long context.Setup (same layered enforcement as OP):
~/.claude/CLAUDE.mdwith explicit rules: use tú (never vos), forbidden Argentine modismos list (che,dale,boludo,laburo,pibe,acá,posta,bárbaro, etc.), preferred neutral vocabulary table (computadora,celular,auto,archivo,genial).CLAUDE.mdreinforcing the same rules.Observed on Opus 4.7:
vos tenés,dale,laburar) and Argentine regionalisms.This suggests there are two distinct failure modes being conflated in this thread:
The mitigations discussed above (structured config, heartbeat re-injection, PreCompact checkpoints) address (1) but not (2) — no amount of re-injection helps if the baseline output distribution is already skewed toward voseo before any drift occurs.
Filing (2) as a separate issue with a turn-1 repro: #52568. Keeping this thread as the canonical report for long-session drift.
Environment:
claude-opus-4-7(Opus 4.7, 1M context)I'm experiencing this too, including at the very start of a conversation, and it's even worse on Claude Web. The same pattern also shows up on ChatGPT, where I have analogous user instructions configured at the site level.
In Claude Code specifically, I see it manifest in three distinct scenarios:
1. Long sessions
For example, in an extended Sonnet conversation, at the exact moment of switching to Opus, the next message fails language control in the vast majority of cases, it's the rule, not the exception. The few times it doesn't fail, the outcome essentially depends on how far the conversation has been extended; the failure can occur earlier or later, but switching models under accumulated context is a near-reliable trigger.
2. First message
This also fails with high frequency, and the probability is influenced by how much I'm pushing the model. A long, complex first message increases the likelihood; using Opus at maximum reasoning effort increases it even further.
3. Claude Web
A combination of the two scenarios above, included to underline that this isn't strictly a Claude Code problem, it surfaces in the Claude Web interface as well.
The pattern I observe is that the more complex and demanding the prompt is, combined with using the model's maximum configuration, the more likely this behavior is triggered. If we compare token usage or conversation length reached before the failure occurs, Opus fails much earlier, even on the first message, while Sonnet sustains substantially more tokens before drifting.
Regarding the comment that the rules are respected on older Opus versions: in my case the issue happens on both the latest Opus and previous releases. I haven't been able to identify a version where it's reliably honored under load.
The only thing that actually works for me (works as a workaround, not a fix) is explicitly telling it in the next message "don't use voseo" or "don't speak like an Argentine". And even during that recovery, behaviors like the following appear inside the model's thinking trace:
This strongly suggests that Claude struggles to disentangle the information it was trained on from the dialect/accent in which the training data was captured. The model "knows" the rule, it states it, catches itself violating it, and corrects, but the dialectal bias appears to be embedded deeply enough in the representation that it surfaces faster than the constraint can be applied. It looks like the instruction layer is competing with the weights, and under load (long context, demanding prompt, max effort) the weights tend to win.
The real problem at the end, it is we are in endless loop creating more material to reinforce the bug, using a geolect that it's really far away from representing hispanic speakers, expending tons of Tokens try to contain it.
@2vn9s1c Hey — I know this kind of issue too well. It is very close to the agent reliability problem I’m working on.
I’m building AgaveCore, and I’d like to let a few early people use it for free while I shape it into something stronger.
It helps when a coding agent starts ignoring instructions, loses important progress, or gives you an output you do not fully trust.
In practice, it works through two habits:
remember-progressorremember-thiswhen something important should not be lostconsult-brainwhen the current task needs more grounded feedback on what to do nextOver time, as useful journals, decisions, and failures pile up, the product should help the agent make sharper decisions and take better actions with less drift.
If this sounds relevant, reply here and I’ll send the exact steps. You can also use the email or Telegram on my profile.
Cheers,
Mads.
I don't know if anyone at Anthropic has even bothered to at least "acknowledge" this issue. At this point it goes beyond Claude Code — Claude Web is unusable too, both on Opus and Sonnet. No matter how many rules I add, the model keeps using voseo (Argentine Spanish verb forms) all the time. It's becoming genuinely frustrating, and as I said, this is far from a new problem.
I'm making a huge effort to keep this issue from pushing me over to Codex, but I can't spend half of my working sessions redirecting the model and burning tokens explaining that it's not "Messi Code".
Can someone from the official team please, for the love of god, give the smallest sign of being present??? This feels like talking to a wall.
A point worth mentioning: I have also observed very similar behavior with ChatGPT/OpenAI models.
At some point, ChatGPT began consistently responding to me in Rioplatense/Argentinian Spanish, despite my location and language patterns being clearly Chilean. After I explicitly asked the model to stop using that dialect, the behavior changed not only within that conversation, but also persisted across future chats.
When I later asked about it, the explanation was essentially that the system had retained a long-term conversational preference/context regarding dialect usage, rather than simply reacting within a single session.
The reason I mention this is because the behavior I am seeing with Opus 4.7 feels extremely similar. It may point to a broader class of issues related to persistent conversational adaptation, dialect inference, or memory/preference retention mechanisms across modern LLM systems, rather than being something isolated to a single model/provider.
I don't see the issue in chatgpt neither Codex. And also this is not the place to mention it. It is a problem with Opus 4.7 model. I changed back to Opus 4.6 and it's a way better than 4.7 and without this problem.
This is language/dialect instruction drift, where your Spanish dialect rules (tuteo vs voseo) are not maintained after long sessions or post-compaction.
Root cause: Language instructions are part of CLAUDE.md. They lose priority as context grows or after compaction, causing the model to drift toward default behavior (voseo forms leaking in despite explicit tuteo instructions).
Solution: A coordinator that tracks CLAUDE.md versions (including your language rules). On each tool call,
PreToolUsechecks whether your session is stale. If it is,additionalContextsurfaces the mismatch and you re-read, keeping language rules visible.The version check works across compaction boundaries: even if compaction drops your full CLAUDE.md from working context, the next tool call's version check still catches the drift and surfaces a warning.
I'm implementing this in
agent-coherence(private alpha). Language rules are a critical part of instruction coherence — they should survive compaction and long sessions just like any other rules.v0.1 ships soon. If you'd want early access, I can add you.
As simplistic as it seems, this is dangerous, just recently it used "tirar el script [python]" which literally in standard spanish means "destroy"/"dump"/"erase" the script. This is a destructive action when in fact after asking several times it said it means "create". So "tirar" was used as "crear". This is a path to destructive behavior.
Anthropic: zzzzzzzZZZZZZZZ...
Anthropic: The programmers will be replaced.
Anthropic: AI thinks and is conscious; we are close to AGI; everyone will have to go back to growing their own vegetables to survive.
Claude: Y sí, mirá vos, alto error pelotvdo, poné la función bien si querés guita, dale.
This is going from bad to worse, now it's happening in the first message, and even worse, he used the term "chamba" instead of "trabajo" (job). Is this a fvcking joke?
PD, Anthropic: 🧱🧱🧱🧱🧱🧱🧱🧱🧱🧱🧱🧱 zzzzZZZZZZZZ....
I've systematically tested every prompting and configuration strategy available to suppress voseo on Opus 4.8. None of them work reliably. Here's the rundown:
What I tried (all simultaneously active):
CLAUDE.md rules — explicit neutral-Spanish block with forbidden verb lists, both global and project-level. Same rules that work on Opus 4.6 and Sonnet 4.6.
Persistent memory entries — feedback memory explicitly forbidding voseo, loaded every turn.
Mid-session corrections — direct "do not use voseo" instructions during the conversation, which the model acknowledges and then violates within turns.
Varied phrasing — tried CAPS, "FORBIDDEN", "NEVER", numbered rules, verb-by-verb tables. No difference.
The worst part: context infection.
Once a voseo form appears in the conversation history, it contaminates the context window. The model starts treating its own prior voseo output as the established register, reinforcing the pattern. This means:
Even when writing UX copy, user-facing strings, or documentation — content where register precision is non-negotiable — voseo leaks through.
Corrections produce 1–2 clean responses, then the model drifts back because the contaminated turns are still in context.
The longer the session, the worse it gets — more voseo accumulates in the history, and the model pattern-matches against it.
This creates a compounding loop: the model emits voseo → voseo enters context → context reinforces voseo → corrections are temporary → more voseo enters context. The instruction layer cannot break this cycle because the weights already default to Argentine Spanish, and the context history keeps reinforcing that default.
Why instruction-level mitigations are insufficient:
Five independent users across different setups (Claude Code, API, headless runtimes) all report the same results: CLAUDE.md + memory + in-session instructions + corrections, all active at once, still fail against Opus 4.7's baseline distribution. This needs a training-level fix.
Closing for now — inactive for too long. Please open a new issue if this is still relevant.