Codex image_generation_user_error param tools 400: Fixes
Codex CLI answers a plain prompt with image_generation_user_error, param tools, status 400. What the error says, fixes to try, and what to send OpenAI.
TroubleshootingUpdated 5 min read
On this page
You ask Codex CLI something ordinary, like "show me uncommitted files," and it replies with this instead of an answer:
{ "type": "error", "error": { "type": "image_generation_user_error", "param": "tools" }, "status": 400Nothing in your request involved images, and follow-up messages in the same session return the same error.
Why it happens
Our evidence is thin. It is one public user thread, last seen June 2, 2026. Three other people confirmed the error, and one suspected a rollout of a new image-generation feature. We found no official OpenAI explanation, so everything below about the cause is inference.
What the error text itself tells you:
- Status 400 means the server rejected the request as it was sent. It did not fail to run.
param: toolsnames the request field at fault. In Codex, that is the list of tools sent along with your message.image_generation_user_errormentions image generation. The likeliest reading is that the request carried an image-generation-related tool setting the server refused. That is our reading, not a statement from OpenAI.
Likely causes, most common first:
- A change on the service side. In the report, the error was fixed and then came back. A problem that appears and disappears without any change on your Mac fits the service, not your setup.
- A client that is out of step with the server. An older Codex CLI may send a tools list the server no longer accepts. We can't confirm this was the cause, but updating is cheap.
- A session stuck in a bad state. In the report, the error repeated until the session was cancelled.
We do not know how often each cause applies. Say so if anyone tells you it is certain.
Step-by-step fixes
Fix 1: Cancel the session and start a fresh one
Symptom: every message in the session returns the same JSON, even simple ones.
- Cancel the current step in the terminal (Ctrl-C).
- Exit Codex and start a new session in the same folder.
- Send a short prompt such as "list the files in this folder."
- If you use the Codex app instead of the CLI, quit it fully and reopen it. Restarting the app was one of the suggestions in the thread.
Codex CLI has a codex resume subcommand for returning to an earlier conversation. If the error comes back immediately in a resumed session, start clean and paste in only the context you need.
Fix 2: Reword the prompt and retry
Symptom: the first message of a new session fails.
Rephrasing was another suggestion in the thread. We can't say how often it worked, and the error doesn't look wording-dependent, but it costs nothing. Send a short, different version of the request.
If you are blocked on the example task, skip the agent for a moment. This command lists changed and untracked files. It only reads, so there is nothing to undo:
git status --shortFix 3: Update Codex CLI
Symptom: you haven't updated in a while, or the error began without any change on your side.
Updating the CLI was the third suggestion in the thread. As of November 2026, OpenAI's Codex CLI documentation describes a standalone installer for macOS and Linux. It also says you can authenticate with a ChatGPT account, an API key or an access token. Update with the same method you used to install, then run codex --version to confirm the version changed.
We won't print an update command, because it depends on how you installed and we can't verify yours.
If you run Codex inside Sledbot, Settings ▸ Agents has an Update… button on the Codex CLI row. It asks you to confirm, then runs in a terminal on that machine. See the Sledbot settings reference.
Fix 4: Wait and try again
Symptom: you updated, restarted and reworded, and it still fails.
If the cause is on the service side, nothing on your Mac will fix it. Check OpenAI's status page for an open incident, then retry in an hour or so. In the report, the error cleared for a while before returning, so a retry later is a legitimate step.
Cause, symptom and fix at a glance
| Likely cause | What you see | What to try |
|---|---|---|
| Service-side change | Fails on any prompt, clears later | Wait, retry, report |
| Out-of-date CLI | Began after a rollout you can't see | Update, check codex --version |
| Stuck session | Only the current session fails | Cancel, start a new session |
Checklist before you try again
- You cancelled the old session and started a new one.
- You tested a one-line prompt with no files or images attached.
codex --versionshows the version you expect after updating.- You waited a while and checked for an OpenAI incident.
If nothing works
Report it to OpenAI support, or to the open-source Codex CLI project (the CLI is Apache 2.0 licensed). Include:
- The full error JSON, copied as is.
- The date and time, with time zone, of each failure.
- How you sign in: ChatGPT account, API key or access token.
- How you installed Codex CLI, and the output of
codex --version. - Whether a brand-new session fails on its first message.
- The exact prompt that triggered it, and what you already tried.
Subject: Codex CLI returns image_generation_user_error (param: tools, status 400)
Codex CLI version: (output of codex --version)
Install method: (how you installed it)
Sign-in: (ChatGPT account / API key / access token)
A plain prompt ("show me uncommitted files") returns:
{ "type": "error", "error": { "type": "image_generation_user_error", "param": "tools" }, "status": 400
It first failed on (date, time, time zone). A new session also fails on its first message.
I already restarted, reworded the prompt and updated the CLI.
Please confirm whether this is a known issue and whether a fix is rolling out.Common questions
Is my prompt or repo the problem?
Almost certainly not. The error names the tools field of the request, and in the report a plain read-only prompt triggered it.
Does this mean I'm trying to generate images?
No. The error type mentions image generation, but the reported prompt had nothing to do with images. Why the request carried an image-generation tool is our inference, not something OpenAI has said.
Will updating the CLI definitely fix it?
No. It was one of three suggestions in the thread, and we don't know how often it helped. It is cheap and safe, so it is a sensible step after restarting.
Could it come back after it clears?
Yes. In the report, it was fixed and then returned. If it does, add the new timestamps to your report, since a pattern over several days helps OpenAI narrow it down.