Skip to content

GPT-6 family models always rejected as invalid_prompt, GPT-5.6 works #52846

Open

Description

@oxox-xoxo

What version of Codex CLI is running?

0.161.0

What subscription do you have?

codex pro x2-

Which model were you using?

No response

What platform is your computer?

No response

What terminal emulator and version are you using (if applicable)?

No response

Codex doctor report

{
  "schemaVersion": 1,
  "generatedAt": "1791627634s since unix epoch",
  "overallStatus": "warning",
  "codexVersion": "0.162.1",
  "checks": {
    "app_server.status": {
      "id": "app_server.status",
      "category": "app-server",
      "status": "ok",
      "summary": "background server is running",
      "details": {
        "app-server version": "0.162.1",
        "control socket": "C:\\Users\\admin\\.codex\\app-server-control\\app-server-control.sock",
        "daemon state dir": "C:\\Users\\admin\\.codex\\app-server-daemon",
        "dedicated pid file": "C:\\Users\\admin\\.codex\\app-server-daemon\\daemon.pid (file)",
        "dedicated update-loop pid file": "C:\\Users\\admin\\.codex\\app-server-daemon\\daemon-updater.pid (file)",
        "mode": "ephemeral",
        "pid file": "C:\\Users\\admin\\.codex\\app-server-daemon\\app-server.pid (missing)",
        "settings": "C:\\Users\\admin\\.codex\\app-server-daemon\\settings.json (missing)",
        "status": "running",
        "update-loop pid file": "C:\\Users\\admin\\.codex\\app-server-daemon\\app-server-updater.pid (missing)"
      },
      "remediation": null,
      "durationMs": 30
    },
    "auth.credentials": {
      "id": "auth.credentials",
      "category": "auth",
      "status": "ok",
      "summary": "auth is configured",
      "details": {
        "auth file": "C:\\Users\\admin\\.codex\\auth.json",
        "auth storage mode": "File",
        "stored API key": "false",
        "stored ChatGPT tokens": "true",
        "stored agent identity": "false",
        "stored auth mode": "chatgpt"
      },
      "remediation": null,
      "durationMs": 0
    },
    "config.load": {
      "id": "config.load",
      "category": "config",
      "status": "ok",
      "summary": "config loaded",
      "details": {
        "CODEX_HOME": "C:\\Users\\admin\\.codex",
        "active thread overrides": "not inspected",
        "config.toml": "C:\\Users\\admin\\.codex\\config.toml",
        "config.toml parse": "ok",
        "configuration load ms": "11",
        "configuration scope": "invocation config, including cloud-managed policy",
        "configured TUI mode": "fullscreen",
        "cwd": "C:\\Users\\admin",
        "enabled feature flags": "<redacted>",
        "feature flag overrides": "none",
        "feature flags enabled": "58",
        "log dir": "C:\\Users\\admin\\.codex\\log",
        "mcp servers": "1",
        "model": "gpt-6.1-sol",
        "model provider": "openai",
        "sqlite home": "C:\\Users\\admin\\.codex"
      },
      "remediation": null,
      "durationMs": 0
    },
    "desktop.app.version": {
      "id": "desktop.app.version",
      "category": "desktop",
      "status": "ok",
      "summary": "the desktop application is installed",
      "details": {
        "log directory": "$HOME\\AppData\\Local\\Codex/Logs",
        "running": "false",
        "version": "26.1007.2314.0"
      },
      "remediation": null,
      "durationMs": 0
    },
    "desktop.app_server.handshake": {
      "id": "desktop.app_server.handshake",
      "category": "desktop",
      "status": "ok",
      "summary": "the desktop application is not running",
      "details": {},
      "remediation": null,
      "durationMs": 0
    },
    "desktop.security.enforcement": {
      "id": "desktop.security.enforcement",
      "category": "desktop",
      "status": "ok",
      "summary": "no locally visible recent Codex security enforcement was found",
      "details": {},
      "remediation": null,
      "durationMs": 0
    },
    "git.environment": {
      "id": "git.environment",
      "category": "git",
      "status": "ok",
      "summary": "git executable found; execution not verified",
      "details": {
        "PATH git #1": "C:\\Program Files\\Git\\cmd\\git.exe",
        "PATH git entries": "1",
        "git execution": "not inspected (PATH helpers are not executed)",
        "repo detected": "false",
        "selected git": "C:\\Program Files\\Git\\cmd\\git.exe"
      },
      "remediation": null,
      "durationMs": 6
    },
    "git.worktree.dev_drive": {
      "id": "git.worktree.dev_drive",
      "category": "git",
      "status": "ok",
      "summary": "no Git worktree is active",
      "details": {},
      "remediation": null,
      "durationMs": 0
    },
    "installation": {
      "id": "installation",
      "category": "install",
      "status": "ok",
      "summary": "installation looks consistent",
      "details": {
        "PATH codex #1": "D:\\nodejs\\codex.cmd",
        "current executable": "D:\\nvm\\v24.18.0\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin\\codex.exe",
        "install context": "npm (package D:\\nvm\\v24.18.0\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc, bin D:\\nvm\\v24.18.0\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin, resources D:\\nvm\\v24.18.0\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-resources, path D:\\nvm\\v24.18.0\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-path)",
        "managed by Vite+": "false",
        "managed by bun": "false",
        "managed by npm": "true",
        "managed by pnpm": "false",
        "managed package root": "D:\\nvm\\v24.18.0\\node_modules\\@openai\\codex",
        "npm update target": "not inspected (PATH helpers are not executed)"
      },
      "remediation": null,
      "durationMs": 4
    },
    "mcp.config": {
      "id": "mcp.config",
      "category": "mcp",
      "status": "warning",
      "summary": "MCP configuration has optional issues",
      "details": {
        "configured servers": "1",
        "disabled servers": "0",
        "node_repl": "env var CODEX_WINDOWS_REGISTERED_CORE is not set",
        "stdio servers": "1"
      },
      "remediation": "Set the missing MCP env vars or disable the affected server.",
      "durationMs": 0
    },
    "network.env": {
      "id": "network.env",
      "category": "network",
      "status": "ok",
      "summary": "network-related environment looks readable",
      "details": {
        "SSL_CERT_FILE": "readable file D:\\minconda\\Library\\ssl\\cacert.pem",
        "managed proxy": "not configured",
        "proxy env vars": "none",
        "respect system proxy": "disabled"
      },
      "remediation": null,
      "durationMs": 0
    },
    "network.provider_reachability": {
      "id": "network.provider_reachability",
      "category": "reachability",
      "status": "ok",
      "summary": "active provider endpoints are reachable over HTTP",
      "details": {
        "ChatGPT inference URL": "https://chatgpt.com/backend-api/<redacted> reachable (HTTP 405)",
        "desktop assets CDN": "https://persistent.oaistatic.com/codex-app-prod/<redacted> reachable (HTTP 200)",
        "reachability mode": "ChatGPT auth"
      },
      "remediation": null,
      "durationMs": 526
    },
    "network.websocket_reachability": {
      "id": "network.websocket_reachability",
      "category": "websocket",
      "status": "ok",
      "summary": "Responses WebSocket handshake succeeded",
      "details": {
        "DNS": "1 IPv4, 1 IPv6, first IPv4",
        "auth mode": "chatgpt",
        "connect timeout": "15000 ms",
        "endpoint": "wss://chatgpt.com/backend-api/<redacted>",
        "handshake result": "HTTP 101 Switching Protocols",
        "model provider": "openai",
        "provider name": "OpenAI",
        "proxy env vars": "none",
        "reasoning header": "false",
        "server model present": "false",
        "supports websockets": "true",
        "wire API": "responses"
      },
      "remediation": null,
      "durationMs": 1022
    },
    "runtime.provenance": {
      "id": "runtime.provenance",
      "category": "runtime",
      "status": "ok",
      "summary": "running npm on windows-x86_64",
      "details": {
        "commit": "unknown",
        "current executable": "D:\\nvm\\v24.18.0\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin\\codex.exe",
        "install method": "npm (package D:\\nvm\\v24.18.0\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc, bin D:\\nvm\\v24.18.0\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin, resources D:\\nvm\\v24.18.0\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-resources, path D:\\nvm\\v24.18.0\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-path)",
        "platform": "windows-x86_64",
        "version": "0.162.1"
      },
      "remediation": null,
      "durationMs": 0
    },
    "runtime.search": {
      "id": "runtime.search",
      "category": "search",
      "status": "ok",
      "summary": "search command found (bundled); execution not verified",
      "details": {
        "search command": "D:\\nvm\\v24.18.0\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-path\\rg.exe",
        "search command readiness": "file exists",
        "search provider": "bundled"
      },
      "remediation": null,
      "durationMs": 0
    },
    "sandbox.filesystem_paths": {
      "id": "sandbox.filesystem_paths",
      "category": "sandbox",
      "status": "ok",
      "summary": "no explicit filesystem paths to probe",
      "details": {},
      "remediation": null,
      "durationMs": 0
    },
    "sandbox.helpers": {
      "id": "sandbox.helpers",
      "category": "sandbox",
      "status": "ok",
      "summary": "sandbox configuration is readable",
      "details": {
        "approval policy": "OnRequest",
        "codex-linux-sandbox helper": "none",
        "denied-read glob rules": "0",
        "denied-read restrictions": "false",
        "denied-read rules": "0",
        "execve wrapper helper": "none",
        "filesystem sandbox": "restricted",
        "glob scan max depth": "unbounded",
        "managed filesystem source": "none",
        "network sandbox": "restricted",
        "sandbox backend": "elevated",
        "sandbox provisioning": "complete"
      },
      "remediation": null,
      "durationMs": 2
    },
    "security.endpoint": {
      "id": "security.endpoint",
      "category": "security",
      "status": "ok",
      "summary": "no supported endpoint protection detected",
      "details": {
        "endpoint products": "none detected"
      },
      "remediation": null,
      "durationMs": 19
    },
    "state.paths": {
      "id": "state.paths",
      "category": "state",
      "status": "ok",
      "summary": "state paths and databases are inspectable",
      "details": {
        "CODEX_HOME": "C:\\Users\\admin\\.codex (dir)",
        "active rollout files": "569 files, 1980057676 total bytes, 3479890 average bytes",
        "archived rollout files": "3 files, 305053 total bytes, 101684 average bytes",
        "goals DB": "C:\\Users\\admin\\.codex\\goals_1.sqlite (file)",
        "goals DB integrity": "ok",
        "log DB": "C:\\Users\\admin\\.codex\\logs_2.sqlite (file)",
        "log DB integrity": "ok",
        "log dir": "C:\\Users\\admin\\.codex\\log (missing)",
        "memories DB": "C:\\Users\\admin\\.codex\\memories_1.sqlite (file)",
        "memories DB integrity": "ok",
        "memories v2 DB": "C:\\Users\\admin\\.codex\\memories_v2_1.sqlite (missing)",
        "memories v2 DB integrity": "skipped (missing)",
        "queue DB": "C:\\Users\\admin\\.codex\\queue_1.sqlite (file)",
        "queue DB integrity": "ok",
        "sqlite home": "C:\\Users\\admin\\.codex (dir)",
        "state DB": "C:\\Users\\admin\\.codex\\state_5.sqlite (file)",
        "state DB integrity": "ok",
        "thread history DB": "C:\\Users\\admin\\.codex\\thread_history_1.sqlite (file)",
        "thread history DB integrity": "ok"
      },
      "remediation": null,
      "durationMs": 57
    },
    "state.rollout_db_parity": {
      "id": "state.rollout_db_parity",
      "category": "threads",
      "status": "ok",
      "summary": "rollout files and state DB thread inventory agree",
      "details": {
        "default model provider": "openai",
        "rollout DB active files": "569",
        "rollout DB active rows": "569",
        "rollout DB archive mismatches": "0",
        "rollout DB archived files": "3",
        "rollout DB archived rows": "3",
        "rollout DB duplicate DB paths": "0",
        "rollout DB duplicate rollout thread ids": "0",
        "rollout DB malformed file names": "0",
        "rollout DB missing active rows": "0",
        "rollout DB missing archived rows": "0",
        "rollout DB model providers": "openai=511, custom=54, cc-switch-official=7",
        "rollout DB rows": "572",
        "rollout DB scan cap reached": "false",
        "rollout DB scan errors": "0",
        "rollout DB sources": "vscode=189, subagent:other=169, subagent:thread_spawn=135, cli=77, exec=2",
        "rollout DB stale rows": "0"
      },
      "remediation": null,
      "durationMs": 387
    },
    "system.disk": {
      "id": "system.disk",
      "category": "disk",
      "status": "ok",
      "summary": "sufficient free disk space (73.6 GiB)",
      "details": {
        "CODEX_HOME available": "73.6 GiB",
        "failure threshold": "1.0 GiB",
        "warning threshold": "5.0 GiB",
        "worktree available": "73.6 GiB"
      },
      "remediation": null,
      "durationMs": 0
    },
    "system.environment": {
      "id": "system.environment",
      "category": "system",
      "status": "ok",
      "summary": "OS language zh-CN",
      "details": {
        "EDITOR": "not set",
        "VISUAL": "not set",
        "os": "Windows 10.0.26300 (Windows 11 Professional) [64-bit]",
        "os language": "zh-CN",
        "os type": "Windows",
        "os version": "10.0.26300"
      },
      "remediation": null,
      "durationMs": 0
    },
    "terminal.env": {
      "id": "terminal.env",
      "category": "terminal",
      "status": "ok",
      "summary": "terminal metadata was detected",
      "details": {
        "WT_SESSION": "present",
        "color output": "enabled",
        "console input code page": "65001",
        "console output code page": "65001",
        "stderr console mode": "0x00000007 (VT processing: true)",
        "stderr is terminal": "true",
        "stdin is terminal": "true",
        "stdout console mode": "0x00000007 (VT processing: true)",
        "stdout is terminal": "true",
        "terminal": "Windows Terminal",
        "terminal size": "116x30"
      },
      "remediation": null,
      "durationMs": 0
    },
    "terminal.title": {
      "id": "terminal.title",
      "category": "title",
      "status": "ok",
      "summary": "terminal title default",
      "details": {
        "terminal title activity": "true",
        "terminal title items": "activity, project-name",
        "terminal title project source": "cwd",
        "terminal title project value": "admin",
        "terminal title source": "default"
      },
      "remediation": null,
      "durationMs": 0
    },
    "updates.status": {
      "id": "updates.status",
      "category": "updates",
      "status": "ok",
      "summary": "update configuration is locally consistent",
      "details": {
        "cached latest version": "0.162.1",
        "check for update on startup": "true",
        "last checked at": "2026-10-10T10:16:12.168874500Z",
        "latest version": "0.162.1",
        "latest version status": "current version is not older",
        "npm update target": "not inspected (PATH helpers are not executed)",
        "update action": "npm install -g @openai/codex",
        "version cache": "C:\\Users\\admin\\.codex\\version.json"
      },
      "remediation": null,
      "durationMs": 865
    }
  }
}

What issue are you seeing?

All GPT-6 family models (GPT-6 Astra, Sol, Luna, and GPT-6.1) in Codex consistently fail with invalid_prompt, even for harmless prompts such as "Hello" or "Reply only with OK."

The exact error is:
Invalid prompt: your prompt was flagged as potentially violating our usage policy. (code=invalid_prompt)

GPT-5.6 works normally with the same account, while all GPT-6 models fail across multiple devices. ChatGPT web also works normally.

codex doctor --json reports healthy authentication, network connectivity, WebSocket connectivity, and installation. No local security enforcement was detected.

This appears to be a possible account-specific, server-side GPT-6 safety classification or model routing issue.

Uploaded diagnostic thread ID: 01a12550-14ee-7982-9abb-a6961752b3e9

Please investigate why all GPT-6 family models are rejecting harmless prompts for this account.

Image

What steps can reproduce the bug?

Uploaded thread: 01a12550-14ee-7982-9abb-a6961752b3e9

What is the expected behavior?

No response

Additional information

No response

Activity

  1. added
    CLIIssues related to the Codex CLI
    model-behaviorIssues related to behaviors exhibited by the model
    on Oct 10, 2026
  2. nizarfadlan commented on Oct 13, 2026

    @nizarfadlan

    Is there already a solution to this problem? I’ve been trying to find the root cause, but I still haven’t figured out why the GPT-6 family is getting that kind of response.

  3. zzl518 commented on Oct 14, 2026

    @zzl518

    Additional macOS reproduction with the same symptoms.

    Environment

    • OS: macOS 27.0 (Build 26A428), arm64
    • Client: Codex Desktop 26.1007.30912 (Build 20156)
    • Account: ChatGPT Plus
    • Affected models: GPT-6 series
    • Working models: GPT-5 series

    Behavior

    Every prompt sent to a GPT-6 model is rejected immediately with:

    Invalid prompt: your prompt was flagged as potentially violating our usage policy. Please try again with a different prompt.

    This includes harmless prompts such as hello and 你好. GPT-5 models respond normally on the same machine and account.

    Reproduction

    1. Open Codex Desktop.
    2. Create a new empty conversation/project.
    3. Select a GPT-6 model.
    4. Send hello.
    5. The request is rejected immediately as invalid_prompt.

    Troubleshooting already performed

    • Checked the OpenAI Status page; no outage was reported.
    • Logged out and back in.
    • Created new projects and conversations.
    • Reproduced with no files attached.
    • Removed local conversation history (thread_history_1.sqlite, sessions, and archived_sessions).
    • Reset Codex local state databases.
    • Checked ~/.codex/config.toml.
    • Checked installed skills and plugins.
    • Confirmed GPT-5 works normally in the same environment.

    Because the same benign prompts work immediately with GPT-5, this appears consistent with an account/model routing issue or a false-positive GPT-6 safety classification. Please check whether the affected account's GPT-6 requests are being incorrectly rejected.

  4. yisun123456 commented on Oct 15, 2026

    @yisun123456

    me too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLIbugSomething isn't workingmodel-behaviorIssues related to behaviors exhibited by the model

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions