401 on remote compaction (/responses/compact) in Codex App does not recover gracefully
Resolved 💬 8 comments Opened Apr 10, 2026 by Mygod Closed Jun 29, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of the Codex App are you using (From “About Codex” dialog)?
26.325.31654
What subscription do you have?
Pro
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
Codex App hit a one-off failure during remote compaction.
Full error:
Error running remote compact task: unexpected status 401 Unauthorized: You have insufficient permissions for this operation. Missing scopes: api.responses.write. Check that you have the correct role in your organization (Reader, Writer, Owner) and project (Member, Owner), and if you're using a restricted API key, that it has the necessary scopes., url: https://chatgpt.com/backend-api/codex/responses/compact, cf-ray: 9e9dacf1df5b902c-BOS, request id: 5e4f1b30-de95-4f14-b6f8-006b2b872fc6
Continuing the same session and compacting later seemed fine.
What steps can reproduce the bug?
I do not have a reliable repro yet but it was a very long running session. This was after an hour of work.
What is the expected behavior?
_No response_
Additional information
Retrying (telling it to continue) seems to fix this issue.
8 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Happened a second time in a row. Uploaded thread: 019d3ac7-e6ed-73d1-b8c8-3afdfe60d7e8
(happening every hour now)
Same thing here and its burning tokens
It looks like the issue might be due to a session running for way too long. I started a new session and so far haven't run into this again.
I started a new session and got it again already before my first comment.
got this error now.
Try to log out and log in again.
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
/feedbackand open a new bug report.