claude-code - 💡(How to fix) Fix [FEATURE] add time to JSONL "usage" property

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…

Code Example

"usage":{"input_tokens":3,"cache_creation_input_tokens":37097,
"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":37097,"ephemeral_1h_input_tokens":0},
"output_tokens":3}

---

"usage":{"input_tokens":3,"cache_creation_input_tokens":37097,
"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":37097,"ephemeral_1h_input_tokens":0},
"output_tokens":3,"duration_ms":3307}
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • This is a single feature request (not multiple features)

Problem Statement

The JSONL log is useful. It records agent usage in tokens, but not the time Claude is "thinking". I would like that to be recorded in the JSONL log.

Proposed Solution

Existing usage property in example JSONL entry :

"usage":{"input_tokens":3,"cache_creation_input_tokens":37097,
"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":37097,"ephemeral_1h_input_tokens":0},
"output_tokens":3}

Add another item in this dictionary:

"usage":{"input_tokens":3,"cache_creation_input_tokens":37097,
"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":37097,"ephemeral_1h_input_tokens":0},
"output_tokens":3,"duration_ms":3307}

Alternative Solutions

No response

Priority

Critical - Blocking my work

Feature Category

CLI commands and flags

Use Case Example

No response

Additional Context

No response

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