{
  "schema": "agent-public-bench@1",
  "generatedAt": "2026-10-07T00:00:00.000Z",
  "url": "https://agent.sasid.ai/benchmarks/prompt-cache-across-sessions",
  "study": {
    "slug": "prompt-cache-across-sessions",
    "title": "Does a new Claude Code session reuse the prompt cache of an earlier one?",
    "seoTitle": "Claude Code prompt caching across sessions, tested",
    "description": "30 calls: later Claude Code sessions showed near-full turn-1 cache reads with a fixed folder, but not with new folders in this sample. Codex CLI tested too.",
    "question": "In the earlier caching study, a new Claude Code session did not read the cache that an earlier session wrote. Does a fixed working folder change that, and does putting the ledger in the system prompt help?",
    "answer": "Later Claude Code sessions showed near-full turn-1 cache reads with a fixed folder. Setup A (new folder): 0 of 2 met the 50% rule, with a 95% interval of 0% to 66%. Setup B (fixed folder): 2 of 2, with a 95% interval of 34% to 100%. Setup C (fixed folder): 2 of 2, with a 95% interval of 34% to 100%. The per-setup intervals overlap. Later A sessions read 1,463 tokens and wrote 6,386 to 6,388 tokens. Later B sessions read 7,833 tokens and wrote 0 tokens. Later C sessions read 7,815 tokens and wrote 0 tokens. We interpret A’s reads as a shared CLI prefix. No token-level trace tests this reading. A post-hoc calculation pools both studies. New folder: 0 of 6, with a 95% interval of 0% to 39%. Fixed folder: 4 of 4, with a 95% interval of 51% to 100%. These intervals do not overlap. The earlier sessions used another login, ledger and turn count, with interleaved models. This pool is a rough check, not a controlled comparison. Mean later-session turn-1 cost at list price was $0.0259 in A and $0.0016 across B and C (calculation). The ratio is 16.2 (calculation). The cost stats show n and ranges. These are subscription calls, not bills. Turn-1 times do not isolate a cache effect. Each setup has n = 3 sessions. A: median 1.56 s, range 1.34 s to 1.62 s. B: median 1.76 s, range 1.71 s to 1.86 s. C: median 1.77 s, range 1.69 s to 1.78 s. Ranges are not confidence intervals. Codex turn-1 cached input ranged from 0 to 8,960 tokens across 6 calls. Its highest read share was 56% (calculation). The 50% rule counts 2 of 4 later sessions, with a 95% interval of 15% to 85%. The post-hoc 90% rule counts 0 of 4, with a 95% interval of 0% to 49%. Neither rule proves which tokens came from the ledger. A and B differ in folder, ledger seed and call order. These observations do not show that a fixed folder is necessary or that the folder caused the difference. The surviving protocol file dates from after the calls. Treat this analysis as exploratory.",
    "date": "2026-10-07",
    "updated": "2026-10-07",
    "tags": [
      "prompt-caching",
      "cache-reuse",
      "claude-code",
      "codex-cli",
      "claude-sonnet",
      "gpt-6-1-sol",
      "working-folder",
      "calculation"
    ],
    "method": [
      "The protocol claims a declaration at 00:32 UTC. Its surviving file has a birth time of 00:49:27 UTC. The first counted call started at 00:32:33 UTC. We cannot verify a pre-call protocol.",
      "The run kept every try and made no retries. The run log lists three amendments. They cover the post-hoc Codex rule, a post-hoc pooled calculation and text corrections after a check.",
      "Claude Code 2.1.286 ran Sonnet 5.5 at its default effort. Tools were off. No MCP servers. No session persistence across processes. Caching was at the provider default.",
      "A session is one CLI process with 2 turns. Turn 1 asks a quantity lookup over a seeded synthetic stock ledger. The ledger has 100 lines and about 9,600 characters. Turn 2 asks a warehouse lookup. Each question has one reference answer. The checker trims spaces, quotes, backticks, a final period and currency units before comparison.",
      "Each setup had 3 sessions with 2 turns each (6 calls). A used a new folder each time. B used a fixed folder. Both put the ledger in the first user message. C used a fixed folder and put the ledger in the system prompt.",
      "Each setup has its own ledger seed. Different seeds prevent full ledger-prefix reuse between setups. Shared CLI-prefix reads remain possible. Sessions of a setup ran back to back. The gap between one session's last call and the next session's first call was 508 to 720 ms.",
      "A later session is session 2 or 3. The protocol labels it reuse when turn 1 read at least half of its input from the cache. This is a counter-based rule; no token-level trace identifies the ledger. The cache counters are the provider’s: uncached input, cache reads and cache writes (with the 5-minute and 1-hour split).",
      "List-price cost is a calculation. It prices uncached input at the input price and reads at the cache-read price. It prices 1-hour writes at 2× the input price. The calls ran on a subscription, so nothing here is a bill.",
      "Codex CLI ran GPT-6.1 Sol at medium effort in setups A and B. Each setup had 3 sessions with 2 turns each. Tools, apps, plugins and web search were off. Each session used an ephemeral read-only thread. The app-server reports input and cached input, but no cache writes. Its own large system prompt could explain a cached count.",
      "The surviving protocol records a 50% threshold but dates from after the calls. This rule counts 2 of 4 later Codex sessions. The post-hoc 90% rule counts 0 of 4. The respective Wilson 95% intervals are 15% to 85% and 0% to 49%. The highest turn-1 read share was 56% (calculation). No token-level trace identifies the ledger.",
      "One uncounted probe call per route, with its own ledger seed, checked the driver before the counted calls. The answer checker is the one of the earlier study. Its control test (every reference answer passes, every planted wrong answer fails) ran after the counted calls, because no cache measure depends on it.",
      "No batch stopped early. Nothing was trimmed. The Claude CLI reported a rate-limit status of \"allowed_warning\" on 9 of 18 Claude turns. No call was refused and the run did not stop.",
      "The normalized-answer checker passed 18 of 18 Claude answers (95% interval 82% to 100%).",
      "The normalized-answer checker passed 12 of 12 Codex answers (95% interval 76% to 100%)."
    ],
    "caveats": [
      "The surviving protocol file was created after all counted calls. Its claimed 00:32 UTC declaration is not supported by its file birth time. Amendment 1 and 2 state 00:36 and 00:37 UTC, but separate pre-edit copies do not verify those times. The current summary was regenerated at 07:41 UTC. Treat the analysis as exploratory.",
      "The synthetic ledger and short lookup questions reuse a designed task shape from the earlier study. All 30 answers passed after text normalization (95% interval 89% to 100%), so correctness hits a ceiling. This is a cache-counter probe, not evidence about coding quality or general task success.",
      "The protocol gives conflicting Codex entry gates: 30% weekly allowance remaining for the optional half, but 20% before the batch. The gate script enforces 20%. No retained gate receipt proves the allowance at run time. Call caps were kept: 18 Claude calls and 12 Codex calls, plus one probe each.",
      "The sample is small: 2 later sessions per setup and route. A count of 2 of 2 has a 95% interval of 34% to 100%, so the per-setup counts alone do not separate the setups. The token counts were stable: every later session in A read the same 1,463 tokens, and later sessions in B read 7,833 tokens each and those in C read 7,815 each. The pooled comparison across both studies is post hoc.",
      "The 4 earlier sessions in the pooled new-folder count differ from this study's sessions. They ran under a different Claude login, with another ledger and 5 turns per session. Sonnet and Opus sessions ran interleaved, so same-model sessions were 13 to 27 seconds apart (calculation from the recorded call times), not under 1 second. The pooled counts are a rough check, not a controlled comparison.",
      "Consecutive sessions of the same setup ran less than one second apart. The cache entries were 1-hour writes. This run says nothing about reuse after a longer gap or after an entry expires.",
      "A and B differ in working folder, ledger seed and call order. We did not test whether the folder path, its name or another property of a new empty folder breaks the match. The CLI documents an option that moves its per-machine system-prompt sections (the working folder is one) into the first user message. We did not test it.",
      "Setup C ran only with a fixed folder. We did not test whether a ledger in the system prompt protects the cache against a changing folder.",
      "Tools were off and the working folder was empty. A real repository adds other session-specific text (for example git state). We did not test that.",
      "Total turn-1 Claude input, including the ledger, is about 7.8k tokens. We interpret the 1,463 reads in later A sessions as the shared CLI prefix; this was not tested. We tested one CLI version and one model per route: Claude Code 2.1.286 with Sonnet 5.5, and Codex CLI 0.160.0 with GPT-6.1 Sol. Larger rewritten inputs cost more at these list prices (calculation); this does not predict another workload’s cache use.",
      "Codex CLI reports no cache-write count and has a large system prompt of its own. Its turn-1 cached counts varied from 0 to 8,960 in each setup. Neither setup reached the post-hoc 90% threshold. The small sample cannot show that folders never matter. We did not test why. Do not rank Codex against Claude on these numbers.",
      "The Codex criterion for a full read (90% or more of its input) was set after we saw the Codex counts (Amendment 1). Under the 50% threshold we recorded in the protocol, 2 of 4 later Codex sessions would count (8,960 tokens cached in each, the count the Codex probe call showed, which we read as the Codex system prefix). The 90% rule, set after we saw the counts, gives 0 of 4. Their Wilson 95% intervals are 15% to 85% and 0% to 49%, respectively.",
      "Costs are list-price calculations. The calls used flat subscriptions. Turn times come from a Mac that also ran other agent work, so contention can add noise."
    ],
    "sourceIds": [
      "agent-cache-sessions",
      "calc-cache-pricing",
      "price-anthropic",
      "agent-caching-consistency"
    ],
    "hero": {
      "statIds": [
        "cache-sessions-later-reuse-a",
        "cache-sessions-later-reuse-b"
      ]
    },
    "stats": [
      {
        "id": "cache-sessions-later-reuse-a",
        "label": "Later sessions with at least 50% of turn-1 input cached, A: new folder each time",
        "value": 0,
        "unit": "rate",
        "display": "0 of 2 (95% interval 0% to 66%)",
        "n": 2,
        "ci": [
          0,
          0.6576
        ],
        "note": "Claude Sonnet 5.5 in Claude Code. A later session is session 2 or 3. Reused = turn-1 read share of 0.5 or more. The surviving protocol records this rule but dates from after the calls. No token-level trace identifies the ledger."
      },
      {
        "id": "cache-sessions-later-reuse-b",
        "label": "Later sessions with at least 50% of turn-1 input cached, B: fixed folder",
        "value": 1,
        "unit": "rate",
        "display": "2 of 2 (95% interval 34% to 100%)",
        "n": 2,
        "ci": [
          0.3424,
          1
        ],
        "note": "Claude Sonnet 5.5 in Claude Code. A later session is session 2 or 3. Reused = turn-1 read share of 0.5 or more. The surviving protocol records this rule but dates from after the calls. No token-level trace identifies the ledger."
      },
      {
        "id": "cache-sessions-later-reuse-c",
        "label": "Later sessions with at least 50% of turn-1 input cached, C: fixed folder, ledger in system prompt",
        "value": 1,
        "unit": "rate",
        "display": "2 of 2 (95% interval 34% to 100%)",
        "n": 2,
        "ci": [
          0.3424,
          1
        ],
        "note": "Claude Sonnet 5.5 in Claude Code. A later session is session 2 or 3. Reused = turn-1 read share of 0.5 or more. The surviving protocol records this rule but dates from after the calls. No token-level trace identifies the ledger."
      },
      {
        "id": "cache-sessions-pooled-new-folder",
        "label": "Later sessions with at least 50% of turn-1 input cached, new folders, pooled across studies",
        "value": 0,
        "unit": "rate",
        "display": "0 of 6 (95% interval 0% to 39%)",
        "n": 6,
        "ci": [
          0,
          0.3903
        ],
        "note": "Calculation, post hoc (Amendment 2): this study’s setup A plus the earlier study’s 4 later Claude Code sessions (2 Sonnet, 2 Opus; 5 turns per session; another ledger). The 4 earlier sessions ran under a different Claude login, with Sonnet and Opus sessions interleaved: 13 to 27 seconds between a session’s last call and the next same-model session’s first call (calculation), against under 1 second here."
      },
      {
        "id": "cache-sessions-pooled-fixed-folder",
        "label": "Later sessions with at least 50% of turn-1 input cached, fixed folder, B and C pooled",
        "value": 1,
        "unit": "rate",
        "display": "4 of 4 (95% interval 51% to 100%)",
        "n": 4,
        "ci": [
          0.5101,
          1
        ],
        "note": "Calculation, post hoc (Amendment 2): setups B and C differ in where the ledger sits."
      },
      {
        "id": "cache-sessions-turn1-usd-new-folder",
        "label": "Turn-1 list-price cost of a later session, new folder each time (calculation)",
        "value": 0.025875,
        "unit": "usd",
        "display": "$0.0259",
        "n": 2,
        "note": "Mean of sessions 2 and 3, setup A; range $0.025871 to $0.025879. Calculation from recorded tokens and list prices; not a bill."
      },
      {
        "id": "cache-sessions-turn1-usd-fixed-folder",
        "label": "Turn-1 list-price cost of a later session, fixed folder (calculation)",
        "value": 0.001599,
        "unit": "usd",
        "display": "$0.0016",
        "n": 4,
        "note": "Mean of sessions 2 and 3 in setups B and C; range $0.001597 to $0.001601. Calculation from recorded tokens and list prices; not a bill."
      },
      {
        "id": "cache-sessions-turn1-cost-ratio",
        "label": "Turn-1 cost of a later session: new folder as a multiple of fixed folder (calculation)",
        "value": 16.18,
        "unit": "ratio",
        "display": "16.2×",
        "n": 6,
        "note": "Calculation. Turn-1 input here is about 7.8k tokens, including the ledger. A different workload can change both token use and cache matches."
      },
      {
        "id": "cache-sessions-codex-declared-threshold",
        "label": "Later Codex CLI sessions with at least 50% of turn-1 input cached (protocol threshold)",
        "value": 0.5,
        "unit": "rate",
        "display": "2 of 4 (95% interval 15% to 85%)",
        "n": 4,
        "ci": [
          0.15,
          0.85
        ],
        "note": "Counter threshold only. A prefix read can meet it; it does not prove that the ledger was read. The surviving protocol was created after the calls."
      },
      {
        "id": "cache-sessions-codex-later-reuse",
        "label": "Later Codex CLI sessions with at least 90% of turn-1 input cached (post-hoc rule) (setups A and B)",
        "value": 0,
        "unit": "rate",
        "display": "0 of 4 (95% interval 0% to 49%)",
        "n": 4,
        "ci": [
          0,
          0.4899
        ],
        "note": "GPT-6.1 Sol at medium effort. Reused = cached input of 90% or more of the input (Amendment 1, set after the counts were seen); the highest turn-1 cached share was 56%. Under the 50% threshold we recorded in the protocol, 2 of 4 later Codex sessions would count (8,960 tokens cached in each, the count the Codex probe call showed, which we read as the Codex system prefix). The 90% rule, set after we saw the counts, gives 0 of 4. Their Wilson 95% intervals are 15% to 85% and 0% to 49%, respectively."
      },
      {
        "id": "cache-sessions-calls",
        "label": "Counted calls in this study (every one counted)",
        "value": 30,
        "unit": "calls",
        "display": "30 (18 Claude Code, 12 Codex CLI), plus 2 uncounted probe calls"
      }
    ],
    "charts": [
      {
        "id": "cache-sessions-turn1-read-share",
        "title": "Claude Sonnet 5.5 · Claude Code: share of turn-1 input read from the cache, by setup and session",
        "subtitle": "One bar per call: turn 1 of one session; 3 sessions per setup, run back to back; read-share calculation",
        "kind": "grouped-bar",
        "unit": "rate",
        "polarity": "none",
        "xLabel": "Setup",
        "yLabel": "Input tokens read from cache",
        "series": [
          {
            "name": "Session 1 (first in its setup)",
            "points": [
              {
                "label": "A: new folder each time",
                "value": 0.0676,
                "n": 1
              },
              {
                "label": "B: fixed folder",
                "value": 0.1867,
                "n": 1
              },
              {
                "label": "C: fixed folder, ledger in system prompt",
                "value": 0.0691,
                "n": 1
              }
            ]
          },
          {
            "name": "Session 2",
            "points": [
              {
                "label": "A: new folder each time",
                "value": 0.1863,
                "n": 1
              },
              {
                "label": "B: fixed folder",
                "value": 0.9997,
                "n": 1
              },
              {
                "label": "C: fixed folder, ledger in system prompt",
                "value": 0.9997,
                "n": 1
              }
            ]
          },
          {
            "name": "Session 3",
            "points": [
              {
                "label": "A: new folder each time",
                "value": 0.1863,
                "n": 1
              },
              {
                "label": "B: fixed folder",
                "value": 0.9997,
                "n": 1
              },
              {
                "label": "C: fixed folder, ledger in system prompt",
                "value": 0.9997,
                "n": 1
              }
            ]
          }
        ],
        "note": "Session 1 was the first session to use its setup’s ledger. Sessions 2 and 3 used that same ledger. Different seeds prevent full ledger-prefix reuse between setups; shared CLI-prefix reads remain possible. We interpret session-1 reads as a shared CLI prefix; no token-level trace proves this. Read share (calculation) = cache reads ÷ (uncached input + cache reads + cache writes), as the provider reports them. Each bar is one call, not a rate; the counts per setup are in the table. 2 later sessions per setup is a small number.",
        "sourceIds": [
          "agent-cache-sessions"
        ]
      },
      {
        "id": "cache-sessions-turn1-cost",
        "title": "Claude Sonnet 5.5 · Claude Code: list-price cost of turn 1, by setup and session (calculation)",
        "subtitle": "The recorded tokens of each call priced at list price; the last bar shows the mean of the 3 calls priced without any cache",
        "kind": "grouped-bar",
        "unit": "usd",
        "xLabel": "Setup",
        "yLabel": "USD (list price)",
        "series": [
          {
            "name": "Session 1 (first in its setup)",
            "points": [
              {
                "label": "A: new folder each time",
                "value": 0.02942,
                "n": 1
              },
              {
                "label": "B: fixed folder",
                "value": 0.025807,
                "n": 1
              },
              {
                "label": "C: fixed folder, ledger in system prompt",
                "value": 0.029242,
                "n": 1
              }
            ]
          },
          {
            "name": "Session 2",
            "points": [
              {
                "label": "A: new folder each time",
                "value": 0.025871,
                "n": 1
              },
              {
                "label": "B: fixed folder",
                "value": 0.001601,
                "n": 1
              },
              {
                "label": "C: fixed folder, ledger in system prompt",
                "value": 0.001597,
                "n": 1
              }
            ]
          },
          {
            "name": "Session 3",
            "points": [
              {
                "label": "A: new folder each time",
                "value": 0.025879,
                "n": 1
              },
              {
                "label": "B: fixed folder",
                "value": 0.001601,
                "n": 1
              },
              {
                "label": "C: fixed folder, ledger in system prompt",
                "value": 0.001597,
                "n": 1
              }
            ]
          },
          {
            "name": "Same call without a cache (every input token at the input price)",
            "points": [
              {
                "label": "A: new folder each time",
                "value": 0.015735,
                "n": 3
              },
              {
                "label": "B: fixed folder",
                "value": 0.0157,
                "n": 3
              },
              {
                "label": "C: fixed folder, ledger in system prompt",
                "value": 0.015664,
                "n": 3
              }
            ]
          }
        ],
        "note": "Calculation, not a bill: the calls ran on a subscription. Uncached input at the input price, cache reads at the cache-read price, 1-hour cache writes at 2× the input price (every write in this run was a 1-hour write); Sonnet 5.5 list prices, effective 2026-09-21. A write costs more than plain input, so a session that writes the ledger again costs more than no cache at all.",
        "sourceIds": [
          "agent-cache-sessions",
          "calc-cache-pricing",
          "price-anthropic"
        ]
      },
      {
        "id": "cache-sessions-turn-time",
        "title": "Claude Sonnet 5.5 · Claude Code: time per turn, by setup",
        "subtitle": "Median of 3 sessions; whiskers = fastest and slowest of the 3",
        "kind": "dot-range",
        "unit": "seconds",
        "yLabel": "Seconds",
        "series": [
          {
            "name": "Turn 1 (the ledger and question 1)",
            "points": [
              {
                "label": "A: new folder each time",
                "value": 1.56,
                "lo": 1.34,
                "hi": 1.62,
                "n": 3
              },
              {
                "label": "B: fixed folder",
                "value": 1.76,
                "lo": 1.71,
                "hi": 1.86,
                "n": 3
              },
              {
                "label": "C: fixed folder, ledger in system prompt",
                "value": 1.77,
                "lo": 1.69,
                "hi": 1.78,
                "n": 3
              }
            ]
          },
          {
            "name": "Turn 2 (question 2)",
            "points": [
              {
                "label": "A: new folder each time",
                "value": 1.02,
                "lo": 0.88,
                "hi": 1.14,
                "n": 3
              },
              {
                "label": "B: fixed folder",
                "value": 1.33,
                "lo": 1.31,
                "hi": 1.37,
                "n": 3
              },
              {
                "label": "C: fixed folder, ledger in system prompt",
                "value": 1.13,
                "lo": 1.09,
                "hi": 1.29,
                "n": 3
              }
            ]
          }
        ],
        "note": "Whiskers are a range (fastest and slowest of 3 sessions), not a confidence interval. Turn 2 read the cache in every setup. This design does not isolate a cache effect on speed. Ledger seed and call order also differ. The Mac also ran other agent work during these calls.",
        "whisker": "minmax",
        "sourceIds": [
          "agent-cache-sessions"
        ]
      },
      {
        "id": "cache-sessions-codex-turn1-cached",
        "title": "GPT-6.1 Sol (medium) · Codex CLI: cached input tokens on turn 1, by setup and session",
        "subtitle": "Turn-1 input was about 16,042 tokens in every call",
        "kind": "grouped-bar",
        "unit": "tokens",
        "xLabel": "Setup",
        "yLabel": "Cached input tokens",
        "series": [
          {
            "name": "Session 1 (first in its setup)",
            "points": [
              {
                "label": "A: new folder each time",
                "value": 4864,
                "n": 1
              },
              {
                "label": "B: fixed folder",
                "value": 0,
                "n": 1
              }
            ]
          },
          {
            "name": "Session 2",
            "points": [
              {
                "label": "A: new folder each time",
                "value": 8960,
                "n": 1
              },
              {
                "label": "B: fixed folder",
                "value": 8960,
                "n": 1
              }
            ]
          },
          {
            "name": "Session 3",
            "points": [
              {
                "label": "A: new folder each time",
                "value": 0,
                "n": 1
              },
              {
                "label": "B: fixed folder",
                "value": 0,
                "n": 1
              }
            ]
          }
        ],
        "note": "Cached input as the Codex app-server reports it (input includes the cached tokens; it reports no cache writes). Codex sends a large system prompt of its own, so a cached count of about 9,000 can come from that prefix alone. Each bar is one call. Not comparable with the Claude Code bars: different prefix, different cache.",
        "sourceIds": [
          "agent-cache-sessions"
        ]
      }
    ],
    "tables": [
      {
        "id": "cache-sessions-turns",
        "title": "Every counted turn",
        "columns": [
          {
            "key": "config",
            "label": "Route and model",
            "unit": "text"
          },
          {
            "key": "setup",
            "label": "Setup",
            "unit": "text"
          },
          {
            "key": "session",
            "label": "Session",
            "unit": "count"
          },
          {
            "key": "turn",
            "label": "Turn",
            "unit": "count"
          },
          {
            "key": "gap",
            "label": "Seconds since the previous session’s last call",
            "unit": "seconds"
          },
          {
            "key": "input",
            "label": "Input tokens (all)",
            "unit": "tokens"
          },
          {
            "key": "read",
            "label": "Read from cache",
            "unit": "tokens"
          },
          {
            "key": "written",
            "label": "Written to cache",
            "unit": "text"
          },
          {
            "key": "share",
            "label": "Read share",
            "unit": "rate"
          },
          {
            "key": "time",
            "label": "Time (s)",
            "unit": "seconds"
          },
          {
            "key": "withCache",
            "label": "USD with cache (calculation)",
            "unit": "usd"
          },
          {
            "key": "correct",
            "label": "Answer passes after normalization",
            "unit": "text"
          }
        ],
        "rows": [
          {
            "config": "Claude Sonnet 5.5 · Claude Code",
            "setup": "A: new folder each time",
            "session": 1,
            "turn": 1,
            "gap": null,
            "input": 7853,
            "read": 531,
            "written": 7320,
            "share": 0.0676,
            "time": 1.34,
            "withCache": 0.02942,
            "correct": "yes"
          },
          {
            "config": "Claude Sonnet 5.5 · Claude Code",
            "setup": "A: new folder each time",
            "session": 1,
            "turn": 2,
            "gap": null,
            "input": 7911,
            "read": 7851,
            "written": 58,
            "share": 0.9924,
            "time": 0.88,
            "withCache": 0.001856,
            "correct": "yes"
          },
          {
            "config": "Claude Sonnet 5.5 · Claude Code",
            "setup": "A: new folder each time",
            "session": 2,
            "turn": 1,
            "gap": 0.72,
            "input": 7851,
            "read": 1463,
            "written": 6386,
            "share": 0.1863,
            "time": 1.56,
            "withCache": 0.025871,
            "correct": "yes"
          },
          {
            "config": "Claude Sonnet 5.5 · Claude Code",
            "setup": "A: new folder each time",
            "session": 2,
            "turn": 2,
            "gap": null,
            "input": 7909,
            "read": 7849,
            "written": 58,
            "share": 0.9924,
            "time": 1.14,
            "withCache": 0.001856,
            "correct": "yes"
          },
          {
            "config": "Claude Sonnet 5.5 · Claude Code",
            "setup": "A: new folder each time",
            "session": 3,
            "turn": 1,
            "gap": 0.53,
            "input": 7853,
            "read": 1463,
            "written": 6388,
            "share": 0.1863,
            "time": 1.62,
            "withCache": 0.025879,
            "correct": "yes"
          },
          {
            "config": "Claude Sonnet 5.5 · Claude Code",
            "setup": "A: new folder each time",
            "session": 3,
            "turn": 2,
            "gap": null,
            "input": 7911,
            "read": 7851,
            "written": 58,
            "share": 0.9924,
            "time": 1.02,
            "withCache": 0.001856,
            "correct": "yes"
          },
          {
            "config": "Claude Sonnet 5.5 · Claude Code",
            "setup": "B: fixed folder",
            "session": 1,
            "turn": 1,
            "gap": null,
            "input": 7835,
            "read": 1463,
            "written": 6370,
            "share": 0.1867,
            "time": 1.86,
            "withCache": 0.025807,
            "correct": "yes"
          },
          {
            "config": "Claude Sonnet 5.5 · Claude Code",
            "setup": "B: fixed folder",
            "session": 1,
            "turn": 2,
            "gap": null,
            "input": 7893,
            "read": 7833,
            "written": 58,
            "share": 0.9924,
            "time": 1.33,
            "withCache": 0.001863,
            "correct": "yes"
          },
          {
            "config": "Claude Sonnet 5.5 · Claude Code",
            "setup": "B: fixed folder",
            "session": 2,
            "turn": 1,
            "gap": 0.51,
            "input": 7835,
            "read": 7833,
            "written": 0,
            "share": 0.9997,
            "time": 1.71,
            "withCache": 0.001601,
            "correct": "yes"
          },
          {
            "config": "Claude Sonnet 5.5 · Claude Code",
            "setup": "B: fixed folder",
            "session": 2,
            "turn": 2,
            "gap": null,
            "input": 7893,
            "read": 7891,
            "written": 0,
            "share": 0.9997,
            "time": 1.37,
            "withCache": 0.001642,
            "correct": "yes"
          },
          {
            "config": "Claude Sonnet 5.5 · Claude Code",
            "setup": "B: fixed folder",
            "session": 3,
            "turn": 1,
            "gap": 0.51,
            "input": 7835,
            "read": 7833,
            "written": 0,
            "share": 0.9997,
            "time": 1.76,
            "withCache": 0.001601,
            "correct": "yes"
          },
          {
            "config": "Claude Sonnet 5.5 · Claude Code",
            "setup": "B: fixed folder",
            "session": 3,
            "turn": 2,
            "gap": null,
            "input": 7893,
            "read": 7891,
            "written": 0,
            "share": 0.9997,
            "time": 1.31,
            "withCache": 0.001642,
            "correct": "yes"
          },
          {
            "config": "Claude Sonnet 5.5 · Claude Code",
            "setup": "C: fixed folder, ledger in system prompt",
            "session": 1,
            "turn": 1,
            "gap": null,
            "input": 7817,
            "read": 540,
            "written": 7275,
            "share": 0.0691,
            "time": 1.69,
            "withCache": 0.029242,
            "correct": "yes"
          },
          {
            "config": "Claude Sonnet 5.5 · Claude Code",
            "setup": "C: fixed folder, ledger in system prompt",
            "session": 1,
            "turn": 2,
            "gap": null,
            "input": 7875,
            "read": 7815,
            "written": 58,
            "share": 0.9924,
            "time": 1.29,
            "withCache": 0.001849,
            "correct": "yes"
          },
          {
            "config": "Claude Sonnet 5.5 · Claude Code",
            "setup": "C: fixed folder, ledger in system prompt",
            "session": 2,
            "turn": 1,
            "gap": 0.59,
            "input": 7817,
            "read": 7815,
            "written": 0,
            "share": 0.9997,
            "time": 1.78,
            "withCache": 0.001597,
            "correct": "yes"
          },
          {
            "config": "Claude Sonnet 5.5 · Claude Code",
            "setup": "C: fixed folder, ledger in system prompt",
            "session": 2,
            "turn": 2,
            "gap": null,
            "input": 7875,
            "read": 7873,
            "written": 0,
            "share": 0.9997,
            "time": 1.09,
            "withCache": 0.001629,
            "correct": "yes"
          },
          {
            "config": "Claude Sonnet 5.5 · Claude Code",
            "setup": "C: fixed folder, ledger in system prompt",
            "session": 3,
            "turn": 1,
            "gap": 0.69,
            "input": 7817,
            "read": 7815,
            "written": 0,
            "share": 0.9997,
            "time": 1.77,
            "withCache": 0.001597,
            "correct": "yes"
          },
          {
            "config": "Claude Sonnet 5.5 · Claude Code",
            "setup": "C: fixed folder, ledger in system prompt",
            "session": 3,
            "turn": 2,
            "gap": null,
            "input": 7875,
            "read": 7873,
            "written": 0,
            "share": 0.9997,
            "time": 1.13,
            "withCache": 0.001629,
            "correct": "yes"
          },
          {
            "config": "GPT-6.1 Sol (medium) · Codex CLI",
            "setup": "A: new folder each time",
            "session": 1,
            "turn": 1,
            "gap": null,
            "input": 16049,
            "read": 4864,
            "written": "not reported",
            "share": 0.3031,
            "time": 2.77,
            "withCache": null,
            "correct": "yes"
          },
          {
            "config": "GPT-6.1 Sol (medium) · Codex CLI",
            "setup": "A: new folder each time",
            "session": 1,
            "turn": 2,
            "gap": null,
            "input": 16078,
            "read": 15872,
            "written": "not reported",
            "share": 0.9872,
            "time": 1.55,
            "withCache": null,
            "correct": "yes"
          },
          {
            "config": "GPT-6.1 Sol (medium) · Codex CLI",
            "setup": "A: new folder each time",
            "session": 2,
            "turn": 1,
            "gap": 0.51,
            "input": 16051,
            "read": 8960,
            "written": "not reported",
            "share": 0.5582,
            "time": 3.98,
            "withCache": null,
            "correct": "yes"
          },
          {
            "config": "GPT-6.1 Sol (medium) · Codex CLI",
            "setup": "A: new folder each time",
            "session": 2,
            "turn": 2,
            "gap": null,
            "input": 16080,
            "read": 15872,
            "written": "not reported",
            "share": 0.9871,
            "time": 1.65,
            "withCache": null,
            "correct": "yes"
          },
          {
            "config": "GPT-6.1 Sol (medium) · Codex CLI",
            "setup": "A: new folder each time",
            "session": 3,
            "turn": 1,
            "gap": 0.58,
            "input": 16053,
            "read": 0,
            "written": "not reported",
            "share": 0,
            "time": 4.13,
            "withCache": null,
            "correct": "yes"
          },
          {
            "config": "GPT-6.1 Sol (medium) · Codex CLI",
            "setup": "A: new folder each time",
            "session": 3,
            "turn": 2,
            "gap": null,
            "input": 16082,
            "read": 15872,
            "written": "not reported",
            "share": 0.9869,
            "time": 1.68,
            "withCache": null,
            "correct": "yes"
          },
          {
            "config": "GPT-6.1 Sol (medium) · Codex CLI",
            "setup": "B: fixed folder",
            "session": 1,
            "turn": 1,
            "gap": null,
            "input": 16033,
            "read": 0,
            "written": "not reported",
            "share": 0,
            "time": 2.56,
            "withCache": null,
            "correct": "yes"
          },
          {
            "config": "GPT-6.1 Sol (medium) · Codex CLI",
            "setup": "B: fixed folder",
            "session": 1,
            "turn": 2,
            "gap": null,
            "input": 16062,
            "read": 15872,
            "written": "not reported",
            "share": 0.9882,
            "time": 1.54,
            "withCache": null,
            "correct": "yes"
          },
          {
            "config": "GPT-6.1 Sol (medium) · Codex CLI",
            "setup": "B: fixed folder",
            "session": 2,
            "turn": 1,
            "gap": 0.56,
            "input": 16033,
            "read": 8960,
            "written": "not reported",
            "share": 0.5588,
            "time": 2.82,
            "withCache": null,
            "correct": "yes"
          },
          {
            "config": "GPT-6.1 Sol (medium) · Codex CLI",
            "setup": "B: fixed folder",
            "session": 2,
            "turn": 2,
            "gap": null,
            "input": 16062,
            "read": 15872,
            "written": "not reported",
            "share": 0.9882,
            "time": 1.58,
            "withCache": null,
            "correct": "yes"
          },
          {
            "config": "GPT-6.1 Sol (medium) · Codex CLI",
            "setup": "B: fixed folder",
            "session": 3,
            "turn": 1,
            "gap": 0.63,
            "input": 16033,
            "read": 0,
            "written": "not reported",
            "share": 0,
            "time": 3.93,
            "withCache": null,
            "correct": "yes"
          },
          {
            "config": "GPT-6.1 Sol (medium) · Codex CLI",
            "setup": "B: fixed folder",
            "session": 3,
            "turn": 2,
            "gap": null,
            "input": 16062,
            "read": 15872,
            "written": "not reported",
            "share": 0.9882,
            "time": 2.9,
            "withCache": null,
            "correct": "yes"
          }
        ]
      }
    ],
    "related": [
      "caching-consistency"
    ]
  },
  "sources": [
    {
      "id": "agent-caching-consistency",
      "title": "Caching sessions and repeated prompts (Claude Code and Codex CLI)",
      "kind": "run",
      "date": "2026-10-06",
      "note": "Part 1: 5-turn CLI sessions over a fixed synthetic ledger, with the cache counters each provider reports per turn. Part 2: three prompts with deterministic validators, 10 repetitions per model. Declared protocols, validator controls before inference, every attempt kept; answers are published as ordinal ids, never as text.",
      "data": [
        "/benchmarks/raw/caching-consistency/caching.json",
        "/benchmarks/raw/caching-consistency/consistency.json"
      ]
    },
    {
      "id": "price-anthropic",
      "title": "Anthropic list prices (Claude models)",
      "kind": "price-list",
      "date": "2026-09-21",
      "url": "https://platform.claude.com/docs/en/about-claude/pricing",
      "note": "Prices as listed by the vendor on 2026-09-21 and recorded in the product price table. Cache reads at the listed rate, one-hour cache writes at twice the input price."
    },
    {
      "id": "calc-cache-pricing",
      "title": "Cost with and without the prompt cache (calculation)",
      "kind": "calculation",
      "date": "2026-10-06",
      "note": "Recorded tokens per turn × Anthropic list prices. With the cache: uncached input at the input price, cache reads at the cache-read price, 1-hour cache writes at twice the input price, 5-minute writes at 1.25 times (an assumption; none occurred). Without a cache: every input token at the input price. Output is priced the same in both. Not a bill.",
      "data": [
        "/benchmarks/raw/caching-consistency/caching.json"
      ]
    },
    {
      "id": "agent-cache-sessions",
      "title": "Prompt cache across sessions",
      "kind": "run",
      "date": "2026-10-07",
      "data": [
        "/benchmarks/raw/cache-sessions/sessions.json"
      ],
      "note": "Sanitized cache-session receipts: one CLI process per session, 2 turns each, a seeded synthetic ledger (a different seed per condition) and 2 short questions with exact answers. Conditions: A a new temporary working folder per session, B one fixed folder, C a fixed folder with the ledger in the system prompt (Claude Code only). The Codex app-server reports cached input only, so its rows have no cache-write count. Probes are single uncounted calls with their own ledger seed. The answers and the ledger itself are not published. Session 1 was the first use of each setup’s ledger; sessions 2 and 3 reused that ledger. Different seeds prevent full ledger-prefix reuse between setups, but shared CLI-prefix reads remain possible. Correctness uses the reference checker after it trims spaces, surrounding quotes and backticks, a final period and currency units. The surviving protocol file dates from after the counted calls; pre-call declaration is not verified."
    }
  ]
}
