Codex ran test file which removed all of the local data from database

Resolved 💬 2 comments Opened Apr 16, 2026 by hanzala-afzal-dev Closed Apr 16, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex CLI is running?

0.120.0

What subscription do you have?

Chatgpt Plus

Which model were you using?

gpt-5.4 high

What platform is your computer?

Linux

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

_No response_

What issue are you seeing?

I asked Codex to improved the code quality and a bug. It automatically start writing the tests for verification and ran it.

I was working on Laravel 12 application.
It used (\Illuminate\Foundation\Testing\RefreshDatabase::class) in a test file which removed all rows from every table.

This is very destructive behavior.

What steps can reproduce the bug?

Uploaded thread: 019d6829-7822-7fe3-878e-d47384f750ad

What is the expected behavior?

Codex should always ask before writing/running the tests.

Additional information

_No response_

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 4 months ago

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

  • #17276

Powered by Codex Action

etraut-openai contributor · 4 months ago

Thanks for the bug report. We'll share the feedback with the team responsible for training our codex models. We're tracking this feedback and similar reports so we can improve future models. And thanks for using the /feedback command. That additional information is useful.