Agent cannot interrupt spawned non-PTY command

Open 💬 0 comments Opened May 31, 2026 by user202729

What version of Codex CLI is running?

0.130.0

What subscription do you have?

API

Which model were you using?

GPT 5.5

What platform is your computer?

Linux 6.8.0-124-generic x86_64 x86_64

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

Gnome terminal

Codex doctor report

not available

What issue are you seeing?

The agent cannot stop a running command spawned without a PTY.

This happens when, for example, the agent accidentally issue a find command that is too broad (e.g. find ~ -name something, despite my AGENTS.md already forbidding it), then it may try to Ctrl-C it, but it fails because there's no PTY.

What steps can reproduce the bug?

  1. Tell the agent to run find ~ -name something.
  2. Tell the agent to stop the command.
  3. It cannot. The command remains in the background, needlessly consuming CPU, unless the user manually /stop it.

What is the expected behavior?

That the agent is able to stop the command.

Additional information

_No response_

View original on GitHub ↗