{"id":51626745,"url":"https://github.com/waitdeadai/time-anchor","last_synced_at":"2026-07-13T02:02:27.243Z","repository":{"id":357063105,"uuid":"1235203787","full_name":"waitdeadai/time-anchor","owner":"waitdeadai","description":"Claude Code hook that injects local system clock into every session/prompt. Stops 'as of training cutoff' answers. python3-only dep, drop-in.","archived":false,"fork":false,"pushed_at":"2026-05-11T06:14:19.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-11T07:25:45.565Z","etag":null,"topics":["agent","anthropic","bash","claude","claude-code","date","hooks","llm","python","timezone"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/waitdeadai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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-05-11T05:31:09.000Z","updated_at":"2026-05-11T06:14:23.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/waitdeadai/time-anchor","commit_stats":null,"previous_names":["waitdeadai/time-anchor"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/waitdeadai/time-anchor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waitdeadai%2Ftime-anchor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waitdeadai%2Ftime-anchor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waitdeadai%2Ftime-anchor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waitdeadai%2Ftime-anchor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/waitdeadai","download_url":"https://codeload.github.com/waitdeadai/time-anchor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waitdeadai%2Ftime-anchor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35407393,"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-07-13T02:00:06.543Z","response_time":119,"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":["agent","anthropic","bash","claude","claude-code","date","hooks","llm","python","timezone"],"created_at":"2026-07-13T02:02:24.590Z","updated_at":"2026-07-13T02:02:27.238Z","avatar_url":"https://github.com/waitdeadai.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# time-anchor\n\n[![tests](https://github.com/waitdeadai/time-anchor/actions/workflows/test.yml/badge.svg)](https://github.com/waitdeadai/time-anchor/actions/workflows/test.yml)\n[![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)\n[![Claude Code](https://img.shields.io/badge/Claude%20Code-hook-orange)](https://code.claude.com/docs/en/hooks)\n\n\u003e A Claude Code hook that injects the local system clock into every session and prompt, so the model stops giving \"as of my training cutoff\" answers and stops getting the year wrong.\n\n`time-anchor` is one bash file (~127 lines, depends only on `python3`) wired into Claude Code's `SessionStart` and `UserPromptSubmit` events. On every session start and every user prompt, it injects an `additionalContext` block containing the local time, UTC time, timezone, date, hour, weekday, and a short set of temporal-reasoning rules.\n\nThe result: when you ask \"what's the latest version of X?\" or \"is this product still available?\" or anything time-sensitive, the model has the actual current date in its context, knows training-cutoff answers are not the right answer, and is steered toward live source verification.\n\n## What it injects\n\n```\ntemporal anchor from the local system clock.\n\nlocal_time: 2026-05-11T02:29:08-03:00\nutc_time: 2026-05-11T05:29:08+00:00\ntimezone: -03 (-0300)\nlocal_date: 2026-05-11\nlocal_hour: 02:29:08\nweekday: Monday\nsource: local system clock via time-anchor.sh\n\nTemporal reasoning rules:\n1. Treat local_time as the current present date and hour for this Claude Code prompt.\n2. Resolve \"today\", \"yesterday\", \"tomorrow\", \"this week\", \"current\", \"latest\", \"recent\", and year-specific claims relative to this anchor.\n3. For SOTA 2026, current model/provider behavior, pricing, laws, docs, benchmarks, APIs, schedules, or news, do live source verification before making factual claims.\n4. Cite source publish/update dates and the access date when research is time-sensitive.\n5. If live verification is unavailable or incomplete, say the claim is stale, unverified, or insufficient_data instead of relying on pretrained memory.\n```\n\nYou see this block as `\u003csystem-reminder\u003e` context in the assistant's input on every prompt. The model treats it as ground truth.\n\n## Why this matters\n\nLLM training cutoffs make every time-sensitive answer wrong by default — often by months, sometimes by years. The model knows it has a cutoff but has no idea what *today* is unless something tells it. Without an anchor, you get answers like:\n\n- \"As of my last training cutoff in early 2025…\"\n- \"The latest version of X is Y\" (where Y was current 8 months ago)\n- \"This product was announced in 2024 and is expected to launch in early 2025\" (where the launch happened months ago)\n\nWith an anchor, the model knows the real date, knows its memory is potentially stale, and is rule-pushed to verify via live sources when the claim is time-sensitive. This is the same fix Anthropic applies to Claude.ai's web UI, ported to Claude Code where it isn't shipped by default.\n\n## Install (30 seconds)\n\n```bash\nmkdir -p .claude/hooks\ncurl -fsSL https://raw.githubusercontent.com/waitdeadai/time-anchor/main/time-anchor.sh \\\n  -o .claude/hooks/time-anchor.sh\nchmod +x .claude/hooks/time-anchor.sh\n```\n\nThen merge the hook entries from [`settings.example.json`](settings.example.json) into your `.claude/settings.json`.\n\nRequires `python3` (preinstalled on macOS, Ubuntu, and most Linux distros).\n\n## What the script does\n\nThe script is invoked by Claude Code at `SessionStart` and `UserPromptSubmit`. It returns JSON shaped as:\n\n```json\n{\n  \"hookSpecificOutput\": {\n    \"hookEventName\": \"SessionStart\",\n    \"additionalContext\": \"temporal anchor from the local system clock.\\n\\nlocal_time: 2026-05-11T02:29:08-03:00\\n…\"\n  }\n}\n```\n\nClaude Code injects `additionalContext` into the assistant's input. The model sees the current date for the rest of the session.\n\nYou can also call the script directly for testing:\n\n```bash\nbash time-anchor.sh text     # human-readable output\nbash time-anchor.sh json     # JSON payload\nbash time-anchor.sh hook     # full hook response (default)\n```\n\n## What it does NOT do\n\n- It does not call any external time API. The clock comes from `date` / Python's `datetime.now()` on your local machine. If your machine clock is wrong, the anchor is wrong.\n- It does not push the model to verify *every* claim — only ones the temporal-reasoning rules flag as time-sensitive (current state, latest version, recent news, \"as of\" claims).\n- It does not enforce verification. For that, see the sister tool [no-vibes](https://github.com/waitdeadai/no-vibes), which blocks closeouts that claim verification without evidence.\n\n## Sister tools\n\nPart of a small series of single-purpose Claude Code hooks extracted from the [minmaxing](https://github.com/waitdeadai/minmaxing) governance harness.\n\n- [no-vibes](https://github.com/waitdeadai/no-vibes) — blocks Claude from claiming work is finished without verification evidence.\n- [no-curfew](https://github.com/waitdeadai/no-curfew) — suppresses unsolicited rest/sleep/wellness paternalism.\n- [no-sycophancy](https://github.com/waitdeadai/no-sycophancy) — blocks praise-spam at turn open.\n- [no-cliffhanger](https://github.com/waitdeadai/no-cliffhanger) — blocks dangling permission-loop endings.\n- [honest-eta](https://github.com/waitdeadai/honest-eta) — vibe time estimates and linear-scaling parallelism claims.\n- [no-fake-recall](https://github.com/waitdeadai/no-fake-recall) — false-memory recall claims without quoted prior content.\n- [no-fake-stats](https://github.com/waitdeadai/no-fake-stats) — fabricated percentages and amounts without source.\n- [no-fake-cite](https://github.com/waitdeadai/no-fake-cite) — academic citation patterns without verifiable URL.\n- [llm-dark-patterns](https://github.com/waitdeadai/llm-dark-patterns) — umbrella catalog of the suite.\n- [minmaxing](https://github.com/waitdeadai/minmaxing) — the parent governance harness.\n\n## License\n\nApache-2.0. See [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaitdeadai%2Ftime-anchor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaitdeadai%2Ftime-anchor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaitdeadai%2Ftime-anchor/lists"}