Codex Desktop emits “remote compact task” model-capacity error during automatic compaction

Open
#35,911 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust

Research direction

Start by tracing Codex Desktop's automatic-compaction flow through the normal-turn endpoint and the reported “remote compact task” error. Reproduce with the supplied session details and sequence, then compare the transient capacity failure with the later successful compaction. Done means compaction retries or offers retry without asking the user to change models or losing task state.

Written by the indexing model from the issue text.

Description

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

26.721.41059

What subscription do you have?

Plus

What platform is your computer?

macOS on Apple Silicon, with Codex Desktop connected to an ARM64 Linux devcontainer. Remote environment: Linux 6.12.76-linuxkit aarch64 Codex runtime 0.145.0

What issue are you seeing?

Automatic context compaction failed twice with:
"Error running remote compact task: Selected model is at capacity. Please try a different model."

The UI first displayed “Context automatically compacted” and then displayed the error. Sending another message caused the same sequence to occur again.

I did not change models. The same task later recovered and continued successfully, demonstrating that changing models was neither necessary nor desirable.

This is especially confusing because the error refers to a “remote compact task” and instructs the user to change models.

A Codex contributor previously stated that compaction had moved locally to the normal-turn endpoint to eliminate remote-compaction errors. Reporting this error again per their comment:
https://github.com/openai/codex/issues/28303#issuecomment-4835137748
"If you see further problems with compaction, please use /feedback and open a new bug report."

What steps can reproduce the bug?
  1. Open a long-running task in Codex Desktop connected to a remote devcontainer.
  2. Use gpt-5.6-sol with medium reasoning effort.
  3. Continue the task until automatic context compaction is triggered.
  4. In this occurrence, the preceding turn used approximately 223,423 of the 258,400-token context window (86.5%).
  5. Send a normal user prompt and allow Codex to continue working.
  6. Observe “Context automatically compacted.”
  7. Observe: “Error running remote compact task: Selected model is at capacity. Please try a different model.”
  8. Send another normal message without changing models.
  9. Observe the compaction message and the same error again.
  10. The task subsequently recovers without changing models.

Session ID:
019fa659-bf28-73b1-8d9c-4ad2eb3e14f7

Approximate occurrence:
2026-07-29 06:30–06:38 UTC

Feedback ID:
[PASTE THE ID RETURNED BY /feedback HERE]

What is the expected behavior?

Automatic compaction should complete using the currently selected model.

If a transient capacity failure occurs, Codex should retry transparently or offer a retry action while preserving the selected model. It should not tell the user to change models when the task can recover without doing so.

The task’s tools, pending command state, and context should remain intact.

Additional information

Selected model: gpt-5.6-sol
Reasoning effort: medium
Codex runtime: 0.145.0
App version: 26.721.41059
Subscription: Plus
Remote environment: Linux 6.12.76-linuxkit aarch64
Task originator recorded as: Codex Desktop
Task source recorded as: vscode

At the token event immediately before the failure:

  • Context use was approximately 86.5%.
  • Account rate-limit use was reported as 0%.
  • No rate-limit-reached type was recorded.

The task eventually recovered after a later compaction attempt. No repository changes or pending command output were lost.

Dominant language
Rust
Stars
125k
Forks
19.5k
Avg merge
1m
Merged PRs (30d)
1k

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openai/codex

All issues in openai/codex

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.