[FRE] Add timestamp to each message
Open 💬 19 comments Opened Jun 22, 2025 by MarcinOrlowski
It'd be extremely handy to timestamp each interaction with claude - be it outgoing (my messages) as well as its replies. That would significantly help running around multiple sessions - timestamp would let me easier place my actions in time
> commit
● Bash(git status)
⎿ On branch dev
Your branch is ahead of 'origin/dev' by 2 commits.
(use "git push" to publish your local commits)
… +2 lines (ctrl+r to expand)
● Bash(git diff --cached)
⎿ (No content)
● Bash(git diff)
⎿ (No content)
● The working tree is already clean and there are no staged or unstaged changes.
of origin. The fix for the --demo option issue has been successfully applied and committed.
╭───────────────────────────────────────────────────────────────────────────────────────────╮
│ > │
╰───────────────────────────────────────────────────────────────────────────────────────────╯
? for shortcuts
after the change
> commit [2025-06-21, 23:59]
● Bash(git status) [23:59]
⎿ On branch dev
Your branch is ahead of 'origin/dev' by 2 commits.
(use "git push" to publish your local commits)
… +2 lines (ctrl+r to expand)
● Bash(git diff --cached) [23:59]
⎿ (No content)
● Bash(git diff) [2025-06-22, 00:00]
⎿ (No content)
● The working tree is already clean and there are no staged or unstaged changes.
of origin. The fix for the --demo option issue has been successfully applied and committed.
╭───────────────────────────────────────────────────────────────────────────────────────────╮
│ > │
╰───────────────────────────────────────────────────────────────────────────────────────────╯
? for shortcuts
19 Comments
Hey, that's a really interesting idea for improving session tracking, and your mock-up is super clear. I'm not affiliated with Anthropic, but I've spent a lot of time digging through the Claude Code documentation and can share what I've found.
Current Status
The feature as you've requested it—with persistent, inline timestamps in the main interactive view—doesn't appear to be available right now.
However, the team has implemented something very close to this! According to the changelog (v1.0.30), timestamps were added to the transcript mode.
You can see this by pressing
Ctrl+Rduring your session. This will show you a more detailed, scrollable view of the conversation history, and each entry there should have a timestamp, which might help with your workflow. It's not quite the "always-on" display you're looking for, but it's a good first step.Possible Workarounds for Detailed Logging
If getting precise, structured, timestamped logs of every single event is your main goal, Claude Code actually has a very powerful (but more involved) solution: OpenTelemetry (OTel) monitoring.
According to the Monitoring documentation, you can configure Claude Code to export detailed events to a collector. This is definitely an advanced feature, but it gives you exactly the data you want:
claude_code.user_promptevent: Logs every time you submit a prompt, with anevent.timestamp.claude_code.tool_resultevent: Logs every time a tool runs (likeBash), also with anevent.timestamp.This won't display the timestamps in the terminal UI, but it would give you a structured log file or a dashboard (depending on your OTel setup) with a perfect, timestamped record of every interaction, which might be even better for tracking across multiple sessions.
Another, simpler logging option could be to use Hooks. You could set up a
UserPromptSubmithook and aPreToolUsehook to run a simple script that appends the prompt or tool command to a log file with a timestamp.Hope this helps! I'll be keeping an eye on this issue as well, as I agree it would be a great UI enhancement.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Not stale.
It would be a great improve
I built a statusline workaround just to display the last message timestamp so I can see if I'm still within the 5-minute cache window before deciding to continue or restart. When I'm doing something on the side and context is nearly full at the end of a bigger task, I often miss the window by a couple seconds and the entire conversation gets written to the cache again just to confirm something small.
Per-message timestamps would eliminate this hack for me and help avoid unnecessary cache writes in longer conversations.
I this on the roadmap?
Hey @MarcinOrlowski — I built a solution: claude-timecodes. Would love any feedback.
https://gitlab.com/sophronesis/claude-code-ts
built similar solution
unfortunately github version got nuked via dmca, but i rehosted it on gitlab as it is just patch to original code, and not deminified source code`
Really missing this with long running autoresearch tasks. Surprised this is missing in a chat interface.
+1 from another concrete use case: running 10+ Claude Code sessions in parallel across many terminal tabs/windows, often left idle overnight and resumed next day.
Two specific pain points:
Worked for 8m 14stells me duration but not when. Was the last response 5 minutes ago, or 5 hours? Can't tell without external context.14:22is ambiguous; fullYYYY-MM-DD HH:MMwould resolve this.Ideal format would be configurable absolute timestamps on the turn footer / inline indicators, e.g.
Worked at 2026-05-19 14:22 (took 8m 14s). Either replacing the duration or appending it both work.(Originally filed #60531 before realizing this was already tracked here.)
@SoftSolid best way to "fix" this i found is to just add to claude.md line to call first tool to run date command and to write this to prompt. But this feels so dirty
Just also adding my name under this request. For those of us who give Claude Code an advanced persona and extended memories, temporal awareness goes a long way into push Claude Code toward an AI partner instead of a simple coding chatbot.
Humm.... could hooks be used for this?
@remygendron nope, hooks are only good for like storing logs of your messages and tool uses. this needs to be togglable separately. sux that claude code doesn't have plugins in any shape or form (skill do not count)
Thank you for the suggestion, I didn't think of this before.
Result:
<img width="1142" height="155" alt="Image" src="https://github.com/user-attachments/assets/320527f6-4535-4687-adc5-565eae8882cf" />
+1 — heavy Claude Code desktop user here, and the lack of per-message timestamps is a recurring friction point.
Three concrete use cases on my side:
Worked for 8m 14s\tells me duration, not when.A dim absolute timestamp on each user/assistant turn (\
14:32\, or \YYYY-MM-DD HH:MM\for multi-day sessions) would solve all three. A settings toggle would be ideal so people who don't want the visual noise can hide it.Would love to see this on the roadmap. Thanks!
I built a small open-source plugin that solves this with hooks, so it works today without waiting on a built-in feature: claude-code-message-timestamps.
It does two things:
[HH:MM:SS]on every assistant message in the transcript — via aMessageDisplayhook, which is display-only, so it never pollutes the model's context.UserPromptSubmithook that adds the time as a<system-reminder>, so the model can reason about elapsed time without mistaking the timestamp for your typed text.Install (Claude Code 2.1.152+):
Cross-OS (macOS/Linux/Windows via Git Bash), needs
jq, and degrades gracefully with a one-time notice if it's missing. MIT-licensed — hope it helps until/if this ships natively.Hey @zoharbabin, thanks for sharing this — really nice idea, and exactly
the kind of "works today" solution I was hoping for.
I tried installing it just now via Claude Code, but ran into a load error.
Posting the details here in case it's useful for a patch release.
Environment
requirement)
What I did
Both commands reported success.
What Claude Code then reports on
claude plugin listLikely cause (from Claude Code's own message)
Recent Claude Code versions appear to auto-load
hooks/hooks.jsonfrom thestandard path. The explicit
"hooks": "./hooks/hooks.json"line in yourplugin.jsonthen collides with that auto-load. Dropping that line fromthe manifest (or pointing it at an additional, differently-named hook file)
looks like it would resolve the duplicate.
Happy to retest once you push a fix. Thanks again for putting this out!
2026年6月3日(水) 0:03 Zohar Babin @.***>:
Thanks to @quad341 this was resolved in https://github.com/zoharbabin/claude-code-message-timestamps/pull/1
really hope this will be added as an option, because "Add timestamp at the start of every message" to claude.md feels dirty and should be solved deterministically