{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreiftdwvxiohgj6ywhoohxfh2qvhqequ65za2znwui7xjb4n74fqjvi",
    "uri": "at://did:plc:lk3jfj3zq4k4wxnk474axylu/app.bsky.feed.post/3mnrxuoefxfx2"
  },
  "path": "/t/codex-desktop-auto-compaction-sends-unsupported-context-compaction-item-type/1383066#post_1",
  "publishedAt": "2026-06-08T14:30:35.000Z",
  "site": "https://community.openai.com",
  "tags": [
    "github.com/openai/codex",
    "Codex App: context compaction fails with invalid_enum_value for `context_compaction`",
    "manevrit21",
    "@openai"
  ],
  "textContent": "## Description\n\nWhen working in Codex Desktop, automatic context compaction can break the current thread with an API validation error.\n\nThe 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.\n\nThis appears similar to or the same class of issue as:\n\ngithub.com/openai/codex\n\n####  Codex App: context compaction fails with invalid_enum_value for `context_compaction`\n\nopened 01:40AM - 05 Jun 26 UTC\n\n\n\n          manevrit21\n        \n\nbug  windows-os  context  app  app-server\n\n### 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\n\n## Error\n\n\n    [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'.",
  "title": "Codex Desktop auto-compaction sends unsupported `context_compaction` item type"
}