Skip to content

Codex Desktop: remote-compaction capacity error terminalizes one persistent goal while other tasks remain healthy #33171

Description

@adpena

What version of Codex are you using?

  • Codex Desktop on Windows
  • codex-cli 0.144.1 (subagent logs also reported 0.144.2)
  • ChatGPT-authenticated
  • Active model: gpt-5.6-sol, reasoning effort xhigh

What issue are you seeing?

A long-running persistent /goal task repeatedly reaches remote compaction and fails with:

Error running remote compact task: Selected model is at capacity. Please try a different model.

It then also surfaces:

Selected model is at capacity. Please try a different model.

The recoverable capacity/compaction failure is converted into terminal control-plane state:

  1. The goal changes from active to blocked.
  2. Automatic continuation stops and the user must send another message.
  3. The repository and shell remain healthy.
  4. Calling the goal creation API to replace/recover the task fails with:
    cannot create a new goal because this thread has an unfinished goal; complete the existing goal first
  5. The API therefore simultaneously treats the goal as terminally blocked and unfinished.
  6. Subagents forked from the affected task can also receive the same capacity error.

This task has accumulated more than 25 million total goal tokens across many compactions. The failure has recurred for several hours.

Strong control observation

At the same time, on the same Windows machine, Codex Desktop app, authenticated account, and service window, a separate task in another repository continues to work normally with no capacity failure.

That makes blanket account quota exhaustion or a global model outage unlikely. The failure appears scoped to the long-lived task's remote-compaction/admission/recovery path. Available usage is not a sufficient explanation because the healthy control task continues normally.

Reproduction

  1. Start a persistent /goal in Codex Desktop.
  2. Run it long enough to cross many automatic compactions and automatic continuations.
  3. Let a remote compact request receive a transient model-capacity response.
  4. Observe the goal becoming blocked and continuation stopping.
  5. Send a user message to resume; work can proceed, but the goal API still reports stale blocked/unfinished state.
  6. Compare with another task on the same account/app, which remains healthy.

I can provide the affected task ID privately if maintainers need it.

Expected behavior

A transient remote-compaction capacity error must not terminalize a persistent goal.

  • Retry with bounded backoff, or fall back to a supported local/dedicated compaction model.
  • Keep the goal active across recoverable compaction/admission failures.
  • If continuation cannot proceed immediately, preserve a recoverable state rather than blocked.
  • Allow an explicitly resumed user turn to clear stale blocked state.
  • Do not let create_goal deadlock on a state considered both blocked and unfinished.
  • Distinguish account quota, model admission, compact-endpoint capacity, and task-state failures in the UI.

Related issues

This report is distinct because it includes a same-account healthy control task and the stale blocked + unfinished goal-state deadlock.

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appapp-serverIssues involving app server protocol or interfacesbugSomething isn't workingconnectivityIssues involving networking or endpoint connectivity problems (disconnections)contextIssues related to context management (including compaction)

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions