Skip to main content

AI Usage > Input tokens (cache write)

Written by Tom Williams

Dataset: AI Usage

Entity: AI Usage Measurement

Field ID: input_tokens_cache_write

Type: Number

Description: The number of input tokens written to the prompt cache.

Not published by GitHub Copilot. This measurement is empty on GitHub Copilot records. It is populated by Claude Platform, Claude Code Telemetry and OpenAI Platform, and by Cursor once it is released.

Source: App

Transformation logic: N/A

App Mapping

GitHub Copilot

N/A

Claude Platform

tokens.cache_creation on Claude Code records; the ephemeral cache creation counters on direct API traffic

Claude Code Telemetry

claude_code.token.usage with type cacheCreation

Cursor (coming soon)

the sum of tokenUsage.cacheWriteTokens across the record's usage events

OpenAI Platform

the sum of input_cache_write_tokens and input_cache_write_12h_tokens

OpenAI Codex Enterprise

N/A

Reporting Use Cases

The Input tokens (cache write) field counts tokens written into the prompt cache so later turns can reuse them. Writes cost more than ordinary input tokens and pay for themselves only if the cache is then read.

  • Judging whether caching is paying off: Compare cache writes against cache reads. Writes well above reads mean context is being cached and then discarded.

  • Session behaviour: A high write to read ratio usually points to many short sessions rather than sustained ones.

Did this answer your question?