claude-code - 💡(How to fix) Fix Feature Request: Add timestamp to CLI input prompt [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#52944Fetched 2026-04-25 06:16:33
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×3

Code Example

> my question here

---

04/24 14:32:15> my question here

---

{
  "promptFormat": "MM/DD HH:MI:SS> "
}
RAW_BUFFERClick to expand / collapse

Feature Request

Add an option to include a timestamp in the Claude Code CLI input prompt.

Current Behavior

The CLI prompt is currently just >

Requested Behavior

Allow customization of the prompt to include a timestamp, for example: MM/DD HH:MI:SS>

Use Case

The timestamp would provide a visual indication of how long ago each prompt was presented, which is helpful for:

  • Tracking session duration
  • Understanding timing of interactions
  • Reviewing conversation history with time context

Example

Instead of:

> my question here

Show:

04/24 14:32:15> my question here

The timestamp wouldn't need to update dynamically - it would just show when the prompt was first displayed, giving users a temporal reference for their interaction history.

Configuration

This could be added as a setting in settings.json:

{
  "promptFormat": "MM/DD HH:MI:SS> "
}

extent analysis

TL;DR

Add a promptFormat setting to the settings.json file to allow customization of the CLI input prompt with a timestamp.

Guidance

  • Review the proposed settings.json configuration to understand how the promptFormat setting could be used to customize the prompt.
  • Consider implementing a feature to parse the promptFormat string and replace placeholders with the actual timestamp.
  • Investigate how to integrate this new setting with the existing CLI prompt display logic.
  • Think about how to handle different timestamp formats and potential internationalization issues.

Example

{
  "promptFormat": "MM/DD HH:MI:SS> "
}

This example shows how the promptFormat setting could be configured to display a timestamp in the desired format.

Notes

The implementation details of parsing the promptFormat string and integrating it with the CLI prompt display logic are not specified in the issue, so further investigation is needed to determine the best approach.

Recommendation

Apply workaround by adding the proposed promptFormat setting to the settings.json file and implementing the necessary logic to parse and display the customized prompt. This allows for a flexible solution that can be easily extended to support different timestamp formats and other customizations.

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: Add timestamp to CLI input prompt [1 participants]