LLM miscalculates day of week and ignores its own corrective feedback
Bug description
Claude (Opus 4.6, 1M context) consistently miscalculated the day of the week during a session and did so despite having an explicit self-corrective memory/feedback entry stating: "NUNCA chutar dia da semana, sempre calcular com date -j" (never guess the day of the week, always calculate with date -j).
What happened
- Date in question: April 13, 2026 (a Monday)
- Claude stated it was Sunday multiple times in the same session
- This led to an incorrect conclusion: "Como ontem foi domingo e o consultório funciona segunda a sexta, faz sentido não ter tido mais msgs" (since yesterday was Sunday and the office works Mon-Fri, it makes sense there were no more messages) — which was wrong, the office should have been open
- Claude has a persistent memory file with the rule to always calculate the day programmatically (
date -j -f "%Y-%m-%d" "2026-04-13" "+%A") instead of guessing. This rule was created after a previous identical mistake. The rule was ignored.
Expected behavior
- Claude should calculate the day of the week deterministically (using a tool/bash) instead of relying on mental math
- When Claude has explicit corrective feedback in its memory about a specific failure mode, it should follow that feedback
Impact
In this case, the wrong day-of-week led to a wrong operational conclusion (dismissing the absence of patient messages as "it was Sunday" when it was actually Monday — a workday). This could have masked a real issue (e.g., bot being down on a business day).
Environment
- Model: Claude Opus 4.6 (1M context)
- Interface: Claude Code CLI
- The corrective feedback was stored in persistent memory (
feedback_dia_semana_calcular.md) and loaded into context via MEMORY.md
Reproducibility
This is the second time this exact failure occurred with the same model, which is why the feedback rule existed in the first place. The model appears to prefer "intuiting" the day of the week over using available tools to calculate it, even when explicitly instructed not to.
🤖 Generated with Claude Code
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗