Skip to content

closing terminal with a pending command approval approves and executes the command #17276

@jamesheinlein

Description

@jamesheinlein

What version of Codex CLI is running?

0.118

What subscription do you have?

pro

Which model were you using?

5.4-high

What platform is your computer?

darwin

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

ghostty

What issue are you seeing?

5.4 requested to run an extremely destructive, harmful command (essentially nuking valuable data). at that point, the particular instance already showed a repeated pattern of being unhinged and misaligned, so I just closed the whole ghostty window instead of giving it a chance to course correct.

closing the window triggered the command to be invoked before exit, causing a few thousand dollars in data loss.

I get that users sign up for a lot of risk using a scrappy product like this, and that closing the window at that time was dumb, but I am confused as to why the app is architected like this.

What steps can reproduce the bug?

  1. have codex request a malicious, destructive command
  2. do not approve it due to how expensive and catastrophic the loss would be
  3. close the ghostty window

What is the expected behavior?

for command approval functionality to work, and for the overall system to not override the approval dialog and run destructive commands without me at least picking an option. or for clear warning like "approvals are not supposed to actually work, the system can randomly override and run things that violate your settings"

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    TUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displaybugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions