Long sessions drift days past the session-start date — inject current timestamp per user prompt

Open 💬 1 comment Opened Jul 3, 2026 by jontwigge

Problem

The model receives the current date once, at session start. Interactive sessions routinely span multiple days (mine regularly run 2–3 days), after which the model still reasons from the stale session-start date.

Concrete failure: on day 3 of a session, Claude told me an event was "tomorrow at 12:30" when it was that same day, 100 minutes away. Nothing in the context corrected it — the model had no signal that days had passed, and no default habit of running date before making time-relative statements.

Suggestion

Timestamp user prompts (or inject a lightweight Now: 2026-07-03 10:49 BST context line per turn) by default, at least once the session crosses a day boundary. The information is trivially available and the token cost is negligible; the failure mode it prevents (wrong scheduling statements, stale "today/tomorrow" reasoning) is silent and erodes trust.

Workaround

A user-level UserPromptSubmit hook works today:

{
  "hooks": {
    "UserPromptSubmit": [
      { "hooks": [ { "type": "command", "command": "date '+Now: %Y-%m-%d %H:%M %Z (%A)'" } ] }
    ]
  }
}

…but most users won't discover this until after they've been misled at least once, which argues for it being default behaviour.

Environment: Claude Code desktop app, macOS.

🤖 Filed with Claude Code

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗