Repository navigation
Codex Desktop scheduled automation can replay 128K–146K context per call and consume >1.08M tokens in under a minute #42702
Description
What version of the Codex App are you using?
Observed runtime: Codex Desktop 26.901.22334, embedded CLI 0.153.0
What subscription do you have?
Paid ChatGPT plan with Codex access
What platform is your computer?
Windows 10.0.26100 x64
What issue are you seeing?
I observed a severe usage-accounting / context-replay problem in Codex Desktop involving a scheduled automation attached to an older thread.
A single scheduled automation run completed in about 54 seconds but caused 8 model sampling rounds. Each round carried roughly 128K–146K input tokens, even though the actual task was only to check whether an OpenAI Support conversation had received a reply.
The cumulative turn usage reached:
input_tokens: 1,081,077
cached_input_tokens: 944,128
output_tokens: 1,394
reasoning_output_tokens: 719
total_tokens: 1,082,471
The model was gpt-5.6-luna with reasoning effort low.
The input/context grew across the same single turn approximately as follows:
23:00:36Z ~128,087 cumulative tokens
23:00:42Z ~256,466
23:00:48Z ~385,033
23:00:54Z ~513,747
23:01:02Z ~647,515
23:01:08Z ~789,849
23:01:15Z ~935,980
23:01:23Z ~1,082,471
The scheduled automation was a heartbeat-style job that ran every 6 hours to check for a support reply. During this one run, the thread repeatedly invoked browser/computer-use tooling and re-sent a very large conversation/tool context on every model round.
This produced a visible, sudden increase in Codex/CLI usage despite the user doing almost nothing interactively at the time. It also matches the broader symptom described in #28908, where usage appears to decrease while Codex is otherwise idle.
Important local evidence
- The affected automation run was triggered from an older saved Desktop thread.
- The automation itself was very small: check for a support reply and stop monitoring once a reply exists.
- The run made 8 model calls in ~54 seconds.
- The payload was dominated by cached/replayed input context rather than model output.
- One browser/computer-use observation returned a very large tool result, and subsequent rounds continued to carry the accumulated thread/tool context.
- After the automation was deleted, local Codex session logs stopped showing new usage from that source.
- No other active automation remained after cleanup.
- The local config used
gpt-5.6-luna, reasoninglow; Fast/Priority mode had also been enabled earlier but was later disabled. Regardless of service tier, the context replay itself appears disproportionate to the tiny task.
For mitigation I changed the default model to gpt-5.6-sol, kept reasoning at low, disabled the explicit priority service tier, and set:
model_auto_compact_token_limit = 100000
model_auto_compact_token_limit_scope = "total"This is only a local mitigation; it does not address the underlying behavior of scheduled/old threads repeatedly replaying huge context.
What steps can reproduce the bug?
The exact trigger may depend on a long-lived thread, but the observed sequence was:
- Create or resume a Codex Desktop thread with substantial prior history/tool output.
- Add a scheduled heartbeat/automation to that thread (in this case every 6 hours).
- Let the scheduled run wake the old thread.
- Have the run use Browser/Computer Use to inspect a page.
- Observe
token_usage_recordentries after each tool/model round. - The same large historical/tool context is re-sent repeatedly, causing cumulative input usage to exceed 1M tokens within about a minute for a very small task.
Expected behavior
A small scheduled check should have bounded context cost. Old thread history and large browser/tool outputs should be compacted, summarized, or excluded before repeated model rounds. Cached/replayed context should not cause a tiny automation to consume an extreme fraction of a user's shared Codex allowance.
The product should also make it obvious when an automation is responsible for usage that occurs while the user is otherwise idle.
Actual behavior
The scheduled run repeatedly reprocessed a ~128K–146K-token context across 8 model rounds, reaching >1.08M cumulative tokens in ~54 seconds while producing only ~1.4K output tokens.
Related issue
- Codex usage limit decreases without corresponding user activity #28908 — Codex usage limit decreases without corresponding user activity
Additional diagnostic data
I have the exact local thread/turn identifiers and full token_usage_record timestamps available for OpenAI engineers if a private channel is preferred. I intentionally omitted private account details, local file paths, support-chat content, and full thread identifiers from this public issue.
Activity
github-actions commentedon Sep 4, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
271830740-dev commentedon Sep 20, 2026
Codex Desktop feedback:
DONT_NOTIFYheartbeat turns are visible and consume model usageDate: 2026-09-20 (Asia/Shanghai)
Environment: Codex Desktop on Windows 11 Pro 64-bit (build 26200); bundled/current CLI reports
codex-cli 0.155.0-alpha.9.2.Related existing reports: #42702 (scheduled automation context replay and extreme token accounting) and #34974 (repetitive heartbeat updates becoming full chat turns).
Summary
Codex Desktop heartbeat automations create a full model turn on every scheduled run. The heartbeat protocol requires a non-empty assistant final response even when the result is
DONT_NOTIFY. Those supposedly silent final responses are persisted/displayed in the task and consume model context/usage.This is not a one-off prompt mistake. A sanitized audit of one Windows machine's available local session files from July 2026 through 2026-09-19 found 563 unique assistant heartbeat final responses across 20 anonymized automation cases, including 500
DONT_NOTIFYresponses. The current incident alone generated 34 observed heartbeat replies in about 3 hours 23 minutes (31DONT_NOTIFY, 3NOTIFY) from a five-minute schedule.User impact
DONT_NOTIFYenvelope makes the client-side visibility problem worse, but removing that text would not remove the model invocation or usage cost.Raw session logs were not attached because they contain private business context. Automation identifiers have also been replaced with neutral case labels. This report contains only aggregate counts, dates, and the minimal reproduction.
Minimal reproduction
DONT_NOTIFY.Expected behavior
DONT_NOTIFYshould be consumed by the scheduler/client and never appear as a user-visible task message or notification.Actual behavior
DONT_NOTIFY.Sanitized local evidence
The following counts were extracted from the available local Codex session JSONL files on one machine by selecting top-level assistant final responses containing heartbeat decisions and deduplicating by assistant message ID. The search covered available files from July 2026 through 2026-09-19. These counts are a lower bound on visible finals, not an exact count of scheduler ticks or model invocations: missing/compacted files, paused intervals, and deduplication can reduce the observed total.
DONT_NOTIFYNOTIFYCASE-01CASE-02CASE-03CASE-04CASE-05CASE-06CASE-07CASE-08CASE-09CASE-10CASE-11CASE-12CASE-13CASE-14CASE-15CASE-16CASE-17CASE-18CASE-19CASE-20Current incident evidence:
CASE-07One compacted diagnostic event in the incident recorded more than 2.1 million raw turn tokens including cached input. This is a diagnostic counter, not a claim about billed credits, but it demonstrates the context amplification risk.
Confirmed local observations and root-cause hypothesis
The local evidence confirms that scheduled heartbeat inputs and assistant heartbeat finals recur, that many finals contain
DONT_NOTIFY, that those finals are present in the task record, and that raw model-token counters advance. Based on that evidence, the following product-mechanism explanation is the leading hypothesis and requires vendor confirmation:DONT_NOTIFY, and the client appears not to suppress that response before persisting/displaying it.DONT_NOTIFY, making the visibility defect more disruptive.In the observed runs, the saved prompt’s “remain silent when unchanged” instruction did not prevent the scheduled turn or the persisted final response.
Requested product changes
DONT_NOTIFYheartbeat finals before chat persistence, rendering, and notification delivery.Local mitigation already applied
1163850043.c-b-candobsidian).Privacy statement
No passwords, tokens, cookies, OTPs, session contents, customer data, or raw business records are included in this report.