Skip to content

Note

August 2, 2026

2 min read

I Gave Codex a Resource Budget. It Treated It as Context.

By Cristiano Pierry

Two nights of memory pressure taught me that operating limits for AI agents need to be enforced by the system, not merely explained in a prompt.

aiproduct-managementai-agentsworkflowcodex

At 8:35 on Sunday morning, my Mac restarted after a kernel panic. The report said macOS had gone 91 seconds without hearing from its watchdog and that compressed memory had reached 100 percent of its limit.

This is not usually how I learn that a project is done.

The previous night had produced a string of memory-pressure reports. In one snapshot, two WebKit GPU processes were using approximately 34 GB and 12 GB. During the next overnight run, Codex coordinated multiple agents to finish an interactive AI literacy curriculum, generate its illustrations, and test the result across browsers. One test suite ran 335 cases with seven workers. The website then ran 419 unit tests and started a production build with 13 static-generation workers.

The Codex goal completed around 2:30 a.m. The kernel panic came six hours later. The logs do not prove that one task directly caused the crash, but they do show that I had been operating the machine much closer to its limits than I understood.

The embarrassing part is that I had already written sensible operating rules. Codex-related processes had a 20 GB soft limit. A browser worker was supposed to stop at 8 GB. Browser-heavy work was supposed to run one session at a time, with memory checked between batches. Those limits lived in instructions, while nothing outside the task could enforce them.

A long-running agent does not experience the workload as one big decision. It sees the next reasonable action: retry the failed test, open a browser for visual review, or let the build use the available cores. Codex can keep a large project moving across code, design, testing, and integration while the combined workload becomes absurd. I had written a policy where I needed a circuit breaker.

The Mac now has one. Every 30 seconds, a small watchdog checks Codex-related processes, WebKit workers, and overall memory pressure. If it detects a dangerous worker or the critical compression pattern, it stops the browser workers rather than trusting the agent to notice the accumulation from inside its own task.

I am not backing away from long-running Codex workflows. The curriculum build is exactly why I find this moment interesting: one person can direct a substantial product effort across disciplines and receive a finished artifact after an overnight run. I want that workflow to stay ambitious, but the machine now gets to decide when the agent has had enough.


This writing reflects my personal perspectives on product management, AI, and content discovery. It does not represent the official position of my employer or any affiliated organization.