codex icon indicating copy to clipboard operation
codex copied to clipboard

cua_repl documentation arrives as a tool output and is requested again after every compaction

Open Tituca opened this issue 1 month ago • 2 comments

What version of the Codex App are you using (From “About Codex” dialog)?

ChatGPT desktop 26.930.31730 (macOS), bundled codex-cli 0.160.0, @oai/cua-repl 0.1.0

What subscription do you have?

Pro 500

What platform is your computer?

macOS 27.2 (arm64)

What issue are you seeing?

  1. The cua_repl documentation, about 11K tokens, reaches the model as a js tool output, not as a cacheable instruction item.
  2. instructions/macos/output.md line 3 tells the model: "If your context begins with a summary of an existing computer use task, call await cua.rewriteDocumentation()". Every compaction therefore re-emits the documentation, including when an earlier copy is still in context.
  3. The computer-use sections (about 3.2K tokens) and the confirmation policy (about 2.1K) are sent even when the task only uses the browser.

What steps can reproduce the bug?

  1. In the ChatGPT desktop app, start a Codex task that uses the browser or computer use through cua_repl.
  2. Continue the task until the thread compacts automatically.
  3. After the compaction, the model calls cua.rewriteDocumentation() and the full documentation arrives again as a js tool output.
  4. Count the js outputs carrying the documentation in the thread's rollout file. A new copy follows each compaction, and some copies are emitted while an earlier one is still in context.

What is the expected behavior?

  1. Deliver the documentation once per session as a cacheable instruction item, or keep it through compaction instead of asking the model to fetch it again.
  2. Skip the rewriteDocumentation request when the documentation is already in context.
  3. Send the computer-use sections and the confirmation policy only when computer use is in scope.

Additional information

Measured over 30 days on one account (rollout files, o200k_base count; the measured/o200k ratio was 1.001 over 316 pairs):

  1. 324 js outputs carried the documentation, in 62 of 123 lead sessions and in no helper session. The median size was 11,068 tokens, and the total was 3.08M.
  2. 206 of the 324 came from cua.rewriteDocumentation.
  3. 77 were emitted while an earlier copy was still in context.
  4. 13 were never followed by another js call.
  5. Each copy is re-sent with every later request until compaction, so the copies were carried for 289.5M input tokens. The 77 duplicates account for 42.7–58.0M of that.

Tituca avatar Oct 06 '26 16:10 Tituca

Urgent: computer-use failure after compaction

On the macOS desktop app, a computer-use task became blocked after conversation compaction. The computer-use documentation appeared truncated and was not retained in the subsequent context; the task also reported that its nested computer-use tool mapping was unavailable. Browser control has separately reported an accessibility-context qualification failure. We do not know whether these symptoms share a cause.

Could the team advise whether this issue covers those symptoms, and the supported steps to restore and safely verify reliable computer and browser control? Please let us know what minimal, non-sensitive diagnostic information would help.

gopala-lang avatar Nov 01 '26 20:11 gopala-lang

Confirmed on Windows x64 with the bundled browser plugin 26.1120.50957. Opening about:blank immediately after a cua_repl reset returned 12,995 tokens of documentation in each of two runs. One reset followed inactivity and the other was explicit.

Opening a blank tab Runs Documentation per run Total tool response per run
First call after reset 2 12,995 tokens 13,048 tokens
Additional tab in an initialized runtime 3 0 tokens 53 tokens

The blank tab’s own state was 41 tokens in all five runs. Counts use o200k_base on the recorded tool responses. This measures the first-call documentation overhead on Windows. The experiment did not measure billing or how often conversation compaction re-emits the documentation.

dd3ok avatar Nov 25 '26 02:11 dd3ok