You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Claude Code logs split cache writes into ephemeral_5m_input_tokens and ephemeral_1h_input_tokens. ccusage already reads both for pricing, but reports only show one combined cache create number.
I'd like to add the 1h part to modelBreakdowns in --json (e.g. cacheCreation1hTokens), Claude adapter only.
Why?
The TTL tier is decided server-side and you can't see it anywhere. In anthropics/claude-code#46829 people only noticed a 1h→5m change by writing their own scripts over the JSONL files.
It also varies a lot by model and by day. In my own logs claude-opus-5-5 was 100% 1h on 2026-10-30 and 27% on 2026-10-31, while claude-fable-5-1 sits around 3–15%. One combined number hides that.
How? (optional)
Add a cache_creation_1h_tokens field to ModelBreakdown, summed in the Claude daily/session paths and in the all-agents merge. It's skipped in JSON when zero, so other agents' output doesn't change. The 5m part is just total minus 1h.
I have this working locally with tests and a short note in docs/guide/json-output.md. Happy to open a PR if this sounds OK.
Requests a new optional JSON field to split 5m vs 1h cache creation tokens. Pricing already handles both tiers, so this is presentation only with no reported cost error and no maintainer endorsement.
🤖 Claude Opus 5.5 responding on behalf of @ryoppippi
#2059 adds an optional cacheCreation1hTokens field to JSON modelBreakdowns. It appears when the logs report a 5m/1h cache-write split for that model. The rest of cacheCreationTokens is the 5-minute writes plus writes from records without a split. See "Cache Write TTL Split" in the JSON output guide. It ships with the next release, and you are credited as co-author. Thanks for the request.
Activity
pullfrog commentedon Nov 2, 2026
github-actions commentedon Nov 2, 2026
Pullfrog triage: priority:low
Kind: feature request
Maintenance fit: excluded
Confidence: high
Requests a new optional JSON field to split 5m vs 1h cache creation tokens. Pricing already handles both tiers, so this is presentation only with no reported cost error and no maintainer endorsement.
Decision: closed by the contribution gate.
feat(adapter): report 1h cache writes in JSON model breakdowns (#2059)
ryoppippi commentedon Nov 10, 2026
Note
🤖 Claude Opus 5.5 responding on behalf of @ryoppippi
#2059 adds an optional
cacheCreation1hTokensfield to JSONmodelBreakdowns. It appears when the logs report a 5m/1h cache-write split for that model. The rest ofcacheCreationTokensis the 5-minute writes plus writes from records without a split. See "Cache Write TTL Split" in the JSON output guide. It ships with the next release, and you are credited as co-author. Thanks for the request.