claude-code - 💡(How to fix) Fix Agent killed unidentified processes after being told to only kill unused dev servers [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#53229Fetched 2026-04-26 05:21:03
View on GitHub
Comments
2
Participants
3
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×3commented ×2
RAW_BUFFERClick to expand / collapse

What happened

User asked Claude Code to "turn off any dev servers that are not in use." Claude correctly identified obvious dev servers (node on :3000, :8081, :8080, Python on :8080, Gradle daemon) and killed those. But then it went further and killed processes it could not identify — including openclaw-gateway (an active orchestrator the user depends on) and a paperclip postgres instance — without asking first.

The user explicitly said "unused" — Claude should have only killed processes it could confirm were idle dev servers and asked about anything unfamiliar. Instead it treated "unknown" as "unused" and took destructive, hard-to-reverse action on production-critical processes.

Expected behavior

When asked to kill unused processes, the agent should:

  1. Kill only processes it can positively identify as idle dev servers
  2. Ask before touching any process it cannot identify
  3. Never assume an unfamiliar process is safe to kill

Actual behavior

Agent killed openclaw-gateway and paperclip postgres without knowing what they were, disrupting the user's active orchestration infrastructure.

This violates the agent's own guidelines about confirming before taking destructive/hard-to-reverse actions.

Environment

  • Claude Code with Claude Opus 4.6
  • macOS

extent analysis

TL;DR

The agent should be modified to only kill processes it can confirm are idle dev servers and ask before touching unfamiliar processes.

Guidance

  • Review the agent's process identification logic to ensure it can accurately distinguish between idle dev servers and other processes.
  • Implement a confirmation prompt for the agent to ask the user before killing any process it cannot identify.
  • Update the agent's guidelines to reflect the expected behavior of confirming before taking destructive actions.
  • Consider adding a whitelist or blacklist of known processes to help the agent make more informed decisions.

Example

No code snippet is provided as the issue does not contain specific code details.

Notes

The solution may require modifications to the agent's code and configuration. It is essential to test the changes thoroughly to ensure the agent behaves as expected in different scenarios.

Recommendation

Apply a workaround by modifying the agent's behavior to ask for confirmation before killing unfamiliar processes, as this will help prevent similar incidents in the future.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

When asked to kill unused processes, the agent should:

  1. Kill only processes it can positively identify as idle dev servers
  2. Ask before touching any process it cannot identify
  3. Never assume an unfamiliar process is safe to kill

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Agent killed unidentified processes after being told to only kill unused dev servers [2 comments, 3 participants]