[BUG] CLAUDE.md language/dialect instructions drift during long sessions (Spanish voseo leaks into neutral-Spanish output)

Resolved 💬 16 comments Opened Apr 21, 2026 by 2vn9s1c Closed Jul 7, 2026

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

  1. 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".
  1. 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`**
  1. Add a persistent feedback memory entry:
   ---
   name: "Feedback: prohibición estricta de voseo"
   type: feedback
   ---
   Prohibido usar voseo en cualquier forma.
  1. Start a session in Spanish and work normally on coding tasks, reviews, refactors, whatever. First several messages will respect the rule.
  2. 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.
  3. 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.

View original on GitHub ↗

16 Comments

github-actions[bot] · 2 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/19471
  2. https://github.com/anthropics/claude-code/issues/39502
  3. https://github.com/anthropics/claude-code/issues/43716

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

2vn9s1c · 2 months ago

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.

wazionapps · 2 months ago

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.md instructions 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:

  1. Language field in a calibration file — not just "respond in Spanish" but {"language": "es", "timezone": "Europe/Madrid"} in a structured JSON. The model treats structured config as more authoritative than prose instructions.
  1. Heartbeat re-injection — every user message triggers a lightweight MCP call that returns the user's language/timezone/name. This acts as a constant reinforcement signal that survives compaction because it's re-injected on every turn, not stored in context.
  1. PreCompact checkpoint — before compaction, we write the active language/dialect state to a checkpoint file. Post-compaction, the system reads it back. The key insight is that the compaction summary doesn't preserve style metadata — only task metadata.

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.

junaidtitan · 2 months ago

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 init https://github.com/Ruya-AI/cozempic

diegoesolorzano · 2 months ago

Same 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):

  • Global ~/.claude/CLAUDE.md with explicit rules: use (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).
  • Project-level CLAUDE.md reinforcing the same rules.
  • Persistent feedback memory entry forbidding voseo.

Observed on Opus 4.7:

  • First response in a fresh session already contains voseo (vos tenés, dale, laburar) and Argentine regionalisms.
  • Correcting mid-conversation produces 1–2 clean responses, then drifts back.
  • Same ruleset on Sonnet 4.6, Opus 4.6 and Opus 4.1 honors neutral Spanish reliably throughout the session.

This suggests there are two distinct failure modes being conflated in this thread:

  1. Long-session dialect drift (this issue, cross-model) — attention degradation / post-compaction state loss, as already described.
  2. Opus 4.7 baseline bias toward Argentine Spanish — reproduces from turn 1 with no accumulated context; looks like a post-training / RLHF weighting issue in the 4.7 training mix, not context management.

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)
  • Claude Code 2.1.119
  • macOS Darwin 25.4.0
  • Anthropic API
2vn9s1c · 2 months ago
El mismo modo de fallo aquí, pero con una diferencia clave en claude-opus-4-7: voseo aparece desde la curva 1, no como un drift después de un contexto largo. Configuración (mismo nivel de aplicación que el OP): Global ~/.claude/CLAUDE.mdcon reglas explícitas: usar (nunca vos ), lista de modismos argentinos prohibidos ( che, dale, boludo, laburo, pibe, acá, posta, bárbaro, etc.), tabla de vocabulario neutral preferido ( computadora, celular, auto, archivo, genial). CLAUDE.mdReforzando las mismas reglas a nivel de proyecto . Entrada de memoria de retroalimentación persistente que prohíbe voseo. Observado en Opus 4.7: La primera respuesta en una sesión nueva ya contiene voseo ( vos tenés, dale, laburar) y regionalismos argentinos. Corregir a mitad de la conversación produce 1 o 2 respuestas claras, y luego se vuelve a la misma línea. El mismo conjunto de reglas en Sonnet 4.6, Opus 4.6 y Opus 4.1 respeta el español neutral de forma fiable durante toda la sesión. Esto sugiere que en este hilo se están confundiendo dos modos de fallo distintos : 1. Desviación dialectal en sesiones largas (este problema, entre modelos): degradación de la atención / pérdida de estado posterior a la compactación, como ya se ha descrito. 2. Opus 4.7 presenta un sesgo de base hacia el español argentino , que se reproduce desde el turno 1 sin contexto acumulado; parece un problema de ponderación posterior al entrenamiento/RLHF en la mezcla de entrenamiento 4.7, no de gestión del contexto. Las medidas de mitigación analizadas anteriormente (configuración estructurada, reinyección de latidos, puntos de control de PreCompact) abordan (1) pero no (2): ninguna cantidad de reinyección ayuda si la distribución de salida de referencia ya está sesgada hacia voseo antes de que ocurra cualquier desviación. Se archiva (2) como un problema separado con una reproducción de turno 1: #52568 . Se mantiene este hilo como el informe canónico para la deriva de sesión larga. Ambiente: claude-opus-4-7(Opus 4.7, contexto 1M) Claude Código 2.1.119 macOS Darwin 25.4.0 API antrópica

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:

Claude (thinking): "Sorry, I won't use voseo..." Claude (output): "Mirá la expresión de la función..." (voseo) Claude (thinking): "Wait, I said I wouldn't use voseo..." (self-correction within the same reasoning pass) Claude (output): "Observa la expresión de la función..." (corrected)

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.

raimundoconchav-cmd · 2 months ago

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.

mahdikayvan · 2 months ago

@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:

  • tell the agent to remember-progress or remember-this when something important should not be lost
  • use consult-brain when the current task needs more grounded feedback on what to do next

Over 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.

2vn9s1c · 2 months ago

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.

andreeliz · 2 months ago
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.

diegoesolorzano · 2 months ago
> 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.

hipvlady · 2 months ago

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, PreToolUse checks whether your session is stale. If it is, additionalContext surfaces 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.

arielmol · 1 month ago

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.

2vn9s1c · 1 month ago

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....

panchoavila · 1 month ago

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.

github-actions[bot] · 9 days ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.