Responses API: background=True + input_file never leaves in_progress (sync works, input_image works)

Summary

As of 2026-07-08, any Responses API request that combines background=True with an input_file content part is accepted (queuedin_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:white_check_mark: completes normally
  • Background mode with input_image instead of input_file:white_check_mark: completes normally
  • Background mode with input_file:cross_mark: hangs forever

Environment

  • openai Python SDK 2.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) :white_check_mark: completes (~10s)
Background input_image (inline PNG) :white_check_mark: completes (~6s)
Background input_file (56-byte .txt) :cross_mark: stuck in_progress
Background input_file (PDF, 376 KB and 1.2 MB) :cross_mark: stuck in_progress
Sync input_file (56-byte .txt) :white_check_mark: completes (~2s)
Sync input_file (1.2 MB PDF) :white_check_mark: completes (~196s)
Sync text only :white_check_mark: completes

So it is:

  • Specific to input_file under background mode — background + input_image completes 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, no response_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

  1. Is there a known incident with the background execution path for input_file right now?
  2. 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.

I ran into this issue too. It was working fine yesterday, but today this started happening. I thought it was something wrong with my code, so I ended up spending the entire day debugging and tweaking configurations.

Yes, I noticed the same issue recently as well. I always had Background mode with input_file, but now it doesn’t work. Hopefully there’s a fix soon.

It looks like its back working again!