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

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 ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗