How I measured and changed the agent loops

A dated implementation snapshot from November 10, 2026. The scope was two enabled local build loops, not an account-wide billing audit.

What counted as a status-only turn?

The audit selected 12 local Codex session logs using the last imported usage snapshot, then refreshed counters from those original logs. Selection was bounded and was not an exhaustive current account ranking.

The conservative classifier required the capacity-wait instruction and only a recognized wrapper around the read-only capacity-status command. It excluded other calls, process reconciliation and resumed implementation. It found 145 measured turns, using 62,006,408 input tokens and 13,878 output tokens. Of the input, 61,115,520 tokens were cached and 890,888 were uncached.

Owner-attributed cumulative maxima prevented duplicate snapshot counting. Copied parent-thread counters were excluded. Cached input was already included in input. No authentication method, subscription allowance or invoice was inferred.

What replaced the model polling?

A short-lived local Python watcher samples capacity every minute and observes exact pending command identities. A blocked capacity request or unchanged command sends no readiness event. The existing owner-bound schedules receive deduplicated webhooks; no extra model schedule was created.

PID, process start time, boot identity and durable result paths distinguish pending work from a missing session handle. An exit, PID reuse or reboot is a reconciliation hint, never proof of success. Actual heavy work still passes through the shared workload gate.

How does continuation stay recoverable?

The owner saves canonical build state, then writes a compact packet with the preserved contract, source references, pending commands and next action. Each checkpoint arms one request generation. Delivery attempts are persisted before sending; duplicate generations are suppressed across restarted watcher ticks.

Before delivery, the watcher checks the enabled schedule, owner binding, prompt hash, archive state, pending input and actual run state. A cooldown limits successive generations. A user action racing after those checks still depends on the scheduler’s own gates.

HTTP 202 means queue acceptance, not execution. An uncertain delivery is not automatically resent. A crash before checkpointing or an expired queued event needs manual reconciliation.

What was checked?

Ten targeted tests passed, covering blocked capacity, duplicate suppression, restart, uncertain delivery, completion during pressure, PID reuse, packet integrity, unchanged continuation, cooldown, disabled or busy owners and a real HTTP fixture.

One live readiness event started the existing runtime owner. That run completed and armed a new command wait. The fraud owner stayed asleep while its eight watched commands were unchanged. This establishes the observed continuation round trip, not that a pending project regression passed or that the service has remained healthy since.

What has not been achieved?

The supported task-update API did not persist fresh-session mode. Compact packets are in place, but those owners still use continuing sessions. The packet character counts are not token counts.

The shared instruction file fell from 19,829 to 10,547 bytes. Detailed workflow sections were preserved behind task routing. This is a file-size change, not a measured token reduction. The app-injected skill catalog remained unchanged.

Review scoping remains instruction-level guidance. Mandatory independent checks, exact-head reviews and original repair limits still apply. Large usage, requested councils and cached input cannot automatically be called waste.

Actual after-period token savings, dollar savings and productivity gains remain unmeasured.