claude-code - 💡(How to fix) Fix Feature request: expose timestamps to Claude as structured data for time-aware reasoning [1 comments, 2 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#49084Fetched 2026-04-17 08:51:21
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×2commented ×1cross-referenced ×1

Root Cause

Claude increasingly operates as a long-running orchestrator — managing parallel agents, polling CI, waiting on background tasks. Without time awareness it's flying blind on the temporal dimension. Time is a basic data point that every other development tool exposes.

Fix Action

Fix / Workaround

Currently the only workaround is shelling out to date, which is hacky and only gives "now" — not when past messages/results arrived.

RAW_BUFFERClick to expand / collapse

Problem

Claude Code has no concept of time within a session. It cannot:

  • Know how long it's been since the last message or tool call
  • Correlate its own actions with external systems by time
  • Calculate durations between its own events
  • Detect stale state ("this agent has been running for 20 minutes, might be hung")
  • Make time-aware decisions ("5 minutes since last CI check, time to poll")
  • Build accurate timelines in session summaries

Currently the only workaround is shelling out to date, which is hacky and only gives "now" — not when past messages/results arrived.

Proposed solution

Expose timestamps as first-class data Claude can read and reason with:

  • Each message and tool result should carry a timestamp accessible to Claude
  • A lightweight way to get "now" without date shell calls
  • Durations between events should be computable
  • Background task notifications should include start time, not just completion time

Why this matters

Claude increasingly operates as a long-running orchestrator — managing parallel agents, polling CI, waiting on background tasks. Without time awareness it's flying blind on the temporal dimension. Time is a basic data point that every other development tool exposes.

Example use cases

  • "The benchmark started at 10:42 and finished at 11:18 — 36 minutes for 120 calls"
  • "Agent X has been running for 25 minutes vs Agent Y which finished in 3 — X might be stuck"
  • "Last CI poll was 8 minutes ago, checking again"
  • Session summaries with accurate timing, not guesses

extent analysis

TL;DR

Exposing timestamps as first-class data in Claude can help it make time-aware decisions and track durations between events.

Guidance

  • To address the lack of time awareness, consider adding timestamps to each message and tool result, making them accessible to Claude for reasoning and calculation.
  • Introduce a lightweight method for Claude to get the current time without relying on shell calls to date, enabling it to compute durations between events.
  • Modify background task notifications to include start times, in addition to completion times, to provide a more comprehensive view of task timelines.
  • Evaluate the feasibility of integrating a timing mechanism that allows Claude to detect stale states and make informed decisions based on time intervals since last messages or events.

Example

# Hypothetical example of how a message with a timestamp might look
message = {
    'content': 'Benchmark started',
    'timestamp': 1643723400  # Unix timestamp for 10:42
}

Notes

The proposed solution focuses on enhancing Claude's time awareness by incorporating timestamps into its data structure. This approach assumes that adding timestamps and a method for getting the current time will sufficiently address the issue without introducing significant complexity or performance overhead.

Recommendation

Apply workaround: Expose timestamps as first-class data in Claude, as this directly addresses the identified lack of time awareness and provides a foundation for calculating durations and making time-based decisions.

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

claude-code - 💡(How to fix) Fix Feature request: expose timestamps to Claude as structured data for time-aware reasoning [1 comments, 2 participants]