Excessive SSD write churn from `scope_v3.json` and `models_cache.json`

Open 💬 3 comments Opened Jul 11, 2026 by W944

What version of the Codex App are you using (From “About Codex” dialog)?

26.707.41301

What subscription do you have?

Pro

What platform is your computer?

Darwin 25.5.0 arm64 arm

What issue are you seeing?

Summary

Codex/ChatGPT desktop appears to be repeatedly rewriting two very small JSON files, causing multiple GB/day of SSD writes:

  • ~/Library/Application Support/Codex/sentry/scope_v3.json
  • ~/.codex/models_cache.json

Over the last 7 days, these two files alone accounted for about 24.9 GB of path-attributed local NVMe writes, despite being only ~100 KB and ~270 KB on disk.

Environment

  • App: ChatGPT / Codex desktop
  • Bundle identifier: com.openai.codex
  • App version: 26.707.41301
  • Bundle version: 5103
  • macOS: 26.5.2, build 25F84
  • Architecture: arm64

Evidence

Measured using a persistent fs_usage -w -f filesys monitor, filtered to local NVMe writes.

Window:

2026-07-04 19:36 EDT -> 2026-07-11 19:36 EDT

Observed writes:

17.57 GB/week   2.51 GB/day   110,288 writes
~/Library/Application Support/Codex/sentry/scope_v3.json
Current file size: ~100.8 KB
Approx write amplification vs current size: ~170,000x

7.33 GB/week    1.05 GB/day    27,357 writes
~/.codex/models_cache.json
Current file size: ~270.1 KB
Approx write amplification vs current size: ~26,500x

Together:

24.90 GB/week
3.56 GB/day

These are not large growing files. They are tiny JSON files that appear to be rewritten frequently.

What these files appear to contain

scope_v3.json is Sentry diagnostic/error-reporting state. Locally it has top-level keys:

scope
event

models_cache.json appears to be the model list cache. Locally it has keys:

fetched_at
etag
client_version
models

Expected behavior

These files should only be rewritten when their contents materially change.

Examples:

  • models_cache.json should only change when model metadata is refreshed and differs, or on a reasonable cache interval.
  • scope_v3.json should not continuously rewrite the full Sentry scope/event JSON during normal use or idle/background operation.

Actual behavior

Both files are rewritten frequently enough to generate GB/day of SSD writes:

  • scope_v3.json: ~2.51 GB/day from a ~101 KB file
  • models_cache.json: ~1.05 GB/day from a ~270 KB file

This looks like whole-file rewrite churn rather than necessary append/growth behavior.

Impact

This creates unnecessary SSD wear. On my machine, overall SSD writes have been a concern, and these two tiny Codex files account for a meaningful chunk of daily writes by themselves.

Suggested fixes

  • Avoid rewriting JSON files when serialized contents have not changed.
  • Add debounce/throttling around Sentry scope persistence.
  • For models_cache.json, honor etag/cache freshness and skip writes when the fetched model list is identical.
  • Prefer atomic write only after comparing old/new content hash.
  • Consider moving volatile diagnostic state to memory or a less write-heavy persistence strategy.

Notes

I am not including the raw file contents because they may contain diagnostic/session metadata, but I can provide sanitized structure or additional fs_usage excerpts if useful.

What steps can reproduce the bug?

I do not have a minimal source-code reproducer, but this is reproducible by running the macOS ChatGPT/Codex desktop app during normal Codex usage while monitoring filesystem writes.

Reproduction steps

  1. Install/run ChatGPT/Codex desktop on macOS.
  2. Use Codex normally for interactive coding sessions over several hours/days.
  3. In parallel, monitor local NVMe filesystem writes with fs_usage.

Example monitor command:

sudo fs_usage -w -f filesys | grep -E 'scope_v3\.json|models_cache\.json'

For longer-term measurement, I ran a persistent fs_usage -w -f filesys monitor and aggregated local NVMe write bytes by process/path.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗