Native resource governance: progress-aware budgets, bounded reasoning escalation, and compaction-safe continuation
Problem
Please consider native resource governance as a core Codex capability, supported by model-level efficiency evaluations. Economical-model instructions alone did not reliably prevent a costly recovery and orchestration workflow.
Measured incident
Local session counters for 2026-10-21, 21:36–22:28 Europe/Madrid, recorded:
- 131 model invocations: 45 coordinator, 86 executor.
- 18,083,447 total tokens, including 17,489,408 cached input tokens.
- 441,072 non-cached input tokens and 152,967 output tokens. Reasoning is included in output, not added again.
- Coordinator: 6,708,081 total tokens, approximately 37% of this period's token total.
- Mean input per invocation: approximately 149k coordinator and 131k executor; executor peak approximately 244k.
The period completed two new open/cancel UI test cases, alongside recovery, diagnostics and orchestration. This is not a claim that the entire token total was unique text or billed at a single rate. The monetary charge is not independently verified.
After automatic context compaction, the executor returned a stale result from an earlier task and ended while the current queue remained unfinished. The user had to request continuation again.
Environment: Codex desktop, macOS/ARM64, local tools and serial executors. Installed CLI reports 0.163.0-alpha.10.2. Requested model settings included gpt-6.1-sol/medium and gpt-6-luna/medium or xhigh; effective billing attribution is unverified.
Separately, the user reports a mechanical video-download workflow remaining on Sol/High for approximately 24 hours until the user suggested a cheaper Luna setting. That example is user-reported and has not been independently metered in this report.
Contributing factors and uncertainty
Observed contributors include large repeated contexts, coordinator polling, excessive tool round trips, stale browser connection assumptions, incomplete request evidence, and loss of the current task after compaction. Our project instructions, custom safeguards and orchestration also contributed; this report does not establish that all excess usage originates in a single core defect or in the model alone.
Local corrections include serial execution with smaller task contexts, deterministic batches, dynamic browser-port discovery, and explicit reuse of valid evidence. Moving to a fresh context alone remained costly, so this is not presented as an already solved efficiency problem.
Requested core capabilities
- Persistent economical-execution preferences across delegation, resumption and compaction. Premium reasoning should require a specific bounded justification, then return to the economical execution setting.
- Project-wide budgets including the coordinator, subagents, retries and supervision, with clear cached/non-cached/output accounting and explicit distinction between reminders and enforced limits.
- Progress-aware detection and correction of unchanged retries, context inflation, repeated polling and disproportionate orchestration.
- Event-driven continuation when a worker ends with authorized work outstanding, while preventing duplicate effects and preserving completed evidence.
- A durable active-case and applied-effects record across compaction, separate from the full conversation history.
- Quality-and-efficiency evaluations measuring cost and time to an accepted deliverable, not merely eventual completion.
Please clarify which existing controls already cover these needs and which require product changes across desktop, CLI and model behavior.
Suggested acceptance tests
- A mechanical batch uses deterministic execution and an economical model unless a concrete exception justifies escalation; escalation ends after that exception is resolved.
- Repeated identical failures without new causal evidence trigger a method change rather than an unchanged retry.
- A compaction test preserves the current case, constraints, applied effects and next action, without returning a stale phase's completion.
- An authorized project budget includes delegated work and cannot be silently reset by spawning or resuming a worker.
- Monitoring consumes a small measured fraction of workflow resources and does not repeatedly wake a high-effort model just to poll a running process.
Related: #45974 (expensive polling of deterministic jobs). This request also covers model routing, shared budgets, compaction state and progress-sensitive correction.
Privacy and follow-up
Submitted with the user's explicit authorization. No source code, credentials, customer identities, private paths, raw session transcripts, account details or diagnostic attachments are included. Please provide a tracking reference and route this to the relevant Codex runtime and model-efficiency teams.
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
- #55180
- #55168
- #54900
- #55276
- #55876
Powered by Codex Action
Official Codex client feedback reference for correlation: no-active-thread-01a1604e-cae2-7020-b09f-bc4649150f9e.
The installed client's feedback/upload returned this reference with includeLogs=false, no extra log files and no attached session. The sanitized report links to this issue. OpenAI Help Center chat also received the sanitized summary and advised correlating this feedback reference here; it did not provide a separate Support case number or guarantee human escalation.
For the project-level subscription budget part of this request, there is an experimental open-source option: Partition.
It supports per-project 5-hour/weekly budgets for Claude Code and local Codex chats: warnings, a wrap-up instruction near the cap, and hook-based blocking of supported new prompts/tool calls. The two providers are tracked separately, and macOS is the tested desktop environment.
It is only a partial client-side workaround. Attribution is approximate, in-flight requests can overshoot, and it does not address model routing, compaction recovery, or progress-aware governance. Native support for the capabilities requested here would still be valuable.
@Joomlatech how did you find the coordinator and executor split, and how long did it take?
@kasrakhosravi Thanks for asking — the split came from two identifiable local session logs, corresponding to the coordinating chat and its serial executor. These were roles in our workflow, not billing categories inferred from model names.
How it was calculated
The original analysis used the local Codex rollout JSONL logs:
- Select the coordinator and executor sessions and the same timestamp window in both.
- Read
event_msg/token_count→payload.info.total_token_usage. - Take incremental differences from the last snapshot before the window through the final snapshot within it. Do not sum cumulative snapshots. The original check found no counter resets.
- Keep input, cached input and output separate: cached input is already included in input; reasoning output is already included in output.
That reproduces the figures in the issue: 6,708,081 coordinator + 11,375,366 executor = 18,083,447 tokens.
Rechecking the source logs for this reply revealed a correction. I also summed the per-response token_usage_record.payload.usage entries, deduplicated by session/response ID. In this window, the executor has a 253,036-token response associated with context compaction (249,399 input, including 243,712 cached; 3,637 output). Its response record contains that usage, but the adjacent cumulative token_count snapshot does not advance, and the original delta calculation therefore misses it.
The per-response totals are:
| Role | Recorded responses | Input, including cached | Cached input subset | Output | Total |
|---|---|---|---|---|---|
| Coordinator | 45 | 6,696,428 | 6,635,264 | 11,653 | 6,708,081 |
| Executor | 86 | 11,483,451 | 11,097,856 | 144,951 | 11,628,402 |
| Combined | 131 | 18,179,879 | 17,733,120 | 156,604 | 18,336,483 |
So the original figure needs that accounting qualification; the coordinator share remains approximately 37%. The 131 count includes the compaction response — it is not 131 user prompts or completed tests. The original executor input mean/peak also came from the snapshot-based accounting; including the compaction response gives approximately 133,529 / 249,399 input tokens.
Timing: the observed workflow window was 21 October, 21:36:05–22:28:01 Europe/Madrid: about 51 minutes 56 seconds. It included orchestration, recovery, diagnostics and idle time alongside the two new UI cases. It was not a clean benchmark of test execution alone.
If you meant how long the analysis took: the first aggregate was logged at about 22:29, and the expanded process review at about 22:44, following the 22:28 status/cost question. We did not separately time hands-on analysis, so I cannot give a precise effort figure.
These are local usage records from that particular build, not independently verified charges or effective model billing attribution. I am sharing the method and aggregate counts without uploading raw conversations or private project data.
@Joomlatech the coordinator and executor split you worked out by hand from the rollout JSONL is what Steery shows live: tokens per session and per sub-agent, Codex included. Sessions keep running on your own machine; try it at https://steery.dev/app (added an invite for your github username @Joomlatech if u like to try :heart:)
@kasrakhosravi Thanks for the invite! We’re interested in trying Steery’s Tracking Only mode with Codex, especially to compare the live token breakdown for the coordinating session and its subagents with our local measurements.
- What feedback would be most useful to you? Are there specific cases you’d like us to test?
- With Tracking Only enabled and session sharing off, which exact fields does the local app send to Steery’s servers? For example, does it send token counts, timestamps, model names, session IDs, titles or workspace paths? Do any prompt, response, tool call or transcript excerpts leave the machine in this mode? A redacted example payload or a field list would help.
@Joomlatech most useful to us: where the live split for the coordinator and its sub-agents differs from your JSONL numbers, and any Codex session it misses. For a session Steery only tracks, it sends the harness, session id, title, working directory, model, token counts, context left, timestamps, error text, and the last ~400 characters of the agent's latest thought, redacted. The transcript itself stays on your machine.
@kasrakhosravi Thanks for the clear breakdown. We’d like to run an isolated Codex test and compare Steery’s coordinator and subagent counts with the local JSONL records.
- Can we restrict Steery’s Tracking Only mode to a separate Codex test profile, for example a dedicated
CODEX_HOME, so it cannot discover, read, or report sessions from our regular Codex profile? - Can we turn off transmission of both error messages and the excerpt from the agent’s latest thought altogether, while keeping token counts and session tracking enabled? We’d like to omit those two fields entirely, even when the text would otherwise be redacted.
If both are supported, could you point us to the settings? We’ll wait for your answer before running the test.
@Joomlatech not today, for either one.
- Steery's Codex driver reads
CODEX_HOME, else~/.codex. But Steery's background service starts it without your shell's variables, so it reads~/.codex. There is no setting for one profile, and other harnesses on the machine are tracked too unless you remove their drivers (steery programs remove). - There is no switch to leave out the error text or the thought excerpt.
Both are now on our list. Today, a separate macOS user or a VM keeps the test apart from your regular profile.
I support native progress-aware resource governance. The independent local telemetry described in #64353 (our contribution) illustrates why model instructions alone are insufficient: repeated operations and cached context processing can consume considerable resources without equivalent progress. Please allow user-set soft and hard budgets across the entire task tree, with model-independent enforcement, bounded retries, deduplication of unchanged checks, and a checkpoint before exceeding a budget. Show the actual measured counters, estimates and limitations separately. A useful acceptance test is a task waiting on an unchanged external job: it should not repeatedly invoke an expensive model solely to poll it. Preserve evidence and require explicit authorisation for budget increases or material scope expansion. This is a resource-efficiency proposal, not a claim that cached tokens have zero cost or that a billing defect has been proven.