opencode bug misplaces cache_control in tool messages, causing full-price billing on long agent sessions

HawkingRadiation42 · ghdev · 2026-10-20

A bug report on opencode (v2.0.32) shows that with an openai-compatible provider pointed at an Anthropic-backed gateway and cacheFormat: "anthropic", the cachecontrol marker is placed inside the tool message's content array, where the gateway ignores it.

Developers running long agent sessions on this setup should check their cache read/write stats.

Original post →

More from coding & agent

coding & agent channel →