External Publication
Visit Post

Codex Desktop auto-compaction sends unsupported `context_compaction` item type

OpenAI Developer Community June 8, 2026
Source

Description

When working in Codex Desktop, automatic context compaction can break the current thread with an API validation error.

The error says that an input item has type context_compaction, but the API schema only accepts compaction and compaction_trigger among the compaction-related item types.

This appears similar to or the same class of issue as:

github.com/openai/codex

Codex App: context compaction fails with invalid_enum_value for context_compaction

opened 01:40AM - 05 Jun 26 UTC

      manevrit21
    

bug windows-os context app app-server

What version of the Codex App are you using (From “About Codex” dialog)? Co…dex CLI/runtime: codex-cli 0.137.0 Global npm package: @openai/codex@0.137.0 Codex App version: unknown / not shown in this report ### What subscription do you have? ChatGPT Plus ### What platform is your computer? Microsoft Windows 11, Microsoft Windows NT 10.0.26200.0 x64 ### What issue are you seeing? After Codex automatically compacts context, the thread shows an internal schema/enum error: [ItemParam] [input[6]] [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'. This happens immediately around the "Context compacted" event. It looks like the Codex App/runtime is sending or replaying a context_compaction item type, but the receiving schema only accepts compaction / compaction_trigger and other listed item types. A full uninstall/reinstall did not fix related Codex schema errors on this machine, so this appears to be a client/server schema mismatch or persisted thread replay compatibility issue rather than a normal local install problem. Screenshot attached. ### What steps can reproduce the bug? 1. Use Codex App on Windows 11. 2. Continue a thread until automatic context compaction happens. 3. After the "Context compacted" marker appears, send another message or continue the thread. 4. Observe the invalid_enum_value error for context_compaction. ### What is the expected behavior? Context compaction should complete cleanly and the thread should remain usable. If context_compaction is a valid newer item type, the app/server should accept it or normalize it to a supported item type during replay/compaction. ### Additional information This may be related to recent Codex context compaction schema mismatch reports, but the exact enum value here is different. Related examples: - https://github.com/openai/codex/issues/25191 - https://github.com/openai/codex/issues/24039 - https://github.com/openai/codex/issues/25030

Error

[ItemParam] [input[733]] [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'.

Discussion in the ATmosphere

Loading comments...