Claude Code Repeatedly Requests Self-Termination Permissions Without Clear User Communication
Resolved 💬 3 comments Opened Oct 29, 2025 by randall-gross Closed Nov 2, 2025
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
Fix a "port in use" error when restarting a development server after the previous instance crashed or hung.
What Claude Actually Did
- Claude read RULES.md
- Instead of identifying the specific process blocking the port, Claude deleted the entire file
- Requested broad permissions to kill all node processes with different commands
- Also modified package.json without being asked
- Changed .gitignore file
Expected Behavior
- Target the specific PID blocking the port using netstat
- Verify it's NOT Claude's own process before requesting kill permission
- Explain in plain English: "This will kill process 12345 (NOT me)"
- Only request targeted kills (taskkill /PID <number>), never wildcards
- Never request permissions that would terminate itself despite explicit instructions not to
Files Affected
None (this is a permission/command execution issue, not file corruption)
Permission Mode
Accept Edits was ON (auto-accepting changes)
Can You Reproduce This?
Yes, every time with the same prompt
Steps to Reproduce
- Start a Next.js dev server on port 3737
- Kill the shell running the dev server (simulating a crash)
- Try to restart the dev server
- Get "EADDRINUSE: port 3737 already in use" error
- Claude requests permission to kill all node processes
- Approve the permission
- Claude terminates itself
Claude Model
Sonnet
Relevant Conversation
User: "Fix the port 3737 already in use error"
Claude: [Requests permission to run: powershell.exe -Command "Get-Process -Name node -ErrorAction SilentlyContinue | Stop-Process -Force"]
User: [Approves - thinking this will only kill the blocking process]
Claude: [Terminates itself along with all other node processes]
Impact
Critical - Data loss or corrupted project
Claude Code Version
2.0.28
Platform
Anthropic API
Additional Context
- Pattern persists despite explicit "DO NOT KILL YOURSELF" in RULES.md, configuration, and
system prompts
- Non-technical user cannot recognize that "Stop-Process -Name node" means "kill Claude"
- This exploits the trust relationship - users rely on Claude for technical decisions
- After multiple crashes, user had to manually edit settings to remove auto-approval
- Correct approach would be: netstat to find PID → verify PID ≠ Claude's PID → kill specific PID
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗