{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreibkqdsc4djno45izci7gdqqu4c7erfepoiqg5qxpumdtneidpff6q",
    "uri": "at://did:plc:lk3jfj3zq4k4wxnk474axylu/app.bsky.feed.post/3mku2bboonyt2"
  },
  "path": "/t/responses-corrupts-previous-conversations-assistant-item/1380154#post_4",
  "publishedAt": "2026-05-02T05:39:29.000Z",
  "site": "https://community.openai.com",
  "textContent": "Thank you for your time on the matter, I was hoping it was something obvious, but I’m still scratching my head. Here’s a bash script to replicate my issue:\n\n\n    #!/usr/bin/env bash\n    set -eu\n\n    : \"${OPENAI_API_KEY:?Set OPENAI_API_KEY first}\"\n\n    BASE=\"https://api.openai.com/v1\"\n    MODEL=\"${MODEL:-gpt-5.4-mini}\"\n    SLEEP_AFTER_ASSISTANT_ADD=\"${SLEEP_AFTER_ASSISTANT_ADD:-2}\"\n\n    AUTH=(\n      -H \"Authorization: Bearer $OPENAI_API_KEY\"\n      -H \"Content-Type: application/json\"\n    )\n\n    SYSTEM_TEXT=\"System message containing instructions.\"\n    USER_TEXT=\"Initial user message\"\n    ASSISTANT_TEXT=\"Assistant message that will disappear.\"\n    RESPONSES_INPUT_TEXT=\"Has the user provided answers to the outstanding fields? \"\n\n    list_items() {\n      curl -sS --globoff \\\n        \"$BASE/conversations/$CONV_ID/items?order=asc&include[]=message.input_image.image_url&limit=100\" \\\n        \"${AUTH[@]}\"\n    }\n\n    retrieve_item() {\n      local item_id=\"$1\"\n      curl -sS --globoff \\\n        \"$BASE/conversations/$CONV_ID/items/$item_id?include[]=message.input_image.image_url\" \\\n        \"${AUTH[@]}\"\n    }\n\n    echo\n    echo \"1) Create conversation with initial system message\"\n\n    CREATE_CONV_JSON=$(\n      jq -n --arg text \"$SYSTEM_TEXT\" '{\n        items: [\n          {\n            role: \"system\",\n            content: $text,\n            type: \"message\"\n          }\n        ]\n      }'\n    )\n\n    CREATE_CONV_RESPONSE=$(\n      curl -sS \"$BASE/conversations\" \\\n        \"${AUTH[@]}\" \\\n        -d \"$CREATE_CONV_JSON\"\n    )\n\n    echo \"$CREATE_CONV_RESPONSE\" | jq .\n\n    CONV_ID=$(echo \"$CREATE_CONV_RESPONSE\" | jq -r '.id')\n\n    if [[ \"$CONV_ID\" == \"null\" || -z \"$CONV_ID\" ]]; then\n      echo \"ERROR: Failed to create conversation\"\n      exit 1\n    fi\n\n    echo \"CONV_ID=$CONV_ID\"\n\n\n    echo\n    echo \"2) Add user message to conversation\"\n\n    ADD_USER_JSON=$(\n      jq -n --arg text \"$USER_TEXT\" '{\n        items: [\n          {\n            type: \"message\",\n            role: \"user\",\n            content: [\n              {\n                type: \"input_text\",\n                text: $text\n              }\n            ]\n          }\n        ]\n      }'\n    )\n\n    ADD_USER_RESPONSE=$(\n      curl -sS \"$BASE/conversations/$CONV_ID/items\" \\\n        \"${AUTH[@]}\" \\\n        -d \"$ADD_USER_JSON\"\n    )\n\n    echo \"$ADD_USER_RESPONSE\" | jq .\n\n    USER_ITEM_ID=$(echo \"$ADD_USER_RESPONSE\" | jq -r '.data[0].id')\n    echo \"USER_ITEM_ID=$USER_ITEM_ID\"\n\n\n    echo\n    echo \"3) Add hard-coded assistant EasyInputMessage to conversation\"\n\n    ADD_ASSISTANT_JSON=$(\n      jq -n --arg text \"$ASSISTANT_TEXT\" '{\n        items: [\n          {\n            type: \"message\",\n            role: \"assistant\",\n            content: $text,\n            phase: \"final_answer\"\n          }\n        ]\n      }'\n    )\n\n    ADD_ASSISTANT_RESPONSE=$(\n      curl -sS \"$BASE/conversations/$CONV_ID/items\" \\\n        \"${AUTH[@]}\" \\\n        -d \"$ADD_ASSISTANT_JSON\"\n    )\n\n    echo \"$ADD_ASSISTANT_RESPONSE\" | jq .\n\n    ASSISTANT_ITEM_ID=$(echo \"$ADD_ASSISTANT_RESPONSE\" | jq -r '.data[0].id')\n\n    if [[ \"$ASSISTANT_ITEM_ID\" == \"null\" || -z \"$ASSISTANT_ITEM_ID\" ]]; then\n      echo \"ERROR: Failed to create assistant item\"\n      exit 1\n    fi\n\n    echo \"ASSISTANT_ITEM_ID=$ASSISTANT_ITEM_ID\"\n\n\n    echo\n    echo \"4) Retrieve hard-coded assistant item before Responses call\"\n\n    RETRIEVE_BEFORE=$(retrieve_item \"$ASSISTANT_ITEM_ID\")\n    echo \"$RETRIEVE_BEFORE\" | jq .\n\n\n    echo\n    echo \"5) List all items before Responses call\"\n\n    LIST_BEFORE=$(list_items)\n    echo \"$LIST_BEFORE\" | jq .\n\n    echo\n    echo \"5a) Check hard-coded assistant item is present before Responses call\"\n\n    if echo \"$LIST_BEFORE\" | jq -e --arg id \"$ASSISTANT_ITEM_ID\" '.data[] | select(.id == $id)' >/dev/null; then\n      echo \"OK: Assistant item is present in list before Responses call\"\n    else\n      echo \"ERROR: Assistant item is already missing before Responses call\"\n      exit 1\n    fi\n\n\n    echo\n    echo \"6) Wait briefly to rule out immediate write/read timing issues\"\n    echo \"Sleeping ${SLEEP_AFTER_ASSISTANT_ADD}s...\"\n    sleep \"$SLEEP_AFTER_ASSISTANT_ADD\"\n\n\n    echo\n    echo \"7) Create model response using SAME conversation ID\"\n\n    CREATE_RESPONSE_JSON=$(\n      jq -n \\\n        --arg model \"$MODEL\" \\\n        --arg conv \"$CONV_ID\" \\\n        --arg text \"$RESPONSES_INPUT_TEXT\" \\\n        '{\n          model: $model,\n          conversation: $conv,\n          store: true,\n          input: [\n            {\n              content: $text,\n              role: \"system\",\n              type: \"message\"\n            }\n          ]\n        }'\n    )\n\n    CREATE_RESPONSE_RESPONSE=$(\n      curl -sS \"$BASE/responses\" \\\n        \"${AUTH[@]}\" \\\n        -d \"$CREATE_RESPONSE_JSON\"\n    )\n\n    echo \"$CREATE_RESPONSE_RESPONSE\" | jq .\n\n    RESPONSE_ID=$(echo \"$CREATE_RESPONSE_RESPONSE\" | jq -r '.id')\n    echo \"RESPONSE_ID=$RESPONSE_ID\"\n\n\n    echo\n    echo \"8) Retrieve original hard-coded assistant item after Responses call\"\n\n    RETRIEVE_AFTER=$(retrieve_item \"$ASSISTANT_ITEM_ID\")\n    echo \"$RETRIEVE_AFTER\" | jq .\n\n\n    echo\n    echo \"9) List all items after Responses call\"\n\n    LIST_AFTER=$(list_items)\n    echo \"$LIST_AFTER\" | jq .\n\n\n    echo\n    echo \"10) Repro checks\"\n\n    echo\n    echo \"Check A: Is original hard-coded assistant item still present in the list?\"\n\n    if echo \"$LIST_AFTER\" | jq -e --arg id \"$ASSISTANT_ITEM_ID\" '.data[] | select(.id == $id)' >/dev/null; then\n      echo \"NOT REPRODUCED: Original assistant item is still present in the conversation list\"\n    else\n      echo \"REPRODUCED: Original assistant item is missing from the conversation list after Responses call\"\n    fi\n\n\n    echo\n    echo \"Check B: Does direct retrieval now return role=unknown and <unknown message>?\"\n\n    if echo \"$RETRIEVE_AFTER\" | jq -e '\n      .role == \"unknown\"\n      and (.content | length > 0)\n      and (.content[0].text == \"<unknown message>\")\n    ' >/dev/null; then\n      echo \"REPRODUCED: Direct retrieval returns role=unknown and <unknown message>\"\n    else\n      echo \"NOT REPRODUCED: Direct retrieval did not return the unknown-message placeholder\"\n    fi\n\n\n    echo\n    echo \"Check C: Show before/after summary for the original assistant item\"\n\n    echo \"Before:\"\n    echo \"$RETRIEVE_BEFORE\" | jq '{\n      id,\n      role,\n      type,\n      status,\n      content\n    }'\n\n    echo \"After:\"\n    echo \"$RETRIEVE_AFTER\" | jq '{\n      id,\n      role,\n      type,\n      status,\n      content\n    }'\n\n\n    echo\n    echo \"Done.\"\n    echo \"CONV_ID=$CONV_ID\"\n    echo \"ASSISTANT_ITEM_ID=$ASSISTANT_ITEM_ID\"\n    echo \"MODEL=$MODEL\"\n\n\nHere’s a play by play of what I’m doing. Hopefully this will make apparent what amateur hour mistake I’ve made.\n\nI create a conversation:\n\n\n    curl --location 'https://api.openai.com/v1/conversations' \\\n    --header 'Content-Type: application/json' \\\n    --header 'Authorization: Bearer TOKEN' \\\n    --data '{\n        \"items\": [\n            {\n                \"role\": \"system\",\n                \"content\": \"System message containing instructions.\",\n                \"type\": \"message\"\n            }\n        ]\n    }'\n\n\nI get the expected response:\n\n\n    {\n        \"id\": \"conv_69f5871bb0948193bd42bd2a8649e89f08829a4c83cbc622\",\n        \"object\": \"conversation\",\n        \"created_at\": 1777698587,\n        \"metadata\": {}\n    }\n\n\nI add a user message to the conversation:\n\n\n    curl --location 'https://api.openai.com/v1/conversations/conv_69f5871bb0948193bd42bd2a8649e89f08829a4c83cbc622/items' \\\n    --header 'Content-Type: application/json' \\\n    --header 'Authorization: Bearer TOKEN' \\\n    --data '{\n        \"items\": [\n            {\n                \"type\": \"message\",\n                \"role\": \"user\",\n                \"content\": [\n                    {\n                        \"type\": \"input_text\",\n                        \"text\": \"Initial user message\"\n                    }\n                ]\n            }\n        ]\n    }'\n\n\nI get the expected response:\n\n\n    {\n        \"object\": \"list\",\n        \"data\": [\n            {\n                \"id\": \"msg_69f5878674a481939362d4e7bed94b3808829a4c83cbc622\",\n                \"type\": \"message\",\n                \"status\": \"completed\",\n                \"content\": [\n                    {\n                        \"type\": \"input_text\",\n                        \"text\": \"Initial user message\"\n                    }\n                ],\n                \"role\": \"user\"\n            }\n        ],\n        \"first_id\": \"msg_69f5878674a481939362d4e7bed94b3808829a4c83cbc622\",\n        \"has_more\": false,\n        \"last_id\": \"msg_69f5878674a481939362d4e7bed94b3808829a4c83cbc622\"\n    }\n\n\nI then add a hard coded assistant message. This message will eventually become corrupted and disappear from the list:\n\n\n    curl --location 'https://api.openai.com/v1/conversations/conv_69f5871bb0948193bd42bd2a8649e89f08829a4c83cbc622/items' \\\n    --header 'Content-Type: application/json' \\\n    --header 'Authorization: Bearer TOKEN' \\\n    --data '{\n        \"items\": [\n            {\n                \"type\": \"message\",\n                \"role\": \"assistant\",\n                \"content\": \"Assistant message that will disappear.\",\n                \"phase\": \"final_answer\"\n            }\n        ]\n    }'\n\n\nI get the expected response:\n\n\n    {\n        \"object\": \"list\",\n        \"data\": [\n            {\n                \"id\": \"msg_69f587a159c881939bd111a2c71142c908829a4c83cbc622\",\n                \"type\": \"message\",\n                \"status\": \"completed\",\n                \"content\": [\n                    {\n                        \"type\": \"input_text\",\n                        \"text\": \"Assistant message that will disappear.\"\n                    }\n                ],\n                \"role\": \"assistant\"\n            }\n        ],\n        \"first_id\": \"msg_69f587a159c881939bd111a2c71142c908829a4c83cbc622\",\n        \"has_more\": false,\n        \"last_id\": \"msg_69f587a159c881939bd111a2c71142c908829a4c83cbc622\"\n    }\n\n\nTo double check that the message was added to the conversation, I make a call to get all items in the conversation so far:\n\n\n    curl --location --globoff 'https://api.openai.com/v1/conversations/conv_69f5871bb0948193bd42bd2a8649e89f08829a4c83cbc622/items?order=asc&include[]=message.input_image.image_url&limit=100' \\\n    --header 'Authorization: Bearer TOKEN'\n\n\nThe hard coded assistant message is there:\n\n\n    {\n        \"object\": \"list\",\n        \"data\": [\n            {\n                \"id\": \"msg_69f5871bb0bc8193be30f0b1e80313a208829a4c83cbc622\",\n                \"type\": \"message\",\n                \"status\": \"completed\",\n                \"content\": [\n                    {\n                        \"type\": \"input_text\",\n                        \"text\": \"System message containing instructions.\"\n                    }\n                ],\n                \"role\": \"system\"\n            },\n            {\n                \"id\": \"msg_69f5878674a481939362d4e7bed94b3808829a4c83cbc622\",\n                \"type\": \"message\",\n                \"status\": \"completed\",\n                \"content\": [\n                    {\n                        \"type\": \"input_text\",\n                        \"text\": \"Initial user message\"\n                    }\n                ],\n                \"role\": \"user\"\n            },\n            {\n                \"id\": \"msg_69f587a159c881939bd111a2c71142c908829a4c83cbc622\",\n                \"type\": \"message\",\n                \"status\": \"completed\",\n                \"content\": [\n                    {\n                        \"type\": \"input_text\",\n                        \"text\": \"Assistant message that will disappear.\"\n                    }\n                ],\n                \"role\": \"assistant\"\n            }\n        ],\n        \"first_id\": \"msg_69f5871bb0bc8193be30f0b1e80313a208829a4c83cbc622\",\n        \"has_more\": false,\n        \"last_id\": \"msg_69f587a159c881939bd111a2c71142c908829a4c83cbc622\"\n    }\n\n\nI then make a call to the responses endpoint:\n\n\n    curl --location 'https://api.openai.com/v1/responses' \\\n    --header 'Content-Type: application/json' \\\n    --header 'Authorization: Bearer TOKEN' \\\n    --data '{\n        \"model\": \"gpt-5.4-mini\",\n        \"conversation\": \"conv_69f5871bb0948193bd42bd2a8649e89f08829a4c83cbc622\",\n        \"input\": [\n            {\n                \"content\": \"Has the user provided answers to the outstanding fields? \",\n                \"role\": \"system\",\n                \"type\": \"message\"\n            }\n        ]\n    }'\n\n\nAnd get a response from it:\n\n\n    {\n        \"id\": \"resp_08829a4c83cbc6220069f587f985c88193a5a04f15b4d5406e\",\n        \"object\": \"response\",\n        \"created_at\": 1777698810,\n        \"status\": \"completed\",\n        \"background\": false,\n        \"billing\": {\n            \"payer\": \"developer\"\n        },\n        \"completed_at\": 1777698811,\n        \"conversation\": {\n            \"id\": \"conv_69f5871bb0948193bd42bd2a8649e89f08829a4c83cbc622\"\n        },\n        \"error\": null,\n        \"frequency_penalty\": 0.0,\n        \"incomplete_details\": null,\n        \"instructions\": null,\n        \"max_output_tokens\": null,\n        \"max_tool_calls\": null,\n        \"model\": \"gpt-5.4-mini-2026-03-17\",\n        \"moderation\": null,\n        \"output\": [\n            {\n                \"id\": \"msg_08829a4c83cbc6220069f587fafab48193bcb5c61162b541a5\",\n                \"type\": \"message\",\n                \"status\": \"completed\",\n                \"content\": [\n                    {\n                        \"type\": \"output_text\",\n                        \"annotations\": [],\n                        \"logprobs\": [],\n                        \"text\": \"No.\"\n                    }\n                ],\n                \"phase\": \"final_answer\",\n                \"role\": \"assistant\"\n            }\n        ],\n        \"parallel_tool_calls\": true,\n        \"presence_penalty\": 0.0,\n        \"previous_response_id\": null,\n        \"prompt_cache_key\": null,\n        \"prompt_cache_retention\": \"in_memory\",\n        \"reasoning\": {\n            \"effort\": \"none\",\n            \"summary\": null\n        },\n        \"safety_identifier\": null,\n        \"service_tier\": \"default\",\n        \"store\": true,\n        \"temperature\": 1.0,\n        \"text\": {\n            \"format\": {\n                \"type\": \"text\"\n            },\n            \"verbosity\": \"medium\"\n        },\n        \"tool_choice\": \"auto\",\n        \"tools\": [],\n        \"top_logprobs\": 0,\n        \"top_p\": 0.98,\n        \"truncation\": \"disabled\",\n        \"usage\": {\n            \"input_tokens\": 45,\n            \"input_tokens_details\": {\n                \"cached_tokens\": 0\n            },\n            \"output_tokens\": 6,\n            \"output_tokens_details\": {\n                \"reasoning_tokens\": 0\n            },\n            \"total_tokens\": 51\n        },\n        \"user\": null,\n        \"metadata\": {}\n    }\n\n\nI then make another call to get all items in the conversation:\n\n\n    curl --location --globoff 'https://api.openai.com/v1/conversations/conv_69f5871bb0948193bd42bd2a8649e89f08829a4c83cbc622/items?order=asc&include[]=message.input_image.image_url&limit=100' \\\n    --header 'Authorization: Bearer TOKEN'\n\n\nBut now that hard coded assistant message has disappeared:\n\n\n    {\n        \"object\": \"list\",\n        \"data\": [\n            {\n                \"id\": \"msg_69f5871bb0bc8193be30f0b1e80313a208829a4c83cbc622\",\n                \"type\": \"message\",\n                \"status\": \"completed\",\n                \"content\": [\n                    {\n                        \"type\": \"input_text\",\n                        \"text\": \"System message containing instructions.\"\n                    }\n                ],\n                \"role\": \"system\"\n            },\n            {\n                \"id\": \"msg_69f5878674a481939362d4e7bed94b3808829a4c83cbc622\",\n                \"type\": \"message\",\n                \"status\": \"completed\",\n                \"content\": [\n                    {\n                        \"type\": \"input_text\",\n                        \"text\": \"Initial user message\"\n                    }\n                ],\n                \"role\": \"user\"\n            },\n            {\n                \"id\": \"msg_08829a4c83cbc6220069f587fa76f48193aee927a5bcde3104\",\n                \"type\": \"message\",\n                \"status\": \"completed\",\n                \"content\": [\n                    {\n                        \"type\": \"input_text\",\n                        \"text\": \"Has the user provided answers to the outstanding fields? \"\n                    }\n                ],\n                \"role\": \"system\"\n            },\n            {\n                \"id\": \"msg_08829a4c83cbc6220069f587fafab48193bcb5c61162b541a5\",\n                \"type\": \"message\",\n                \"status\": \"completed\",\n                \"content\": [\n                    {\n                        \"type\": \"output_text\",\n                        \"annotations\": [],\n                        \"logprobs\": [],\n                        \"text\": \"No.\"\n                    }\n                ],\n                \"role\": \"assistant\"\n            }\n        ],\n        \"first_id\": \"msg_69f5871bb0bc8193be30f0b1e80313a208829a4c83cbc622\",\n        \"has_more\": false,\n        \"last_id\": \"msg_08829a4c83cbc6220069f587fafab48193bcb5c61162b541a5\"\n    }\n\n\nIf I ask for it specifically:\n\n\n    curl --location --globoff 'https://api.openai.com/v1/conversations/conv_69f5871bb0948193bd42bd2a8649e89f08829a4c83cbc622/items/msg_69f587a159c881939bd111a2c71142c908829a4c83cbc622?order=asc&include[]=message.input_image.image_url&limit=100' \\\n    --header 'Authorization: Bearer TOKEN'\n\n\nIt returns the `<unknown message>` tag:\n\n\n    {\n        \"id\": \"msg_69f587a159c881939bd111a2c71142c908829a4c83cbc622\",\n        \"type\": \"message\",\n        \"status\": \"completed\",\n        \"content\": [\n            {\n                \"type\": \"text\",\n                \"text\": \"<unknown message>\"\n            }\n        ],\n        \"role\": \"unknown\"\n    }\n",
  "title": "`responses` corrupts previous conversations `assistant` item"
}