openai bad request blocking error
Pre-submit Checks
- [x] I have searched Warp bugs and there are no duplicates
- [x] I have searched Warp known issues page and my issue is not there
- [x] I have an issue with AI and have included the debugging ID (Optional, but helps expedite the AI quality fix). Debugging ID instructions
- [x] I have technical issue and have included the logs (optional, but helps expedite the bug fix). Log instructions
Describe the bug
Right now I am blocked with the below error with any message I type in.
I'm sorry, I couldn't complete that request.
Response stream finished unexpectedly with internal error: OpenAI API error: POST "https://api.openai.com/v1/responses": 400 Bad Request { "message": "The file you uploaded is badly formatted or corrupted. Please fix the file and try again.", "type": "invalid_request_error", "param": "input", "code": "invalid_file" } Send Feedback Debug information: {"conversation_id":"dbbb8515-010d-4110-81f6-6625c80a829d"}
To reproduce
Every time a type a new message on the conversation, I am facing this issue
Expected behavior
Expected to not face any error and continue smoothly
Screenshots, videos, and logs
No response
Operating system (OS)
Select an OS
Operating system and version
Windows 11 Home Single Language 25H2
Shell Version
PowerShell 7.5.5
Current Warp version
v0.2026.04.08.08.36.stable_02
Regression
No, this bug or issue has existed throughout my experience using Warp
Recent working Warp date
No response
Additional context
No response
Does this block you from using Warp daily?
Yes, this issue prevents me from using Warp daily.
Is this an issue only in Warp?
Yes, I confirmed that this only happens in Warp, not other terminals.
Warp Internal (ignore): linear-label:b9d78064-c89e-4973-b153-5178a31ee54e
None
Cross-posting repro details from #12512 (closed as duplicate of this issue).
Repro — minimal corrupt PDF (~261 bytes)
Generate with PowerShell:
$header = [System.Text.Encoding]::Latin1.GetBytes("%PDF-1.7`r`n%corrupted`r`n")
$garbage = [byte[]](1..200 | ForEach-Object { Get-Random -Maximum 256 })
$body = [System.Text.Encoding]::Latin1.GetBytes("1 0 obj`r`n<< /Type /Catalog >>`r`nendobj`r`n")
[System.IO.File]::WriteAllBytes("$env:TEMP\corrupt_test_repro.pdf", $header + $garbage + $body)
# Valid %PDF-1.7 header, no xref table, no %%EOF — OpenAI rejects as invalid_file
Steps:
- Generate the file above.
- Open an Oz agent session.
- Ask the agent to read the file via
read_files. - Observe response stream crash with
invalid_file400. - Send any follow-up message — the same error repeats permanently, session is unrecoverable.
Exact error:
Response stream finished unexpectedly with internal error: OpenAI API error:
POST "https://api.openai.com/v1/responses": 400 Bad Request
{
"message": "The file you uploaded is badly formatted or corrupted. Please fix the file and try again.",
"type": "invalid_request_error",
"param": "input",
"code": "invalid_file"
}
The valid version of the same file (296 KB, PDF 1.7 with XRef streams + ObjStm) reads fine. The issue is specific to the error-handling path for invalid_file — the session never recovers after the first 400.
Environment
- Warp version: v0.2026.06.03.09.49.stable_02
- OS: Windows 11 Pro for Workstations, Build 10.0.26200 (x64)
- Shell: PowerShell 7.5.5
Also reproduced with a subagent (which errors at the errored runtime stage, not just the session level). Confirmed across 3 separate sessions.
A pre-built copy of corrupt_test_repro.pdf is attached below: