Skip to content

Repeated 413 errors on compaction #11440

Closed

Description

@Plantain

What version of the IDE extension are you using?

0.4.71

What subscription do you have?

Pro

Which IDE are you using?

VS Code

What platform is your computer?

Darwin 24.6.0 arm64 arm

What issue are you seeing?

Repeatedly get into this state after a while on the same task and unable to make progress - any subsequent message triggers a compaction. Resuming the chat results in the same.

Error running remote compact task: unexpected status 413 Payload Too Large: <title>413 Payload Too Large</title>

413 Payload Too Large


cloudflare , url: https://chatgpt.com/backend-api/codex/responses/compact, cf-ray: 9cc3e53b69144874-BNE

Chatid 019c409c-983c-7dd2-b322-63d83b95de2c

What steps can reproduce the bug?

Long tasks with many compactions.

What is the expected behavior?

No response

Additional information

No response

Activity

  1. added
    contextIssues related to context management (including compaction)
    on Feb 11, 2026
  2. tomzlabs commented on Feb 23, 2026

    @tomzlabs

    Error running remote compact task: unexpected status 413 Payload Too Large: <title>413 Payload Too Large</title>

    413 Payload Too Large


    cloudflare , url: https://chatgpt.com/backend-api/codex/responses/compact, cf-ray: 9d2276fa7aa45aac-MEL

  3. nbarbettini commented on Feb 25, 2026

    @nbarbettini

    I hit this with Codex CLI (not an IDE integration). Agent halted unexpectedly with 413 Payload Too Large, and any attempt to continue failed with 413. Compaction also failed with 413. thread ID 019c8df6-36df-79f3-99df-30d0e7fe6697

  4. Code-Cats commented on Mar 13, 2026

    @Code-Cats

    I’m also hitting this consistently in ChatGPT Codex.

    Symptoms:

    • The conversation enters “auto compact / compress background” state.
    • Every subsequent message retriggers compaction.
    • Restarting the app or sending a new message in the same thread does not recover it.
    • The request fails with Cloudflare 413 on:
      https://chatgpt.com/backend-api/codex/responses/compact

    Observed error:
    Error running remote compact task: unexpected status 413 Payload Too Large:

    <title>413 Payload Too Large</title>

    413 Payload Too Large


    cloudflare

    cf-ray: 9db96b4fa9ef40fc-SIN

    What makes this especially bad:

    • Once a thread gets into this state, it appears permanently stuck.
    • Even short follow-up messages fail because compaction is retried first.
    • The only workaround is starting a brand new conversation and manually summarizing context.

    Expected behavior:

    • Compaction should chunk, trim, or otherwise bound payload size before sending.
    • If compaction fails, the thread should still remain usable instead of becoming unrecoverable.
    • Ideally the client should detect oversized compaction payloads and fall back to a smaller summary strategy automatically.

    If useful, I can provide screenshots of the UI state showing “auto compressing background information” immediately before the 413.

  5. Chi-Shan0707 commented on Jun 14, 2026

    @Chi-Shan0707

    I hit the same problem when trying to use Codex Cli to analyze some png files. When dealing with about less than 50 photos, it works. But it always failed if it tried to handle about 100 photos in a conversation.

  6. etraut-openai commented on Jun 29, 2026

    @etraut-openai
    Contributor

    Thanks for reporting this problem. Until recently, Codex used a separate endpoint and server-side logic for compaction. We recently switched to a more robust approach where the compaction logic is moved locally using the same endpoint as normal turns. This eliminates "remote compaction" errors and increases the stability and reliability of compaction operations. If you see further problems with compaction, please use /feedback and open a new bug report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcontextIssues related to context management (including compaction)extensionIssues related to the VS Code extension

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions