Skip to content

Background tasks keep spinning independently w/o way to kill them #8656

@yaroslavyaroslav

Description

@yaroslavyaroslav

What version of Codex is running?

codex-cli 0.77.0

What subscription do you have?

Team

Which model were you using?

gpt-5.2-codex

What platform is your computer?

Darwin 25.2.0 arm64 arm

What issue are you seeing?

Sometimes codex spawns tasks in a background. In the case of this session it was uv python runner.

Those tasks kept forever until the session ended or I kill them manually by system kill command.

There's no way to kill them from within codex UI, neither there's a timeout or some internal tool to kill those.

What steps can reproduce the bug?

Uploaded thread: 019b7a0d-4e69-7de1-9976-f95d54af5194

What is the expected behavior?

/prune or /kill id command that will force kill the background tasks from within the tui.

Additional information

So this is what I have and neither me no

/ps

Background terminals

  • uv run python - <<'PY' [...]
  • uv run python - <<'PY' […]

also cancel both background running python pathing tasks that are in a bg so far


/ps

Background terminals

  • uv run python - <<'PY' [...]
  • uv run python - <<'PY' [...]

■ Conversation interrupted - tell the model what to do differently. Something went wrong? Hit `/feedback` to report the issue.



› Those one:


  /ps


  Background terminals


    • uv run python - <<'PY' [...]
    • uv run python - <<'PY' [...]



• Ran pgrep -f "uv run python"
  └ sysmon request failed with error: sysmond service not found
    pgrep: Cannot get process list

• I’m letting the user know that sandbox restrictions prevent listing or killing processes and block running the Streamlit app due to port permissions. I’ll provide
  manual commands they can run locally to manage background tasks and recommend running the app outside the sandbox….

─ Worked for 24s ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

• I can’t see/kill your background processes from here — sandbox blocks process listing (pgrep failed with “sysmond service not found”). Per your rules, I won’t try
  risky workarounds. Please run this in your own terminal to stop them:

  pkill -f "uv run python"

  If you want to confirm first:

  ps aux | rg "uv run python"

  ….

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLITUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displayenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions