feat: inject current local time into conversation context by default
Resolved 💬 4 comments Opened Feb 6, 2026 by NoRain211 Closed Mar 6, 2026
Summary
Claude Code should inject the current local time into the conversation context by default, similar to how other agentic environments (e.g. Antigravity) do.
Motivation
Currently, Claude has no awareness of the current time unless the user manually tells it or configures a custom hook. This limits:
- Accurate timestamping - Users who want timestamped responses have no reliable source of truth
- Session continuity awareness - Claude can't distinguish between an immediate follow-up vs a user returning after days
- Time-aware reasoning - References like "today", "earlier", "this morning" have no grounding
Current Workaround
A UserPromptSubmit hook that prints the timestamp to stdout works, since CC injects stdout as context for that hook type:
{
"hooks": {
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "node -e \"console.log(new Date().toISOString())\""
}
]
}
]
}
}
This works, but timestamp awareness is universally useful enough to be built-in.
Proposed Solution
Inject a local timestamp (ISO 8601 with timezone offset) into the conversation context on each message, alongside existing metadata like ide_selection.
Why This Should Be Default
- Low cost: ~100 chars per message
- High value: Enables time-aware reasoning and proper timestamping
- Zero risk: Read-only metadata
- Precedent: Other agentic environments already do this successfully
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗