Context compaction on remote connection failing due to invalid value: `context_compaction`

Resolved 💬 5 comments Opened Jun 5, 2026 by hamvzy 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.602.30954

What subscription do you have?

Business

What platform is your computer?

Darwin 24.6.0 arm64 arm

What issue are you seeing?

Automatic context compaction failed returns the following error [ItemParam] [input[708]] [invalid_enum_value] Invalid value: 'context_compaction'. Supported values are: 'additional_tools', 'apply_patch_call', 'apply_patch_call_output', 'code_interpreter_call', 'compaction', 'compaction_trigger', 'computer_call', 'computer_call_output', 'custom_tool_call', 'custom_tool_call_output', 'file_search_call', 'function_call', 'function_call_output', 'image_generation_call', 'item_reference', 'local_shell_call', 'local_shell_call_output', 'mcp_approval_request', 'mcp_approval_response', 'mcp_call', 'mcp_list_tools', 'message', 'reasoning', 'shell_call', 'shell_call_output', 'tool_search_call', 'tool_search_output', and 'web_search_call'.

Manual compaction fails with the same error.

Attempted to restart codex app. Compaction still fails due to same issue

What steps can reproduce the bug?

Try command /compact to reproduce issue.

Output of my /status

Session:
019d9c3c-cda7-73f0-a629-526a13ece734
Context:
7% left (239,039 used / 258K)
5h limit:
██████████████████████████░░░░░░░░░░░░░░░░░░░░░░
55% left
(resets 2:30 PM)
7d limit:
██████████████████████████████░░░░░░░░░░░░░░░░░░
62% left
(resets Jun 11)
 ```

### What is the expected behavior?

Compaction shall be done completely without error.

### Additional information

_No response_

View original on GitHub ↗

5 Comments

github-actions[bot] contributor · 2 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #26493

Powered by Codex Action

hamvzy · 2 months ago

Submitted feedback, feedback id 019d9c3c-cda7-73f0-a629-526a13ece734

hamvzy · 2 months ago

I figured out. My codex app version updated its codex cli to latest 0.137 but my remote codex cli wasn't updated to latest. After updating my remote codex cli to latest, it still didn't work. Restart of my codex app didn't force to update the socket. I had to force restart the ssh connection in settings menu which solved the problem.

I keep this issue open since it sounds like a bug that codex app restart doesn't restart connections completely the way that restart connection in settings menu does.

hg0428 · 2 months ago

Same issue for me.

etraut-openai contributor · 1 month ago

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.