evnchn-agentic

Claude Code Time Awareness — Productivity skill for Claude Code

Productivity community

Time awareness hook for autonomous Claude Code agents — inject current time into agent context via PostToolUse, so long-running autonomous sessions know what time it is.

How to install Claude Code Time Awareness

This entry records only its repository, not the path inside it, so there is no exact command to give. Open evnchn-agentic/claude-code-time-awareness and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Claude Code Time Awareness does

Time awareness hook for autonomous Claude Code agents — inject current time into agent context via PostToolUse, so long-running autonomous sessions know what time it is.

Alternatives in Productivity

README

claude-code-time-awareness

**Time awareness for autonomous Claude Code agents.**

Claude Code agents don't know what time it is during autonomous work. The system prompt date is set once at session start and goes stale immediately. Existing solutions only fire on user messages — useless when the agent is working autonomously for hours.

This hook injects the current time into the agent's context after every Bash command and Playwright browser interaction, so long-running autonomous sessions can pace themselves, stop at deadlines, and log accurate timestamps.

The Problem

Claude Code has no clock. The [system prompt date is set once at session start and never updates](https://github.com/anthropics/claude-code/issues/24182). This isn't hypothetical — the [issue has been raised](https://github.com/anthropics/claude-code/issues/24182) and [written about](https://dev.to/tadmstr/claude-code-doesnt-know-youve-been-gone-heres-the-fix-17ko), but existing solutions only work for interactive sessions.

Anyone running agents autonomously hits this:

  • "Work until 9pm" — the agent has no way to know when 9pm arrives. It either asks you (defeats autonomy), guesses wrong (stale time), or ignores time entirely.
  • Shared machines — you need the agent to stop before you take the laptop out, but you're away from it.
  • Overnight/multi-day jobs — timestamps in logs, commits, and journals are wrong or missing. The agent doesn't know if it's been 5 minutes or 5 hours since the last message.
  • Cost control — agent runs indefinitely instead of stopping after a reasonable work period.

Prior Art & Why They Don't Work

Approach Mechanism Interactive Autonomous
Issue #24182 Inject timestamp into user messages Would work (unimplemented) No — no user messages
DEV Community fix `UserPrompt