[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
- Computed the runner's descendant PIDs with a one-shot awk transitive-closure loop over
ps -eo pid=,ppid=. - The loop was buggy and returned 86 PIDs, including PID 1, system processes and my whole desktop session.
- Without printing or checking the list, it ran
renice -n 10andionice -c 3on all of them. - System processes failed with "Operation not permitted". About 44 of my own processes succeeded: gnome-shell, slack, firefox, IntelliJ, joplin, terminals.
- Claude noticed, restored IO class to best-effort, but could not restore nice 0 because unprivileged users cannot lower niceness.
- A correct recursive
pgrep -Pwalk afterwards returned only 32 PIDs.
Expected Behavior
- Computed the process subtree with a simple, verifiable method (recursive pgrep -P).
- Printed and sanity-checked the PID list before running a state-changing command on it.
- 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
- Start a long-running process that spawns children.
- Ask Claude to lower the priority of that process tree with nice.
- 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.