Claude Code Plugin Bug Causes CPU Spikes and Battery Drain

✍️ OpenClawRadar📅 Published: April 2, 2026🔗 Source
Claude Code Plugin Bug Causes CPU Spikes and Battery Drain
Ad

The Problem

A user with a new MacBook M5 Pro experienced complete battery drain in a single day with minimal screen usage. Investigation revealed bun.exe processes running at 100% CPU for over 8 hours with the laptop lid closed.

Debugging Process

Initial suspicion was malware, particularly given the timing with the Axios npm supply chain attack where OpenClaw was mentioned in advisories. The user ran IOC checks including:

  • Searching for plain-crypto-js directory
  • Checking lockfiles for compromised Axios versions
  • Grepping logs for C2 domains

All checks came back clean.

Root Cause

The processes traced back to: ~/.claude/plugins/marketplaces/claude-plugins-official/external_plugins/telegram/server.ts

This is Claude Code's Telegram plugin, which spawns a bun server that polls Telegram's bot API. The critical issues:

  • Every new Claude Code agent session launches its own instance of this plugin
  • The user had accumulated 8 agent sessions over the day, each running its own Telegram server process
  • The plugin has no error backoff mechanism - when polling hits issues, it retries instantly in a tight loop
  • Two of these processes were running at 100% CPU each
Ad

Cleanup Challenges

Simple fixes didn't work:

  • Killing processes didn't help because agent sessions would respawn them
  • Uninstalling the plugin only removed it from external_plugins - a cached copy at ~/.claude/plugins/cache/ kept getting loaded
  • Processes had PPID 1 (launchd), so they survived across sleep/wake cycles

Full Cleanup Required

claude plugins uninstall telegram
rm -rf the cached copy
pkill all remaining bun processes by name
restart the machine to clear stale agent sessions

Broader Implications

Other plugins with similar architecture could have the same issue. The user specifically mentioned Discord, iMessage, and FakeChat plugins also have server.ts files that could exhibit similar behavior.

The core problem is plugin lifecycle management: these background servers run with no resource limits and no cleanup when sessions end. The user suggests Claude Code needs resource limits on plugin processes and automatic cleanup when sessions end.

📖 Read the full source: r/ClaudeAI

Ad

👀 See Also

AWS reports AI-augmented attack compromised 600+ FortiGate firewalls
Security

AWS reports AI-augmented attack compromised 600+ FortiGate firewalls

Cybercriminals used off-the-shelf generative AI tools to compromise over 600 internet-exposed FortiGate firewalls across 55 countries in a month-long campaign, according to AWS. The attackers scanned for exposed management interfaces, tried weak credentials, and used AI to generate attack playbooks and scripts.

OpenClawRadar
OpenClaw Security Breach: CEO's Agent Sold for $25K, 135K Instances Exposed
Security

OpenClaw Security Breach: CEO's Agent Sold for $25K, 135K Instances Exposed

A UK CEO's OpenClaw instance was sold for $25,000 on BreachForums, exposing plain-text Markdown files containing conversations, production databases, API keys, and personal details. SecurityScorecard found 135,000 OpenClaw instances exposed with insecure defaults.

OpenClawRadar
MCP Package Security Scan Reveals Widespread Destructive Capabilities Without Confirmation
Security

MCP Package Security Scan Reveals Widespread Destructive Capabilities Without Confirmation

A security scan of 2,386 MCP packages on npm found 63.5% expose destructive operations like file deletion and database drops without requiring human confirmation. The researcher discovered 49% had security issues overall, with 402 critical and 240 high severity vulnerabilities.

OpenClawRadar
Open-Source Attack Surface Management Cheat Sheet Released
Security

Open-Source Attack Surface Management Cheat Sheet Released

A developer has open-sourced an Attack Surface Management cheat sheet that covers practical workflows, tools, and references. The project includes sections on asset discovery, infrastructure tracking, reconnaissance tooling, automation workflows, and learning resources.

OpenClawRadar