codex - 💡(How to fix) Fix Context compaction on remote connection failing due to invalid value: `context_compaction`

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

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. Compaction shall be done completely without error.

Fix Action

Fix / Workaround

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'.

Code Example

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)
RAW_BUFFERClick to expand / collapse

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

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING