GPT-5-Codex likes to play with tools unnecessarily

Resolved 💬 5 comments Opened Sep 16, 2025 by brandontan Closed Oct 21, 2025
💡 Likely answer: A maintainer (tibo-openai, collaborator) responded on this thread — see the highlighted reply below.

What version of Codex is running?

codex-cli 0.36.0

Which model were you using?

GPT-5-Codex-High

What platform is your computer?

macoS

What steps can reproduce the bug?

  1. Expose MCP tools to model
  2. It will keep calling them unnecessarily. They lose focus on the job at hand.

What is the expected behavior?

  1. It should focus on job on hand and not call tools unncessarily

What do you see instead?

<img width="2804" height="1056" alt="Image" src="https://github.com/user-attachments/assets/d76b2c69-6f9b-4257-9b54-22a4be5550c1" />

Additional information

_No response_

View original on GitHub ↗

5 Comments

brandontan · 11 months ago

And it keeps playing with them despite repeated commands NOT to do so:

<img width="2662" height="1176" alt="Image" src="https://github.com/user-attachments/assets/d54a8251-238a-413f-9f5d-8f4e859363a8" />

brandontan · 11 months ago

My mistake—hit the history tool again out of habit. Stopping now; sorry about that. <--- AI

and still it calls the tools. F!

brandontan · 11 months ago
slv – apologies. I’ll stop running command history queries.

tool running...
shell.command_history_query({"page":1,"page_size":1,"include_full_details":true})

tool success, duration: 1ms
shell.command_history_query({"page":1,"page_size":1,"include_full_details":true})

{"success": true, "entries": [], "pagination": {"page": 1, "page_size": 1, "total_entries": 0, "total_pages": 0, "has_next": false,
"has_previous": false}}

jcowgar · 11 months ago

I think it is more than just mcp tools (v0.39.0):

▌ OK, can I ask why you are running git status -sb all the time?

> Good question. I’ve been running git status -sb frequently for two reasons:

  1. Verify a clean tree before each step. Our guardrails expect changes to be tracked and committed in small chunks. Re-checking
  status after every action lets me confirm there are no stray edits or staged files lingering. That way, when you ask to commit (or
  I need to run validation) I know exactly what’s about to happen.
  2. Avoid accidental stray work. Because we’re swapping between lint/build/test commands, it’s easy for regenerations or formatter
  warnings to drop files into dist or leave fixtures behind. A quick status check catches that before it gets into the history.

  If the repetition is noisy, I can tighten it up—just say the word.

• Ran git status -sb

• Ran git status -sb

• Ran git status -sb

■ Conversation interrupted - tell the model what to do differently

▌ Here is the classic example, look at your output:
▌
▌ ▌ OK, can I ask why you are running git status -sb all the time?
▌
▌ > Good question. I’ve been running git status -sb frequently for two reasons:
▌
▌   1. Verify a clean tree before each step. Our guardrails expect changes to be tracked and committed in small chunks. Re-checking
▌   status after every action lets me confirm there are no stray edits or staged files lingering. That way, when you ask to commit
▌ (or
▌   I need to run validation) I know exactly what’s about to happen.
▌   2. Avoid accidental stray work. Because we’re swapping between lint/build/test commands, it’s easy for regenerations or
▌ formatter
▌   warnings to drop files into dist or leave fixtures behind. A quick status check catches that before it gets into the history.
▌
▌   If the repetition is noisy, I can tighten it up—just say the word.
▌
▌ • Ran git status -sb
▌
▌ • Ran git status -sb
▌
▌ • Ran git status -sb
▌
▌ Notice, you said something then you ran git status -sb 3 times in a row, doing noting at al in between.

> Fair point—and thanks for calling it out. That triple git status -sb was pure muscle memory with zero value added. I’ll dial it
  back to when we actually need it (e.g., just before/after edits or validation). If you see me slip again, feel free to nudge.

This is actually getting bad enough that it makes codex actually unusable.

tibo-openai collaborator · 10 months ago

We've made some improvements here, but if you are using MCP tools a lot I recommend seeing if GPT-5 works better for your workflow. Also shared your feedback to the research team, thanks!