Skip to content

Instantly share code, notes, and snippets.

@epatey
Created March 6, 2026 22:47
Show Gist options
  • Select an option

  • Save epatey/e4595ffeef5412aa2f8bb45ccceee51e to your computer and use it in GitHub Desktop.

Select an option

Save epatey/e4595ffeef5412aa2f8bb45ccceee51e to your computer and use it in GitHub Desktop.
Repro: store:false multi-turn computer-use bugs
#!/usr/bin/env bash
# Repro: store:false multi-turn computer-use bugs
#
# Curl 1 (404): includes reasoning item with server-generated ID — API tries
# to resolve it against server-side storage that doesn't exist (store:false).
# Curl 2 (500): reasoning item removed, but remaining output items still have
# server-generated IDs that can't be resolved → internal server error.
#
# Usage: OPENAI_API_KEY=sk-... bash repro-bug1-404.sh
set -euo pipefail
set -a; source .env; set +a
: "${OPENAI_API_KEY:?Set OPENAI_API_KEY}"
# 1x1 red PNG as a minimal valid screenshot
TINY_PNG="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg=="
COMMON=(-s -H "Authorization: Bearer $OPENAI_API_KEY" -H "Content-Type: application/json")
REASONING_ITEM='{
"id": "rs_083ff13b99ce487d0169ab5455d3c4819a9e2efe7f45534b3c",
"type": "reasoning",
"summary": []
},'
send_request() {
local reasoning_item="$1"
curl "${COMMON[@]}" https://api.openai.com/v1/responses -d @- <<EOF
{
"instructions": "You are controlling a browser-based kanban app through the built-in computer tool.",
"input": [
{
"content": [
{ "text": "what's on the desktop", "type": "input_text" }
],
"role": "user"
},
${reasoning_item}
{
"id": "msg_083ff13b99ce487d0169ab545999d0819aa3edf6123fdab1f9",
"type": "message",
"status": "completed",
"content": [
{ "type": "output_text", "text": "" }
],
"role": "assistant"
},
{
"id": "cu_083ff13b99ce487d0169ab5459c7e4819a9f0c36ae97db6e86",
"type": "computer_call",
"status": "completed",
"actions": [{ "type": "screenshot" }],
"call_id": "call_2dugsE4CytbpbsqMriR5KV5C"
},
{
"type": "computer_call_output",
"call_id": "call_2dugsE4CytbpbsqMriR5KV5C",
"output": {
"type": "computer_screenshot",
"image_url": "${TINY_PNG}"
}
}
],
"model": "gpt-5.4",
"reasoning": { "effort": "low" },
"store": false,
"tools": [{ "type": "computer" }]
}
EOF
echo ""
}
echo "--- Test 1: with reasoning item → expect 404 ---"
send_request "$REASONING_ITEM"
echo "--- Test 2: reasoning removed → expect 500 ---"
send_request ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment