claude-code - 💡(How to fix) Fix [BUG] Model ignores session-injected date when making week-relative inferences ("this week" / "next week") [4 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#55081Fetched 2026-05-01 05:46:44
View on GitHub
Comments
4
Participants
3
Timeline
10
Reactions
0
Author
Timeline (top)
commented ×4labeled ×4closed ×1reopened ×1

Error Message

Error Messages/Logs

Fix Action

Fix / Workaround

A workaround exists — configuring the model to run date or cal via Bash before making any week-relative statement — but this is a compensating control for a model reasoning failure, not a real fix.

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Claude Code injects the current date into every session via a system hook (e.g., "Today's date is 2026-04-30"). The model correctly uses this for explicit date lookups, but fails to apply the same grounding when using week-relative language — phrases like "this week," "next week," and "earlier this week." The result is confident, incorrect temporal statements even though the correct date was available.

Example from today's session (Thursday April 30, 2026): asked to summarize upcoming action items, the model described items dated May 5 (the following Tuesday) as "this week" rather than "next week."

What Should Happen?

When the session hook provides today's date, the model should use it for all temporal reasoning — including week-relative language — not just explicit date comparisons. Determining whether a date falls in "this week" or "next week" requires knowing the current day of the week, which is derivable from the injected date. The model should treat week-relative language as a calculation requiring verification, not as plain English it can reason about freehand.

Ideally, a bespoke session hook is not needed at all and there is consistent date/calendar awareness by way of the model or the Code (or Desktop/Cowork) harness.

Error Messages/Logs

Steps to Reproduce

  1. Start a Claude Code session on a Thursday (e.g., April 30, 2026 — session hook confirms the date).
  2. Ask Claude to summarize upcoming action items. Include items dated the following Tuesday (May 5).
  3. Observe that Claude describes the May 5 items as "this week" rather than "next week."
  4. Observe that Claude positions May 5 as the "beginning of the week".

Claude Model

Sonnet (default)

Is this a regression?

No, this never worked

Last Working Version

No response

Claude Code Version

Claude Code 2.1.116

Platform

AWS Bedrock

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

This is distinct from issue #50499, which describes sessions where no date is injected at all. This issue is specifically about sessions where the date is provided but the model fails to apply it to relative temporal reasoning.

A workaround exists — configuring the model to run date or cal via Bash before making any week-relative statement — but this is a compensating control for a model reasoning failure, not a real fix.

extent analysis

TL;DR

The model should be updated to correctly apply the injected date to week-relative language by calculating the current day of the week and adjusting its temporal reasoning accordingly.

Guidance

  • Review the model's temporal reasoning logic to ensure it correctly handles week-relative language based on the injected date.
  • Verify that the model can accurately determine the current day of the week from the injected date and adjust its responses for "this week" and "next week" accordingly.
  • Consider implementing a more robust date/calendar awareness system within the model or the Code harness to eliminate the need for bespoke session hooks.
  • Test the model with various dates and week-relative language scenarios to ensure its responses are accurate and consistent.

Example

No code snippet is provided as the issue does not specify the model's implementation details.

Notes

The issue is specific to the Sonnet model and Claude Code version 2.1.116, and it is not a regression. The provided workaround of configuring the model to run date or cal via Bash is not a permanent fix.

Recommendation

Apply a workaround by configuring the model to run date or cal via Bash before making any week-relative statement, until a proper fix is implemented to update the model's temporal reasoning logic.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING