Summary
As of 2026-07-08, any Responses API request that combines background=True with an input_file content part is accepted (queued → in_progress) and then never reaches a terminal state. Jobs sit at in_progress indefinitely (observed 90+ minutes) with error: null, usage: null, and empty output. They never complete and never error.
The failure is the intersection of two conditions. Change either one and it works:
- Sync mode with the same
input_file→
completes normally - Background mode with
input_imageinstead ofinput_file→
completes normally - Background mode with
input_file→
hangs forever
Environment
openaiPython SDK2.41.0- Python
3.14.6 - Responses API
Minimal reproduction
import os, time
from openai import OpenAI
c = OpenAI(api_key=os.environ["OPENAI_API_KEY"], timeout=60, max_retries=0)
# a 56-byte text file — content/type/size are irrelevant to the bug
open("/tmp/probe.txt", "w").write("The secret number is 42.\n")
f = c.files.create(file=open("/tmp/probe.txt", "rb"), purpose="user_data")
print("file status:", c.files.retrieve(f.id).status) # -> "processed" (upload is fine)
msg = [{"role": "user", "content": [
{"type": "input_file", "file_id": f.id},
{"type": "input_text", "text": "What is the secret number? Reply with just the number."},
]}]
# CONTROL — sync: completes in ~2s
r = c.responses.create(model="gpt-4o", input=msg)
print("SYNC:", r.status, repr(r.output_text)) # -> completed '42'
# BUG — background: never leaves in_progress
r = c.responses.create(model="gpt-4o", background=True, input=msg)
t0 = time.monotonic()
while r.status in ("queued", "in_progress") and time.monotonic() - t0 < 300:
time.sleep(8)
r = c.responses.retrieve(r.id)
print(f"{time.monotonic()-t0:.0f}s status={r.status}")
print("FINAL:", r.status, "error:", r.error, "usage:", r.usage)
# -> stays in_progress past 300s; error=None, usage=None, output=''
What I ruled out (isolation matrix, all failing cases confirmed still stuck when re-checked)
| Execution | Attachment | Result |
|---|---|---|
| Background | none (text only) | |
| Background | input_image (inline PNG) |
|
| Background | input_file (56-byte .txt) |
in_progress |
| Background | input_file (PDF, 376 KB and 1.2 MB) |
in_progress |
| Sync | input_file (56-byte .txt) |
|
| Sync | input_file (1.2 MB PDF) |
|
| Sync | text only |
So it is:
- Specific to
input_fileunder background mode — background +input_imagecompletes fine, so it’s not “background + any attachment.” - Not the Files API / upload — the file reports
status: "processed", and sync requests read the same file fine. - Not file content, type, or size — a 56-byte text file hangs identically to a 1.2 MB PDF.
- Not the model — reproduced on
gpt-4o,gpt-4.1,gpt-5.1,gpt-5.5. - Not stored prompts / structured output — reproduces with a bare
model+input, no prompt template, noresponse_format.
Impact
Background jobs are accepted and silently never scheduled to completion, so any background-mode pipeline that attaches files stalls with no error to key off of. (Synchronous requests with files are unaffected — they work, though large PDFs legitimately take ~3 min, which can look like a hang behind a short client timeout.)
Questions
- Is there a known incident with the background execution path for
input_fileright now? - Recommended workaround while this is investigated — is sync mode the only path, or is there a background-compatible way to attach documents?
Happy to share stuck resp_... IDs via a support channel.