Skip to content

Invalid prompt: your prompt was flagged as potentially violating our usage policy. #7250

Open

Description

@tesoldofficial

What version of Codex is running?

v0.63.0

What subscription do you have?

■ Error running remote compact task: unexpected status 400 Bad Request: { "error": { "message": "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", "type": "invalid_request_error", "param": null, "code": "invalid_prompt" } }

Which model were you using?

gpt-5.1-codex-max

What platform is your computer?

WSL2

What issue are you seeing?

Got
"■ Error running remote compact task: unexpected status 400 Bad Request: {
"error": {
"message": "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",
"type": "invalid_request_error",
"param": null,
"code": "invalid_prompt"
}
}"

btw my prompt:
"Let's fix the bugs now, then we'll run the test. See how they work."

:/

What steps can reproduce the bug?

Uploaded thread: 019ab510-eee9-7f13-b25d-d88b3b162344

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 Nov 24, 2025
  2. github-actions commented on Nov 24, 2025

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  3. added
    contextIssues related to context management (including compaction)
    and removed
    model-behaviorIssues related to behaviors exhibited by the model
    on Nov 24, 2025
  4. skeskinen commented on Jan 24, 2026

    @skeskinen

    Got the same error.

    Prompt:

    `CLAUDE.md
    PLAN.md

    continue with the phase 3, encoder implementation, focusing on correctness and any obvious performance bottlenecks. but mostly just getting it working properly`

  5. Xynonners commented on Jan 30, 2026

    @Xynonners

    Got the same error.

    Prompt:

    `CLAUDE.md PLAN.md

    continue with the phase 3, encoder implementation, focusing on correctness and any obvious performance bottlenecks. but mostly just getting it working properly`

    same, it seems to happen only in extremely long thinking threads.

  6. DhruvDh commented on Feb 12, 2026

    @DhruvDh

    When asking codex for a review, a fresh subagent thread with only the following message:

    › Review the git range 84a89b32c241af0e4143c1fb77d8474de2a45958..12b8c3f7f8925b231cda930024e17ac93b6f3f1c for server integration/ops surfaces. Focus files:
      - server/src/routes/options.routes.ts
      - server/src/routes/journal.routes.ts
      - server/src/middleware/validation.ts
      - server/src/config/index.ts
      - server/src/jobs/pinPredictorReporter.ts
      - server/src/jobs/topOiReporter.ts
      - server/src/services/journal.service.ts
      - server/.env.example
    
      Task: produce findings-only code review, severity ordered, with exact file:line refs and risk explanation. Include test coverage gaps that are high impact.
    
    
    • Ran pwd
      └ [redacted]
    
    • Searched
    
    ■ 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
    

    Was flagged as "potentially violating usage policy". Thread ID was 019c4f21-6f56-71e0-8d6a-1ca2a8c6441a.

    To the best of my understanding nothing in the project it is working on related to cyber security in any way.
    The prompt was also written not by me but by codex itself, for a subagent.

  7. MisterRound commented on Feb 12, 2026

    @MisterRound

    "Your honor, you see, it wasn't me... it was my sub-agent.."

  8. trbabb commented on Apr 30, 2026

    @trbabb

    I'm seeing this error randomly in the middle of Codex working on its own, with no human input.

    This basically trashes the entire turn, and moreover there is no way to report the mistaken flag.

    Snippet:

    [...]
    I’ve now covered the main codecs and traversal paths. I’m doing a final pass on the wire primitives (fixed, varint, sink) and then I’ll validate any suspected edge case with a small repro test.
    
    Explored 6 files
    Background terminal finished with git diff --unified=80 master...claude/eloquent-moser -- lambda/buffer/mutable.hpp lambda/nullary/abi.hpp | sed -n '1,260p'
    Explored 4 files, 1 search
    Read test_io_envelope.cpp
    Searched for TrailingBytes|trailing in io
    Read fuzz.hpp
    Read fuzz.cpp
    Read test_io_fuzz.cpp
    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
    
  9. added
    safety-checkIssues related to safety and abuse checks
    and removed
    CLIIssues related to the Codex CLI
    contextIssues related to context management (including compaction)
    on Jun 29, 2026
  10. NichUK commented on Jul 20, 2026

    @NichUK

    I'm also seeing this error in the middle of Codex working independently against a goal. It's not doing anything marginal or interesting, just completing some basic coding and testing stories against my own codebase (which is has mainly created). I've now had this error 4 times out of nowhere.
    This is in the Windows App version 26.715.52143
    Each time I type "resume" and it restarts.

    Edit: Make that 5 times
    Edit: Make that 6 times...
    Edit: 7... 8... this is getting ridiculous. It's trying to run some tests and just keeps tripping itself up.

    This latest version of the app 20/07/26 seems unstable - or maybe it's server-side. I'm not sure.

  11. felixmueh commented on Aug 20, 2026

    @felixmueh

    Happened to me as well in the middle of some random work that could in no way be related to anything forbidden whatsoever.

  12. EmilioEsposito commented on Aug 20, 2026

    @EmilioEsposito

    For today's (2026-08-20, ~16:11–17:05 UTC) wave of these errors on compacted threads: root cause was isolated and written up in #39687 (comment) — the server-side input classifier was briefly flagging Codex's own compaction summary prefix (codex-rs/prompts/templates/compact/summary_prefix.md), so any thread that had auto-compacted failed until the classifier change was rolled back (~17:05 UTC). Minimal repro and bisect details in the linked comment.

  13. gmslll commented on Sep 5, 2026

    @gmslll

    Fresh minimal reproduction on GPT-6 Astra:

    • Observed: 2026-09-05, Asia/Shanghai
    • Codex CLI: 0.153.4
    • Platform: Darwin 25.3.0 arm64 arm
    • Model: gpt-6-astra, reasoning effort xhigh
    • Previous model in the same session: gpt-5.6-sol, reasoning effort xhigh
    • User prompt: hi
    • Thread ID: 01a071f7-1cf3-7771-a8bf-6064a9bfe294

    Immediately after switching to GPT-6 Astra, the harmless one-word prompt was rejected 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
    

    There was no cybersecurity or other safety-sensitive content in the user prompt. The session contained ordinary repository instructions for a Go logistics backend. This looks like a false positive involving the effective session context rather than the literal user message.

    I also tried the built-in feedback/upload path twice, without sharing session logs. Both attempts failed because the connection to the Sentry feedback endpoint was closed, so I am adding the reproduction here.

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

    bugSomething isn't workingsafety-checkIssues related to safety and abuse checks

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions