{"id":50836143,"url":"https://github.com/zoharbabin/claude-code-message-timestamps","last_synced_at":"2026-06-14T03:07:27.276Z","repository":{"id":362107442,"uuid":"1257259287","full_name":"zoharbabin/claude-code-message-timestamps","owner":"zoharbabin","description":"Show local time on every Claude Code message, and let Claude know when each prompt was sent. Zero-config plugin, cross-OS, graceful degradation.","archived":false,"fork":false,"pushed_at":"2026-06-02T16:39:24.000Z","size":64,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-02T17:08:37.828Z","etag":null,"topics":["anthropic","claude","claude-code","developer-tools","hooks","plugin","timestamps"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zoharbabin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-02T14:08:06.000Z","updated_at":"2026-06-02T16:39:28.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zoharbabin/claude-code-message-timestamps","commit_stats":null,"previous_names":["zoharbabin/claude-code-message-timestamps"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/zoharbabin/claude-code-message-timestamps","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoharbabin%2Fclaude-code-message-timestamps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoharbabin%2Fclaude-code-message-timestamps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoharbabin%2Fclaude-code-message-timestamps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoharbabin%2Fclaude-code-message-timestamps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zoharbabin","download_url":"https://codeload.github.com/zoharbabin/claude-code-message-timestamps/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoharbabin%2Fclaude-code-message-timestamps/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34307715,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anthropic","claude","claude-code","developer-tools","hooks","plugin","timestamps"],"created_at":"2026-06-14T03:07:26.683Z","updated_at":"2026-06-14T03:07:27.263Z","avatar_url":"https://github.com/zoharbabin.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ⏱ Message Timestamps for Claude Code\n\n**See the time on every message in Claude Code — and let Claude know it too.**\n\n![Demo: timestamps on each message, and Claude answering how long a task took](assets/demo.gif)\n\n\u003csub\u003eIllustration of the plugin in action — each reply is prefixed with the local time, and Claude can reason about elapsed time.\u003c/sub\u003e\n\n```\n[09:12:54] Here's the plan: I'll start by …\n```\n\nClaude Code doesn't show *when* anything happened. Long sessions blur together: you\ncan't tell how long a build took, when you asked something, or point a teammate to\n\"the part around 09:15.\" This plugin fixes that in two ways, and installs in 15 seconds.\n\n## Why this exists\n\nTimestamps are one of the most-requested missing features in Claude Code. At least\n**11 issues** ask for some form of it:\n\n[#2441](https://github.com/anthropics/claude-code/issues/2441) · [#60711](https://github.com/anthropics/claude-code/issues/60711) · [#44763](https://github.com/anthropics/claude-code/issues/44763) · [#30745](https://github.com/anthropics/claude-code/issues/30745) · [#21051](https://github.com/anthropics/claude-code/issues/21051) · [#63488](https://github.com/anthropics/claude-code/issues/63488) · [#61672](https://github.com/anthropics/claude-code/issues/61672) · [#52944](https://github.com/anthropics/claude-code/issues/52944) · [#56855](https://github.com/anthropics/claude-code/issues/56855) · [#49084](https://github.com/anthropics/claude-code/issues/49084) · [#60492](https://github.com/anthropics/claude-code/issues/60492)\n\nThis plugin is a working solution today, while we wait to see if it ships natively.\n\n---\n\n## Why you want this (the 10-second version)\n\n| Without it | With it |\n| --- | --- |\n| \"How long did that step take?\" — no idea | Read it off the timestamps |\n| \"When did I ask that?\" — scroll and guess | It's right there on the message |\n| \"Look at the part around 9am\" — good luck | Every message is time-labeled |\n| Claude has no sense of elapsed time | Claude knows when each prompt was sent and can reason about it |\n\nNo tracking, no telemetry, no account, no network calls. It just reads your computer's\nclock. Runs in a few milliseconds per message.\n\n---\n\n## Install (copy, paste, done)\n\nIn Claude Code, run these two lines:\n\n```\n/plugin marketplace add zoharbabin/claude-code-message-timestamps\n/plugin install message-timestamps@zoharbabin-claude-tools\n```\n\nRestart Claude Code. That's it — timestamps now appear on every message, in every\nproject. ✅\n\n\u003e Prefer the terminal? `claude plugin marketplace add zoharbabin/claude-code-message-timestamps`\n\u003e then `claude plugin install message-timestamps@zoharbabin-claude-tools`.\n\nTo remove it: `/plugin uninstall message-timestamps@zoharbabin-claude-tools`.\n\n### Requirements\n\n- **Claude Code 2.1.152 or newer** — that version added the `MessageDisplay` hook\n  used for the on-screen timestamps. (Older versions still get the \"Claude knows the\n  time\" half.)\n- **[`jq`](https://jqlang.github.io/jq/)** on your `PATH`:\n  - macOS: `brew install jq`\n  - Linux: `sudo apt-get install jq` / `sudo dnf install jq`\n  - Windows: `winget install jqlang.jq` or `choco install jq`\n- **Windows only:** the hooks are bash scripts, so you need **Git Bash** (bundled with\n  [Git for Windows](https://gitforwindows.org/)). Claude Code runs `command` hooks via\n  Git Bash automatically when it's installed.\n\nIf `jq` is missing the plugin **fails safe** — it adds no timestamp rather than breaking\nanything, so you never lose a message. It also shows a one-time message at session start\ntelling you exactly how to install `jq`. Install it, restart, and timestamps light up.\n\n---\n\n## Platform support — what to expect on each OS\n\nThe hooks are small Bash scripts that call `date` (for local time) and `jq` (to build\nJSON safely). Claude Code runs `command` hooks through a shell: `sh -c` on macOS/Linux,\nand **Git Bash** on Windows (falling back to PowerShell if Git Bash isn't installed).\nHere's exactly how that plays out:\n\n| | **macOS** | **Linux** | **Windows** |\n| --- | --- | --- | --- |\n| Shell used for hooks | `sh` / system bash | `sh` / system bash | **Git Bash** (auto-detected) |\n| `date` (local time) | built in | built in | provided by Git Bash |\n| `jq` | `brew install jq` | `apt`/`dnf install jq` | `winget`/`choco install jq` |\n| On-screen `[HH:MM:SS]` | ✅ (Claude Code 2.1.152+) | ✅ (2.1.152+) | ✅ (2.1.152+, with Git Bash) |\n| Claude knows the time | ✅ | ✅ | ✅ (with Git Bash) |\n| If Git Bash is absent | n/a | n/a | scripts can't run — install Git Bash |\n| If `jq` is absent | one-time notice, no timestamps | one-time notice, no timestamps | one-time notice, no timestamps |\n\n**Why it works without fuss:**\n\n- **No executable-bit dependency.** The hooks are invoked as `bash \u003cscript\u003e` (Claude\n  Code's \"exec form\"), so they run even when a clone, a ZIP download, or\n  `git config core.fileMode=false` drops the `+x` permission — common on Windows.\n- **Local time, not UTC.** Time comes from your shell's `date`, so it matches your wall\n  clock. (The scripts deliberately avoid `jq`'s `now | strftime`, which is UTC-only.)\n- **Graceful, explained degradation.** Missing `jq` never breaks a message or errors the\n  session; you get a one-time `SessionStart` notice with the exact install command for\n  your OS, and normal output continues untouched.\n\n**Windows, specifically:** install [Git for Windows](https://gitforwindows.org/) (this\nprovides Git Bash, `bash`, and `date`) plus `jq`. Claude Code then routes the hooks\nthrough Git Bash automatically — no extra configuration. Native `cmd.exe`/PowerShell\nwithout Git Bash is **not** supported, because the hooks are Bash scripts.\n\n\u003e **WSL / dev containers / SSH remotes:** these are Linux environments, so they behave\n\u003e exactly like the Linux column — just make sure `jq` is installed *inside* that\n\u003e environment, not only on the host.\n\n---\n\n## What you'll see\n\nEach assistant reply is prefixed with the local time, once per message:\n\n```\n[09:12:54] Sure — here's how that works …\n[09:13:48] Done. Tests pass.\n```\n\nThe gap between two stamps tells you how long the work in between took.\n\n---\n\n## How it works\n\nThree small [hooks](https://docs.claude.com/en/docs/claude-code/hooks), each on a\ndifferent Claude Code event:\n\n1. **You see the time** (`MessageDisplay`) — prepends `[HH:MM:SS]` to each assistant\n   message *on screen only*. It never touches the transcript or what Claude reads, so it\n   can't confuse the model. It stamps just the first chunk of each streamed message, so\n   you get exactly one timestamp per reply.\n\n2. **Claude knows the time** (`UserPromptSubmit`) — adds `Message sent at local time\n   09:12:54 EDT` to Claude's context when you send a prompt. Claude Code wraps this in a\n   `\u003csystem-reminder\u003e`, which the model is trained to treat as background metadata —\n   *not* as text you typed. So Claude can answer \"how long ago did I ask that?\" without\n   ever echoing or fixating on the clock.\n\n3. **It tells you if something's missing** (`SessionStart`) — runs once when a session\n   starts and, only if `jq` isn't installed, shows a one-time notice with the install\n   command for your OS. When everything's present it stays silent.\n\nThis split is deliberate: the visible marker stays out of the model's context (zero\nrisk of confusion), and the model's time-awareness stays out of your view (zero visual\nclutter). Both halves use a tiny, fixed token footprint and your machine's local\ntimezone.\n\n### Files\n\n```\nclaude-code-message-timestamps/\n├── .claude-plugin/\n│   ├── plugin.json          # plugin manifest\n│   └── marketplace.json     # lets you install straight from this repo\n├── hooks/\n│   ├── hooks.json           # wires up the three hooks\n│   └── scripts/\n│       ├── timestamp-context.sh   # UserPromptSubmit → tells Claude the time\n│       ├── timestamp-display.sh   # MessageDisplay → shows you the time\n│       └── dependency-check.sh    # SessionStart → warns once if jq is missing\n└── README.md\n```\n\n---\n\n## Customize\n\nThe format lives in the scripts in `hooks/scripts/`. They use the standard `date`\nformat string.\n\n- **Add the date too:** change `+%H:%M:%S` to `+%Y-%m-%d %H:%M:%S` in\n  `timestamp-display.sh`.\n- **12-hour clock:** use `+%I:%M:%S %p`.\n- **Different wording for Claude:** edit the `additionalContext` string in\n  `timestamp-context.sh`.\n\n\u003e **Note on timezones:** the scripts use the shell's `date` command, which respects\n\u003e your local timezone. They intentionally avoid `jq`'s `now | strftime`, which renders\n\u003e in **UTC** and would show the wrong time.\n\n---\n\n## Prefer not to install a plugin?\n\nYou can paste the same hooks into `~/.claude/settings.json` by hand under a `\"hooks\"`\nkey. The plugin is just a cleaner, updatable, no-clobber way to do it — and it won't\noverwrite hooks you already have.\n\n---\n\n## FAQ\n\n**Does this send my data anywhere?** No. It reads your local clock and nothing else.\n\n**Will it slow Claude Code down?** No — each hook runs in a few milliseconds.\n\n**Can I timestamp my *own* messages on screen too?** Not currently — Claude Code's\n`MessageDisplay` hook only renders assistant messages. Your send-times still reach\nClaude via the other hook, so the elapsed-time math is intact.\n\n**Does it work in every project?** Yes, once installed it's global across all\nprojects and sessions.\n\n---\n\n## License\n\n[MIT](LICENSE) © Zohar Babin\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoharbabin%2Fclaude-code-message-timestamps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzoharbabin%2Fclaude-code-message-timestamps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoharbabin%2Fclaude-code-message-timestamps/lists"}