Skip to content

Interrupting Codex CLI does not terminate spawned child processes (runaway background jobs) #7985

@Icarus603

Description

@Icarus603

What version of Codex is running?

codex-cli 0.72.0

What subscription do you have?

plus

Which model were you using?

gpt-5.2

What platform is your computer?

Darwin 24.6.0 arm64 arm

What issue are you seeing?

When interrupting an active Codex CLI session (e.g. via Esc), the Codex interaction stops but spawned commands may continue running in the background.

This can lead to uncontrolled runaway processes (e.g. crawlers repeatedly spawning Chrome instances), even though the user explicitly intended to stop execution.

Example:
Codex was running a uv-based crawler that launched Chrome for scraping.
I exited the session using Esc, but the crawler continued running in the background, repeatedly opening Chrome windows and consuming resources, with no visibility or easy way to stop it.

What steps can reproduce the bug?

Uploaded thread: 019b1913-3de2-7551-90df-0481f2546f9e

What is the expected behavior?

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLIbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions