Hi everyone,
I’m seeing consistent failures when I set "background": true
on the /v1/responses
endpoint and include an external MCP tool.
Without background mode the same request succeeds every time.
What I’m doing
// Supabase Edge Function (simplified)
const payload = {
prompt: { id: PROMPT_ID },
tools: [
{
type: "mcp",
server_label: "Zapier",
server_url: `https://mcp.zapier.com/api/mcp/mcp`,
headers: { Authorization: `Bearer ${ZAPIER_API_KEY}` },
allowed_tools: ["gmail_find_email", "gmail_reply_to_email"],
require_approval: "never"
}
],
input: [{ role: "user", content: [{ type: "input_text", text: query }] }],
background: true // ← removing this makes everything work
};
await fetch("https://api.openai.com/v1/responses", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${OPENAI_API_KEY}`
},
body: JSON.stringify(payload)
});
Symptoms
-
API returns generic error:
An error occurred while processing your request. You can retry your request, or contact us…
Example request-id: wfr_0197bad74a6f79f29585a003c7f306dd -
My webhook receives:
response.failed
with no additional details. -
In the dashboard the run never leaves queued / in_progress before it flips to failed.
-
Removing only
"background": true
(keeping everything else, same prompt, same MCP tool) returns a perfect response.
Repro in cURL (minimal)
curl https://api.openai.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"tools": [{
"type": "mcp",
"server_label": "Zapier",
"server_url": "https://mcp.zapier.com/api/mcp/mcp",
"headers": {"Authorization": "Bearer REDACTED"},
"require_approval": "never"
}],
"input": "test",
"background": true
}'
→ Always fails.
Delete the background
line → returns normally.
Things I’ve already checked
store:true
is implicit for background runs, so not the issue.- Same behaviour with
stream:true
both on and off. - Works if I swap the tool for an OpenAI-native tool (Web Search, for example).
- Tried different MCP servers – same result.
- Tried different models (
o3
,gpt-4.1
,gpt-4o
) – same result.
Hypothesis
Looks like the background runner can’t open the remote transport for MCP tools.
Would love confirmation that this is a known bug and — if possible — an ETA or suggested workaround.
Thanks!