Skip to content

re-authing in pane1 causes infinite loop when pane2 tries to remotely compact #24931

Closed

Description

@relh

What version of Codex CLI is running?

0.133.0

What subscription do you have?

Pro

Which model were you using?

gpt-5.5

What platform is your computer?

Linux 6.8.0-41-generic x86_64 x86_64

What terminal emulator and version are you using (if applicable)?

tmux

Codex doctor report

What issue are you seeing?

While re-authing on a machine with a codex device token, I had an ongoing chat. At some point the ongoing chat said my access token had expired (sensibly because I had re-logged in again). However this happened as it was trying to remotely compact my conversation. It spun overnight, attempting over and over again to recompact the conversation. It ballooned the codex chat log into 350Gb+ and charged me ~50% of my weekly usage. I would like this addressed and my usage returned to me ideally.

What steps can reproduce the bug?

  1. login to an account in pane 1
  2. do some work in pane 1
  3. get to a point where pane 1 might be about to compact
  4. in pane 2 logout and login again
  5. pane 1 will fail remote compaction
  6. pane 1 will now proceed to fail over and over again creating a 350Gb codex log that bricks the computer and consumes ~50% of weekly usage over 15 hours or so.

What is the expected behavior?

No response

Additional information

No response

Activity

  1. added
    bugSomething isn't working
    on May 28, 2026
  2. selaquik commented on May 28, 2026

    @selaquik

    I’ve already been without Codex for a week. I’ve lost a lot because of this. It just dies during context compression and can’t compress the context anymore.

  3. added
    authIssues related to authentication and accounts
    contextIssues related to context management (including compaction)
    on May 28, 2026
  4. 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

    authIssues related to authentication and accountsbugSomething isn't workingcontextIssues related to context management (including compaction)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions