Codex Desktop auto-compaction sends unsupported `context_compaction` item type
Resolved 💬 4 comments Opened Jun 8, 2026 by kiselev27 Closed Jun 11, 2026
What version of Codex CLI is running?
codex-cli 0.137.0
What subscription do you have?
ChatGPT Pro
Which model were you using?
gpt-5.5
What platform is your computer?
Linux 6.8.0-124-generic x86_64 x86_64
What terminal emulator and version are you using (if applicable)?
_No response_
Codex doctor report
Codex Desktop. No tmux/screen/zellij multiplexer in use.
codex doctor reports TERM=dumb in the internal execution environment:
TERM=dumb
stdin/stdout/stderr are not terminal
What issue are you seeing?
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 compaction-related item types.
Full 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'.
### What steps can reproduce the bug?
**What steps can reproduce the bug?**
```markdown
1. Open a long-running thread in Codex Desktop.
2. Continue working until automatic context compaction is triggered.
3. After compaction, continue sending messages in the same thread.
4. The thread fails with the `invalid_enum_value` error for `context_compaction`.
### What is the expected behavior?
Codex should serialize compaction-related items using a supported item type such as `compaction` or `compaction_trigger`, or handle compaction metadata internally without sending unsupported item types to the API.
The thread should remain usable after automatic context compaction.
### Additional information
_No response_This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗