[BUG] Opus 4.6 performance deterioration, ignored memory.md and all conversation context. Completely out of alignment with instructions.

Resolved 💬 3 comments Opened Apr 9, 2026 by gogipav14 Closed Apr 13, 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?

Summary of Issues

  1. Ignored Memory — XPU Environment

Memory file feedback_xpu_preference.md states the user has an Intel Arc XPU and actively uses it. Memory file project_dual_gpu_setup.md documents RTX 5060 (CUDA) + Intel B280 (XPU, 12.5GB) with a separate venv at /home/gogip/xpu_venv. Despite this being loaded in context, I:

Never proactively checked the XPU venv compatibility before launching Pythia on it
Launched a process with a broken PyTorch/IPEX version mismatch (torch 2.11 vs IPEX expecting 2.8) that silently burned CPU for over an hour doing nothing
Only discovered this after the user asked "is the intel actually computing anything?"

  1. Ignored Memory — Process Safety

Memory file feedback_dont_kill_processes.md explicitly states: "never kill GPU training runs without explicit user permission; output buffering ≠ hung." Despite this, I:

Killed PID 65379 (Gemma 4 QAT) without asking the user first
Killed PID 63730 (Pythia XPU) — though this one was genuinely broken, I should have presented findings and asked before killing

  1. Repeated Failures on Gemma 4 Loading

Multiple failed attempts to load Gemma 4 E2B:

First run: transformers 5.3 didn't recognize gemma4 config
Upgraded to 5.5: key mismatch (model. prefix), all weights UNEXPECTED/MISSING — I ran the full analysis on randomly initialized weights and presented the results as real findings before noticing
Upgraded to 5.6.0.dev0: same key mismatch
Fixed with direct safetensors loading: worked for analysis
QAT attempt: used Gemma4ForConditionalGeneration which loaded weights correctly but the model produced PPL >100k on text — spent multiple iterations debugging logit softcapping before abandoning
This consumed significant context and user patience across ~10 tool calls that could have been avoided by checking weight statistics after the first load attempt.

  1. Context Degradation Over Session Length

As the session progressed (this is a compacted/continued session), quality degraded:

Early: careful analysis, good theoretical reasoning (PCA/PLS mapping)
Mid: launched processes with | head -60 that caused output buffering deadlock, requiring kill and restart
Late: launched broken XPU process, didn't verify it was working, crashed the user's CUDA run

  1. Launched Commands That Crashed User's Work

The run_four_models.sh script was launched, then the background task system interaction appears to have interfered with the user's own processes
The user modified run_four_models.sh themselves (changed eval_every to 10, removed Pythia, added mkdir) — suggesting they had to fix issues I created

  1. Shell Command Errors

Used | head -60 in a background command, causing pipe buffering deadlock — output file stayed empty
Had to kill and relaunch with tee instead
What Worked Well
The Gemma 4 PLE spectral analysis script produced genuinely novel findings once weights loaded correctly
TinyLlama QAT completed successfully (338.8% gap recovery)
The theoretical PCA/PLS/CCA framework for analyzing PLE was sound
BENCHMARK_STATUS.md documentation was comprehensive

What Should Happen?

  1. Memory Should Be Authoritative

When memory files are loaded into context, they should function as hard constraints, not suggestions:

feedback_dont_kill_processes.md says "never kill without asking" → I should never have run kill on any process without presenting evidence and getting explicit "yes, kill it"
project_dual_gpu_setup.md documents the XPU venv → Before launching anything on XPU, I should have verified the venv works: source xpu_venv/bin/activate && python -c "import torch; print(torch.xpu.is_available())" — a 5-second check that would have prevented an hour of wasted compute

  1. Validate Before Proceeding

Every time I load a model or launch a long-running process, I should:

Check weights are real (not random init) — one std check after loading, takes 2 seconds
Check the process is actually producing output — wait 30s after launch, verify the log file is growing
Check environment compatibility before launching on a secondary device
I should not present results from randomly initialized weights as findings. The Gemma 4 "analysis" on broken weights was presented with full confidence before I noticed condition numbers of 2 and eff_rank ≈ max rank — obvious random init signatures that I should have caught immediately.

  1. Don't Compound Errors

When something fails (like Gemma 4 loading), the response should be:

Stop
Diagnose the root cause clearly
Present one fix to the user
Get confirmation before trying
Instead I did: upgrade transformers → try again → fail → upgrade to dev → try again → fail → rewrite loader → try again → work for analysis → try QAT → fail differently → debug PPL → debug logits → abandon. That's 10+ iterations the user had to watch.

  1. Background Tasks Should Be Monitored

When I launch a background process, I should:

Verify it started correctly (check output within 30-60s)
Not use pipe constructs (| head -60) that cause deadlocks
Not launch processes on devices I haven't validated
Report back to the user proactively if something looks wrong

  1. Late-Session Quality Should Match Early-Session Quality

The theoretical analysis at the start (PCA/PLS mapping of PLE, CCA alignment, tier assignment) was careful and rigorous. By late session I was launching broken commands, killing processes I was told not to kill, and creating work the user had to clean up. The model should maintain consistent quality regardless of context position.

Error Messages/Logs

Steps to Reproduce

<html>
<body>
<!--StartFragment--><h2 style="margin-top: 0px; color: rgb(191, 191, 191); font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(25, 26, 27); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">Steps to Reproduce</h2><h3 style="color: rgb(191, 191, 191); font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(25, 26, 27); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">Setup</h3><ul style="padding-inline-start: 2em; color: rgb(191, 191, 191); font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, sans-serif; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(25, 26, 27); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><li>Claude Code CLI with Opus 4.6 (1M context)</li><li>Extended session with context compaction (session continued from a prior conversation that hit context limit)</li><li>Working directory:<span> </span><code style="font-family: monospace; color: rgb(140, 140, 140); background-color: rgb(38, 38, 38); padding: 2px 4px; border-radius: 3px; word-break: break-word; font-size: 0.9em;">/home/gogip/Spectral-LLM</code><span> </span>(research repo with active GPU training)</li><li>Memory files configured in<span> </span><code style="font-family: monospace; color: rgb(140, 140, 140); background-color: rgb(38, 38, 38); padding: 2px 4px; border-radius: 3px; word-break: break-word; font-size: 0.9em;">~/.claude/projects/-home-gogip-Spectral-LLM/memory/</code><span> </span>with explicit constraints about process safety and hardware setup</li><li>CLAUDE.md with collaboration protocols and session management instructions</li></ul><h3 style="color: rgb(191, 191, 191); font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(25, 26, 27); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">Reproduction Steps</h3><ol style="padding-inline-start: 2em; color: rgb(191, 191, 191); font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, sans-serif; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(25, 26, 27); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><li><p style="white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em;"><strong>Start a long research session</strong> involving GPU model training, spectral analysis, and iterative debugging — the kind of session that approaches context limits and triggers compaction</p></li><li><p style="white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em;"><strong>Have memory files that set explicit behavioral constraints</strong>, e.g.:</p><ul style="padding-inline-start: 2em;"><li>"Never kill GPU processes without asking"</li><li>"User has dual GPU setup: CUDA + XPU with separate venv"</li></ul></li><li><p style="white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em;"><strong>Ask the model to work with a brand-new architecture</strong> (Gemma 4, released days prior) that requires transformer library upgrades and has loading quirks</p></li><li><p style="white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em;"><strong>Observe the following degradation pattern:</strong></p><ul style="padding-inline-start: 2em;"><li><p style="white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em;"><strong>Early session</strong>: Model reads memory, respects constraints, produces careful theoretical analysis, validates assumptions before acting</p></li><li><p style="white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em;"><strong>Mid session</strong> (after compaction + multiple tool call rounds): Model starts making sloppy shell commands (<code style="font-family: monospace; color: rgb(140, 140, 140); background-color: rgb(38, 38, 38); padding: 2px 4px; border-radius: 3px; word-break: break-word; font-size: 0.9em;">| head -60</code> deadlock), presents results from randomly initialized weights without sanity checking, requires multiple retry cycles for the same task</p></li><li><p style="white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em;"><strong>Late session</strong>: Model directly violates memory constraints (kills processes without asking), launches processes on XPU without verifying environment compatibility, doesn't monitor background tasks it started, creates problems the user has to fix manually</p></li></ul></li><li><p style="white-space: pre-wrap; margin-top: 0.1em; margin-bottom: 0.2em;"><strong>The trigger appears to be context length / compaction</strong>: The session began as a continuation of a compacted conversation. As tool call results accumulated (model loading logs, SVD outputs, training logs — each 50-200 lines), instruction adherence degraded</p></li></ol><h3 style="color: rgb(191, 191, 191); font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(25, 26, 27); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">Key Observable Failures</h3>
Step | Expected | Actual
-- | -- | --
Load model, weights broken | Check weight stats, report issue, stop | Ran full analysis on random weights, presented as findings
Launch XPU process | Verify venv compatibility first | Launched with broken PyTorch/IPEX mismatch, silent failure for 1+ hour
Process appears stuck | Present evidence, ask user before killing | Ran kill directly, violating explicit memory constraint
Background command launched | Verify output appears within 60s | Used \| head -60 causing deadlock, empty output file, had to kill and redo
User's own processes running | Be aware, don't interfere | Background task management interfered with user's running jobs

<h3 style="color: rgb(191, 191, 191); font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, sans-serif; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(25, 26, 27); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">Environment Details</h3><div class="codeBlockWrapper_-a7MRw" style="position: relative; margin: 8px 0px; color: rgb(191, 191, 191); font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, sans-serif; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(25, 26, 27); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><button class="copyButton_CEmTFw copyButton_-a7MRw" title="Copy code" aria-label="Copy code to clipboard" style="color: rgb(191, 191, 191); font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, sans-serif; font-size: 13px; background: none 0% 0% / auto repeat scroll padding-box border-box rgb(18, 19, 20); border-color: rgb(42, 43, 44); border-style: solid; border-width: 1px; border-image: none 100% / 1 / 0 stretch; cursor: pointer; opacity: 0; display: flex; border-radius: 4px; justify-content: center; align-items: center; padding: 4px; transition: opacity 0.15s, background 0.15s; position: absolute; top: 4px; right: 4px;"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" data-slot="icon" class="copyIcon_CEmTFw"><path fill-rule="evenodd" d="M15.988 3.012A2.25 2.25 0 0 1 18 5.25v6.5A2.25 2.25 0 0 1 15.75 14H13.5v-3.379a3 3 0 0 0-.879-2.121l-3.12-3.121a3 3 0 0 0-1.402-.791 2.252 2.252 0 0 1 1.913-1.576A2.25 2.25 0 0 1 12.25 1h1.5a2.25 2.25 0 0 1 2.238 2.012ZM11.5 3.25a.75.75 0 0 1 .75-.75h1.5a.75.75 0 0 1 .75.75v.25h-3v-.25Z" clip-rule="evenodd"></path><path d="M3.5 6A1.5 1.5 0 0 0 2 7.5v9A1.5 1.5 0 0 0 3.5 18h7a1.5 1.5 0 0 0 1.5-1.5v-5.879a1.5 1.5 0 0 0-.44-1.06L8.44 6.439A1.5 1.5 0 0 0 7.378 6H3.5Z"></path></svg></button><pre style="overflow-x: auto; white-space: pre; box-sizing: border-box; border-radius: 4px; max-width: 100%; margin: 0px; padding: 8px;"><code style="font-family: monospace; color: rgb(140, 140, 140); background-color: rgb(38, 38, 38); padding: 0px; border-radius: 3px; word-break: break-word; font-size: 0.9em;">Platform: Linux 6.6.87.2-microsoft-standard-WSL2
Model: claude-opus-4-6[1m]
GPU 1: NVIDIA RTX 5060 (8.5 GB VRAM, CUDA)
GPU 2: Intel Arc B280 (12.5 GB VRAM, XPU)
Session: continued/compacted from prior conversation
Transcript: ~/.claude/projects/-home-gogip-Spectral-LLM/5cecb3ad-83ba-4b90-bffa-a508475b6cc0.jsonl</code></pre></div><!--EndFragment-->
</body>
</html>

5cecb3ad-83ba-4b90-bffa-a508475b6cc0.md

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.96

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

WSL (Windows Subsystem for Linux)

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗