Repository navigation
Codex Desktop long-running goal caused 137GB disk writes, WindowServer/FileProvider/CoreSpotlight load, and macOS hard reboot #26843
Description
Summary
A long-running Codex Desktop session on macOS appears to have generated extremely high local disk-write activity from the bundled codex process, followed by WindowServer / FileProvider / CoreSpotlight resource reports and a system-wide freeze severe enough that I had to force-reboot the Mac.
This does not look like memory pressure. Activity Monitor showed green memory pressure, memory_pressure reported no swap pressure, and local diagnostics show the strongest signals in disk writes, WindowServer CPU/compositing, FileProvider, and CoreSpotlight.
Environment
- App: Codex Desktop for macOS
- Codex version:
26.602.40724 - Codex build:
3593 - macOS:
26.5.1build25F80 - Hardware model:
Mac17,6 - Architecture: Apple Silicon / arm64e
- RAM:
128 GB - Framework observed in running process args:
Codex Framework.framework/Versions/149.0.7827.54
What happened
A Codex goal/session ran for a very long time after scope/context got out of control. The UI reported the goal running for about 13h 49m.
Afterward, the whole system became severely laggy / frozen. Sometimes it recovered after quitting Codex; in this case I had to force-reboot the machine. I have seen a related symptom before where Moonlight streaming became very laggy and immediately improved after quitting Codex.
This time I inspected macOS diagnostic reports right after reboot.
Reboot / panic evidence
The forced reboot occurred around:
2026-06-07 10:04:44 +0800
last reboot recorded the reboot, but last shutdown did not record a normal shutdown. After boot, DumpPanic checked for panic data but did not find a panic log:
DumpPanic launched after boot to check for device panic data
AppleNVMeReadPanicLogData successfully extracted 3145728 bytes of data
3145728 bytes were read from the file or device, but it did not contain any paniclog data (buffer was all zeros)
No paniclog data found in local device
loginwindow also reported this was not treated as startup after panic/hard reset:
previousStartupWasPanicOrHardReset:0
This isn't a startup after panic, clear last login panic pref
So this does not look like a normal kernel panic report. It looks more like user-space/system services became unusable and the machine had to be forcibly restarted.
Codex disk-write resource report
macOS generated a resource report for the bundled codex process:
Diagnostic report:
/Library/Logs/DiagnosticReports/codex_2026-06-07-020740_MacBook-Pro.diag
Date/Time: 2026-06-06 15:40:11.272 +0800
End time: 2026-06-07 02:07:39.846 +0800
Command: codex
Path: /Applications/Codex.app/Contents/Resources/codex
Event: disk writes
Action: none
Writes: 137.44 GB of file backed memory dirtied over 37649 seconds
Average: 3650.58 KB/s
Footprint: 122.88 MB -> 158.38 MB, max 618.05 MB
Start: 2026-06-06 16:00:41.323 +0800
End: 2026-06-07 02:07:17.969 +0800
The heaviest stack in that report is dominated by write paths, including pwrite and fsync.
This is the strongest signal. The resource report spans the same overnight long-running Codex session.
WindowServer resource report before reboot
macOS also generated a WindowServer CPU resource report earlier that morning:
Diagnostic report:
/Library/Logs/DiagnosticReports/WindowServer_2026-06-07-084050_MacBook-Pro.cpu_resource.diag
Date/Time: 2026-06-07 08:37:52.970 +0800
End time: 2026-06-07 08:40:49.613 +0800
Command: WindowServer
Event: cpu usage
CPU: 90 seconds cpu time over 177 seconds, 51% average
Footprint: 1822.88 MB
On Behalf Of: 1 sample Codex (Service) (Codex)
The stack is in display update / Metal compositing paths, e.g. CGXUpdateDisplay, WS::Updater::UpdateDisplays, CompositorMetal::CompositeLayersToDestination, and QuartzCore rendering.
This aligns with user-visible symptoms: global macOS UI lag and Moonlight streaming lag.
FileProvider / CoreSpotlight immediately after reboot
Within about one minute after the reboot, macOS generated disk-write reports for CoreSpotlight and FileProvider.
CoreSpotlight:
Diagnostic report:
/Library/Logs/DiagnosticReports/corespotlightd_2026-06-07-100857_MacBook-Pro.diag
Date/Time: 2026-06-07 10:05:34.957 +0800
End time: 2026-06-07 10:08:56.733 +0800
Event: disk writes
Writes: 2147.50 MB over 202 seconds, 10.64 MB/s average
Time Since Boot: 61s
Total CPU Time: 407.884s
On Behalf Of: 7 samples fileproviderd
FileProvider:
Diagnostic report:
/Library/Logs/DiagnosticReports/fileproviderd_2026-06-07-101040_MacBook-Pro.diag
Date/Time: 2026-06-07 10:05:35.168 +0800
End time: 2026-06-07 10:10:39.466 +0800
Event: disk writes
Writes: 2147.48 MB over 304 seconds, 7057.17 KB/s average
Time Since Boot: 62s
Total CPU Time: 728.829s
Live process sampling after reboot also showed high CPU in:
corespotlightd ~93-96% CPU
mds ~44-46% CPU
WindowServer ~40-44% CPU
fileproviderd ~22-25% CPU
This looks like the system was doing heavy post-reboot cleanup/indexing/sync work after the Codex session.
Computer Use service crashes in the same session
There were also repeated Codex Computer Use service crash reports around midnight:
~/Library/Logs/DiagnosticReports/SkyComputerUseService-2026-06-07-000545.ips
~/Library/Logs/DiagnosticReports/SkyComputerUseService-2026-06-07-000617.ips
~/Library/Logs/DiagnosticReports/SkyComputerUseService-2026-06-07-000627.ips
... many more between 00:05 and 00:11
Representative metadata:
procName: SkyComputerUseService
bundleID: com.openai.sky.CUAService
parentProc: Codex
coalitionName: com.openai.codex
exception: EXC_BREAKPOINT / SIGTRAP
termination: Trace/BPT trap: 5
The faulting thread includes AppKit/window APIs such as -[NSWindow windowNumber]. This may be a separate instability in Computer Use / Accessibility / window tracking, but it occurred during the same long-running Codex session.
Memory pressure was not the issue
During inspection after reboot:
Memory size: 128 GB
memory_pressure: System-wide memory free percentage: 66%
Swapins: 0
Swapouts: 0
Compressor pages: very low
So the failure mode appears to be disk writes / system service churn / WindowServer or UI compositing pressure rather than RAM exhaustion.
Expected behavior
A long-running Codex Desktop goal/session should not:
- dirty
137 GBof file-backed memory from the bundledcodexprocess; - keep system services such as FileProvider, CoreSpotlight, and WindowServer in high-load states;
- cause macOS-wide UI lag or Moonlight streaming lag;
- leave the machine in a state where force reboot is required;
- repeatedly crash
SkyComputerUseServiceduring the same long-running session.
Actual behavior
After a long-running Codex session:
- Codex generated a macOS disk-write resource report for
137.44 GBover ~10.5 hours. - WindowServer generated a CPU resource report with Metal/compositing stacks and a large footprint.
- FileProvider and CoreSpotlight generated disk-write reports immediately after reboot.
- The system became severely laggy/frozen; force reboot was required.
- Memory pressure remained green / non-critical.
Related issues
This seems related to, but more severe than:
- Codex Desktop on macOS keeps GPU process and WindowServer at high CPU after long session #23026 - Codex Desktop long session keeps GPU process and WindowServer high
- Codex Desktop on macOS causes sustained high CPU/GPU/WindowServer load and heating #24185 - sustained high CPU/GPU/WindowServer load
- Codex for macOS accumulates Computer Use / MCP helper processes and unreaped zombie children, causing HID lag and WindowServer/TCC stalls #25744 - Computer Use / MCP helper accumulation and WindowServer/TCC stalls
- Codex app on macOS triggers syspolicyd/trustd CPU loop and severely slows Xcode and Chrome #26795 - macOS system slowdown involving security/system services
This report adds a concrete Codex disk writes resource report (137.44 GB) tied to an overnight long-running goal, followed by hard-reboot-level system instability.
Privacy / attachments
I am not attaching raw diagnostic reports publicly because they may include local usernames, paths, process inventory, and private workspace details. I can provide redacted excerpts or raw reports privately if maintainers need them.
Activity
github-actions commentedon Jun 7, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
jason5545 commentedon Jun 7, 2026
Adding sanitized diagnostic excerpts from the local reports. User/home paths and host-specific details are redacted where they are not needed for the bug.
1. Codex disk-write resource report
Source report:
Extract:
The heavy stack in the report is dominated by write-related paths, including
pwrite,fsync,close,open, andunlink.2. WindowServer CPU resource report
Source report:
Extract:
The heavy stack is in display update / Metal compositing paths:
3. CoreSpotlight disk-write report immediately after reboot
Source report:
Extract:
Additional related samples in that report:
4. FileProvider disk-write report immediately after reboot
Source report:
Extract:
Additional related samples in that report:
5. Repeated Computer Use service crashes during the same long session
Files observed locally, redacted:
Representative metadata from the first report:
The faulting thread in the full report includes AppKit/window access such as
-[NSWindow windowNumber].6. Reboot timing / non-panic signal
Observed reboot time:
last rebootshowed:last shutdowndid not show a normal shutdown entry for that reboot.Unified log around boot showed
DumpPanicran after startup but found no panic data:This is why I suspect a user-space/system-service freeze followed by forced reboot rather than a standard kernel panic with a
.panicreport.7. Memory pressure note
Memory pressure was green / non-critical. Local checks after reboot showed:
So the issue is much more consistent with disk-write churn plus WindowServer/FileProvider/CoreSpotlight pressure than RAM exhaustion.
jason5545 commentedon Jun 7, 2026
Reviewed the suggested duplicate #25744.
I agree it is related, but I do not think this issue should be closed as a duplicate yet.
#25744 is primarily about a long-running macOS session accumulating many stale helper processes and unreaped zombie children:
SkyComputerUseClient mcpprocessesnode_replprocessescodex app-server --listen stdio://childrenThis issue has a different primary failure signal:
codexdisk-write resource report for the bundled/Applications/Codex.app/Contents/Resources/codexprocess;137.44 GBof file-backed memory dirtied over ~10.5 hours;pwrite/fsync;There is overlap in the symptom family, especially long-running session + Computer Use instability + WindowServer/system-service pressure. But #25744 does not appear to contain the
137.44 GBCodex disk-write resource report or the post-reboot FileProvider/CoreSpotlight evidence.So I would treat this as related to #25744, possibly same broad root-cause area, but not a strict duplicate unless maintainers decide the disk-write behavior is already covered by that investigation.
jason5545 commentedon Jun 9, 2026
Further investigation: heartbeat automation was a major amplifier
After the original report, we ran a controlled A/B test on the same machine.
What we found
A heartbeat automation was waking the same Codex thread every hour for several days. That thread had accumulated:
Every hourly wake-up reloaded the full thread state—tool history, renderer updates,
logs_2.sqlitegrowth. This was not a lightweight "check and exit."What changed
We replaced the heartbeat with a one-shot Python monitor run by
launchd. Each run scans once, writes a small JSON/text status, then exits. No sync, no git push, no persistent state. The original thread has been archived.Public issues matching this pattern
logs_2.sqlitegrowthRemaining concern
Even after removing the heartbeat, pre-B sampling showed 7 app-servers, 6 Computer Use client + node_repl helper groups, and a 41+ hour turn-ended residual process. The renderer jumped from 4.6% to 24.6% CPU between samples. These are not killed by removing heartbeat alone.
Our current take
Architecture observation
Automation should be isolated. Waking a 143 MB thread every hour to check a file system is a design gap—there is no per-thread cost cap, no lightweight wake-up mode, and no boundary that restricts how much accumulated state automation must carry.
etraut-openai commentedon Jun 10, 2026
This was caused by noisy logging. It's now fixed in recent versions.