claude-code - 💡(How to fix) Fix Feature Request: Built-in session logging, work timer, and alarm [1 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#50770Fetched 2026-04-20 12:13:30
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×3

Three utilities that many power users end up building themselves should be standard Claude Code features:

  1. Session time logging — Automatically record session start/end times (via SessionStart/Stop hooks writing to a log file). Useful for tracking how long Claude Code sessions run.

  2. Work timer (/timer) — A built-in slash command to start/stop named work sessions and report elapsed minutes. Supports parallel tracking with auto-assigned IDs. Useful for time-boxing tasks and reviewing how long work actually takes.

  3. Time alarm (/alarm) — A slash command to trigger a notification at a specified time (/alarm 23:30 or /alarm +5m). Critical for staying focused without leaving the session.

Root Cause

Three utilities that many power users end up building themselves should be standard Claude Code features:

  1. Session time logging — Automatically record session start/end times (via SessionStart/Stop hooks writing to a log file). Useful for tracking how long Claude Code sessions run.

  2. Work timer (/timer) — A built-in slash command to start/stop named work sessions and report elapsed minutes. Supports parallel tracking with auto-assigned IDs. Useful for time-boxing tasks and reviewing how long work actually takes.

  3. Time alarm (/alarm) — A slash command to trigger a notification at a specified time (/alarm 23:30 or /alarm +5m). Critical for staying focused without leaving the session.

Fix Action

Fix / Workaround

Current workaround

RAW_BUFFERClick to expand / collapse

Summary

Three utilities that many power users end up building themselves should be standard Claude Code features:

  1. Session time logging — Automatically record session start/end times (via SessionStart/Stop hooks writing to a log file). Useful for tracking how long Claude Code sessions run.

  2. Work timer (/timer) — A built-in slash command to start/stop named work sessions and report elapsed minutes. Supports parallel tracking with auto-assigned IDs. Useful for time-boxing tasks and reviewing how long work actually takes.

  3. Time alarm (/alarm) — A slash command to trigger a notification at a specified time (/alarm 23:30 or /alarm +5m). Critical for staying focused without leaving the session.

Current workaround

All three require custom shell scripts + slash commands + hook configuration — roughly a few hours of setup per user.

Proposed

Ship these as built-in skills or hook templates. On Windows, timezone handling requires PowerShell (Get-Date) for reliable local time — adding extra friction that built-in support would eliminate.

Use cases

  • "How long did this session take?" → session logging
  • "How long did writing this article take?" → work timer
  • "Tell me when 3 minutes have passed" (e.g., instant noodles) → alarm

extent analysis

TL;DR

Implementing session time logging, work timer, and time alarm as built-in features in Claude Code can simplify user workflows and reduce setup time.

Guidance

  • Consider adding a SessionStart and SessionStop hook to automatically record session times in a log file for session time logging.
  • Develop a /timer slash command to start and stop named work sessions, allowing users to track elapsed minutes and review task duration.
  • Create a /alarm slash command to trigger notifications at specified times, enabling users to stay focused without leaving the session.
  • Investigate using PowerShell's Get-Date command on Windows to handle timezone issues and ensure reliable local time.

Example

No code example is provided due to the lack of specific technical details in the issue.

Notes

The proposed solution aims to reduce the setup time and complexity for users by integrating these features into Claude Code. However, the implementation details and potential challenges, such as handling different timezones and user preferences, are not discussed in the issue.

Recommendation

Apply a workaround by implementing the proposed features as built-in skills or hook templates, as this would simplify the user experience and reduce setup time.

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: Built-in session logging, work timer, and alarm [1 participants]