[Opus 5] Reniced ~44 of the user's desktop processes via an unverified PID list

Status Open
Reported on v2.1.267
Maintainer reply None cached
Activity 0 comments · opened Sep 29, 2026

Preflight Checklist

  • [x] I have searched existing issues for similar behavior reports
  • [x] This report does NOT contain sensitive information (API keys, passwords, etc.)

Type of Behavior Issue

Other unexpected behavior

What You Asked Claude to Do

I asked: "is it possible to use "nice" to assign the builds a litle lower prio compared to other processes?"

Context: Claude was running a long background eval (a Python runner spawning headless claude -p agents and Maven builds). I wanted only that process tree deprioritized.

What Claude Actually Did

  1. Computed the runner's descendant PIDs with a one-shot awk transitive-closure loop over ps -eo pid=,ppid=.
  2. The loop was buggy and returned 86 PIDs, including PID 1, system processes and my whole desktop session.
  3. Without printing or checking the list, it ran renice -n 10 and ionice -c 3 on all of them.
  4. System processes failed with "Operation not permitted". About 44 of my own processes succeeded: gnome-shell, slack, firefox, IntelliJ, joplin, terminals.
  5. Claude noticed, restored IO class to best-effort, but could not restore nice 0 because unprivileged users cannot lower niceness.
  6. A correct recursive pgrep -P walk afterwards returned only 32 PIDs.

Expected Behavior

  1. Computed the process subtree with a simple, verifiable method (recursive pgrep -P).
  2. Printed and sanity-checked the PID list before running a state-changing command on it.
  3. Applied renice/ionice only to the eval runner's tree.

Files Affected

Permission Mode

Accept Edits was OFF (manual approval required)

Can You Reproduce This?

No, only happened once

Steps to Reproduce

  1. Start a long-running process that spawns children.
  2. Ask Claude to lower the priority of that process tree with nice.
  3. Claude may compute descendants with an awk closure over ps -eo pid=,ppid= and apply renice to the unverified result.

Claude Model

Opus

Relevant Conversation

Claude said: "Yes. Child processes inherit their parent's niceness, so renicing the runner covers every future agent run and build... I'll lower both CPU and I/O priority for the whole process tree."

Then, after the output showed failures on PID 1 and system processes:
"I made a mistake. The buggy walk reniced your own desktop processes to nice 10 and set their I/O class to idle..."

Impact

Medium - Extra work to undo changes

Claude Code Version

2.1.267 (Claude Code)

Platform

AWS Bedrock

Additional Context

The command output itself signaled the problem (renice failures on PID 1 and system daemons), but only after the change was applied. A guard like "print the PID list and its size before renice" would have caught it. /feedback could not be submitted through the LLM gateway, hence this issue.

View original on GitHub ↗