OpenAI Adds 12-Hour Prompt Caching To The Responses API, And Keeps The Codex Cache Indefinitely

Human Verified 👁 12 0

Share to: , and

Developer workspace with a 12-hour timeline of reusable cached prompt blocks for OpenAI persistent agents

OpenAI has added an optional 12-hour prompt-cache lifetime to its Responses API, letting developers keep shared instructions and context reusable across requests separated by hours instead of minutes. The company announced the option on October 20 through its OpenAI Developers account, pitching it at persistent agents that reuse the same context throughout the day — including its own dots product.

On the same day, Codex lead Tibo Sottiaux announced the consumer-side counterpart: for logged-in Codex and Work users, OpenAI now keeps the prompt cache with no expiry at all, so returning to an old conversation hours later still hits the cache. The pair of changes landed as day 16 of Codex’s 28-day run of daily quality-of-life releases.

API dashboard comparing OpenAI prompt cache write and read costs as a Codex conversation cache is kept indefinitely

How The 12-Hour Cache Option Works

Prompt caching stores the processed form of a prompt’s stable prefix — system instructions, tool definitions, reference material — so later requests can reuse it at a discounted rate instead of paying full input price again. Until now the Responses API’s cache lifetime option, set through the prompt_cache_options ttl field, offered a single 30-minute minimum lifetime. The new setting, “ttl”: “12h”, extends that minimum to twelve hours, and OpenAI’s documentation makes it available in the Responses API for GPT-5.6 and later models.

The longer lifetime is not free. A 12-hour cache write costs 2.5 times the standard input rate, double the 1.25 times charged for a write into the default 30-minute cache. Reads stay cheap under both options at 0.1 times the input rate — and 0.05 times on GPT-6.1 Sol — which is where the economics are decided: it pays only when the same material is read back repeatedly across longer gaps.

The Breakpoint Trap, Measured

An early hands-on test by ImportStatic, run against OpenAI’s documented billing rules with the openai-go SDK, shows why placement matters. Setting the 12-hour ttl at the top of a request also applies it to the implicit cache breakpoint, so every turn of a conversation writes its new tokens at the 2.5-times rate instead of 1.25 times. On a simulated 20-turn chat priced at GPT-6.1 Sol’s rates, that raised the input bill by 68 percent.

ImportStatic concludes the 12-hour setting belongs on one explicit breakpoint at the end of the material an agent reuses all day, and that it pays for itself when that material comes back at least three times with gaps longer than thirty minutes. An agent sending the same instructions twelve times, an hour apart, pays roughly a quarter of what the 30-minute cache would cost across the same day, by the published rates — the difference between a cache that survives a lunch break and one that does not.

Codex And Work Users Keep Their Cache Indefinitely

The API option has a simpler sibling inside OpenAI’s own products. Sottiaux posted that logged-in users across Codex and Work are now guaranteed to hit the cache when they return to an old conversation or resume after a few hours, with no penalty for the gap. For coding agents — where a session’s context can run to hundreds of thousands of tokens, as in the legacy-code migration work OpenAI has been showcasing — a cold cache on every return visit is a real cost, in money and in latency.

The caching push sits alongside OpenAI’s other agent moves this month, from acquiring Orchestra Bio for drug development to ChatGPT’s locked chats.

Why It Matters

Prompt caching is where the agent era’s unit economics are quietly being fought. An agent that runs all day resends its instructions, tools and accumulated context on every step; if none of that can be reused after a thirty-minute pause, the meter restarts constantly, and long-lived agents stay expensive no matter how cheap headline token prices become. A twelve-hour lifetime matches how agents actually work — bursts of activity separated by idle gaps, overnight pauses included — and OpenAI pricing the longer write at double the short one is an unusually honest signal of what retention costs on its side. The Codex change matters for the same reason at the human end: developers who close a coding session and return the next morning have been paying a re-read penalty for their own history, and removing it makes OpenAI’s own tools stickier in exactly the persistent, returning, context-heavy workflow the API option is designed to sell to everyone else. Rivals expose their own cache lifetimes and discounts, so cache terms are becoming part of how agent platforms compete, alongside the models themselves and the safety record behind reports like OpenAI’s latest misalignment disclosures.

Background

OpenAI introduced prompt caching to cut the cost of repeated prompt prefixes and rebuilt it for the GPT-6 family in September 2026, adding discounts of up to 90 percent on cached input reused inside a 30-minute window, plus a dashboard and diagnostics for cache misses. The 30-minute ceiling was the obvious limit for agents designed to run for hours or days, and the 12-hour option — together with indefinite retention inside Codex and Work — extends the same system to the timescales those products actually operate on.

Source: RuntimeWire and PANews, reporting OpenAI’s official October 20 announcements (OpenAI Developers and Tibo Sottiaux on X, and the API changelog); pricing analysis by ImportStatic.

Share to: , and

Faheem R. Khattak
Founder & Senior Editor

Senior automation engineer and AI marketing journo covering LLMs, algorithms, analytics, core updates, Bing search, and technical SEO.

✓ 10+ Years Covering Google Search & AI

0 Comments

Leave a Reply

Optional Take Tag:

🛡️ Spam protection: Honeypot + Time-Trap Active

This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Add as Preferred Source on Google Follow on Google News