dotsfeed
← Updates

Codex

Codex-built agent burning money? Asana cut cost per run 4x by keeping the prompt cache intact

Verified· Oct 11, 2026Published Oct 11, 2026

Asana used Codex to find that its browser agent re-sent its whole history at full price. Caching the history and pruning screenshots in batches took GPT-6.1 Sol from $1.97 to $0.47 per run.

What changed

OpenAI published a case study (Oct 9) on Asana's StackAI browser agent. Using GPT-6 Astra in Codex to map the code, Asana found the agent cached its fixed instructions and tool definitions but not its growing history of page text and screenshots, so every call re-sent that history at full price. Worse, the agent deleted the previous screenshot and trimmed old text on every step, which changed an earlier part of the request and broke cache reuse almost every call. The fix had two parts: put a cache marker on the latest tool result so the history is cached too, and stop editing the history every call. They kept up to 20 screenshots and then cut back to 1 in one batch, so about 19 calls in a row reuse the cache, and raised the history budget from 120,000 to 480,000 characters so old text stopped getting trimmed. On GPT-6.1 Sol alone that cut cost 4x, from $1.97 to $0.47 per run, with 89% of input read from cache. Against the original production setup on another model, the total was 76x cheaper and 5x faster (about 4 minutes instead of 22.5+). Asana says Codex ran the 144-run study in about a week.

Who is affected

Anyone running long multi-step agents (browser agents, research loops, tool-heavy Codex-built automations) through an API that bills cached input at a discount. Plain ChatGPT users aren't affected.

What to do now

  1. Check whether your agent caches its history, not just the system prompt and tools.
  2. Look for anything that rewrites earlier messages each turn (dropping old screenshots, trimming text, reordering). A cache only reuses the longest unchanged prefix.
  3. Prune in batches instead of every step, and size the history budget to the model so you're not trimming constantly.
  4. Ask Codex to instrument your requests and report the cache hit rate before and after, the way Asana did.

What is not confirmed

The numbers come from one task (collecting fields for 32 books in a demo catalog) with three runs per condition. Your savings will depend on your agent, model, and provider cache pricing. The other three models in the study aren't named.

Sources: OpenAI case study · Asana write-up · @daniel_mac8 on X

Sources

Get updates like this every morning

  1. ① Email
  2. ② Card on Stripe
  3. ③ 7 days free

Then $2/month · cancel anytime in one click