Claude cache and stream evidence
Keep every cache meter and text stream outcome distinct.
Grow or Die preserves the official Messages client, including the native text stream, while recording final usage exactly once after the helper finishes.
Five-minute and one-hour writes
Cache creation is not one price. Five-minute and one-hour cache writes remain separate, alongside base input, cache reads, and output.
Native text stream preserved
The wrapper does not buffer or replace the provider stream. Final usage is recorded once when the native stream helper completes.
Unknown duration blocks cost
If a non-zero cache write cannot be assigned to the observed duration and model price, cost stays unknown instead of using the cheaper rate.
Customer link stays opaque
Use a stable internal account ID and a separate server identity link. Do not join Claude usage to payment evidence through an email address.
Full implementation recipe
Anthropic cache read and write cost by customer
See the cache cost recipe for the server wrapper, cost boundary, and payer identity method.