GPT5.1-codex-mini keep asking to run command

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

GPT5.1-codex-mini keep asking to run command

Steps to Reproduce

Choose auto-mode and GPT5.1-codex-mini, ask to refactor or revise code

Screenshots / Screen Recordings

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.0.77 (user setup)
VSCode Version: 1.99.3
Commit: ba90f2f88e4911312761abab9492c42442117cf0
Date: 2025-11-13T23:10:43.113Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26100

For AI issues: which model did you use?

GPT5.1-codex-mini

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report. It looks like the model is hallucinating: it’s generating unrelated terminal commands (pwd, ls, echo) instead of actually editing your code.

Please share the Request ID – this is critical for the engineering team:

  • Click the context menu in the top right corner of this chat → Copy Request ID

A few quick checks that can help narrow this down:

  • Try the same refactoring task with a different model (for example, Claude Sonnet 4)
  • Does this happen every time with GPT 5.1 codex mini, or only sometimes?