Skip to content

Codex CLI: invalid_prompt "flagged as potentially violating our usage policy" mid-turn on routine coding work (effort low) #48929

Description

@jensabrahamsson

What version of Codex CLI is running?

codex-cli 0.157.1 (Homebrew cask)

What subscription do you have?

ChatGPT sign-in

Which model were you using?

gpt-6-luna, reasoning effort low

What platform is your computer?

macOS 27.0 (26A428), arm64 (Mac Studio)

What issue are you seeing?

Twice within ~8 hours, a long-running agentic turn on reasoning effort low ended with:

Invalid prompt: your prompt was flagged as potentially violating our usage policy. Please try again with a different prompt: https://platform.openai.com/docs/guides/reasoning#advice-on-prompting

(error code invalid_prompt)

Both turns were ordinary software-development work in a private Python repository (working through failing unit tests / running a test-suite plan). Neither flag came on a new user message: Codex had started the turn itself to continue the thread's active goal, and the flag came mid-turn after 70 and 260 ordinary tool calls respectively. The last tool call before each flag was a read-only sed -n of a Python source file. So the flagged "prompt" appears to be the accumulated conversation context.

  • Incident 1: 2026-09-27T23:08:28Z, turn 01a0e512-b13c-7363-8e88-21cc4226e528
  • Incident 2: 2026-09-28T06:39:53Z, turn 01a0e6a5-1ef4-7c72-b430-3053757e67fb

The same goal later continued without flags (once on low, and on medium after I switched), so I can't say low is proven to be the cause, but both flags happened on low. It's costly: to avoid losing long turns I've moved to medium.

What steps can reproduce the bug?

Uploaded thread: 01a0e3ce-15c3-7770-ad4d-3afb25f17eaa

Long autonomous goal-continuation turns on low in the same thread. Not deterministically reproducible.

What is the expected behavior?

Routine coding/test work isn't flagged as a usage-policy violation, or at least the flag is attributable (request ID shown) and appealable from the CLI.

Additional information

A local rollout doesn't record the request ID of the flagged request, which makes reporting harder. Also reported via OpenAI Help Center chat.

Activity

  1. added
    bugSomething isn't working
    CLIIssues related to the Codex CLI
    model-behaviorIssues related to behaviors exhibited by the model
    on Sep 28, 2026
  2. jensabrahamsson commented on Oct 1, 2026

    @jensabrahamsson
    Author

    Possibly related: #48817 (same CLI 0.157.1 and gpt-6-luna, same error, opened about an hour after my first block), #48865, #47721, #48713. One difference: in those reports every prompt is blocked, while here two turns were blocked mid-goal and the same goal later ran fine on the same model and effort. That may help narrow it down.

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