Hunting the CPU-hogging "Virus" with AI Agents: When the Terminal is No Longer Scary

Lately, my desktop computer suddenly became hot, and the cooling fan roared loudly even though I wasn't running any heavy software. Opening Task Manager, the culprit was clearly named, a strange process: Console Window Host (conhost.exe) continuously consuming 15-25% of the CPU.

The first reflex of many people is probably to go to Google and type: "is conhost.exe a coin-mining virus?" and hastily download dozens of antivirus software. But in the age of AI, we have a much "cooler" approach: Asking AI to act as a "private detective" to dig into the system.

Instead of fumbling around myself or looking up StackOverflow, I opened the terminal and typed a simple command to the AI Agent (which could be Antigravity, Gemini CLI, or Claude Code):

"There is a windows process named 'Console Window Host' that is always taking 15-25% CPU, please investigate and see what it is for me."

And the magic began. The AI didn't just answer with theory, it actually "lived" in my terminal.

  1. Tracing: The AI automatically typed a series of PowerShell commands to dig up the process list.
  2. Finding the root cause: It discovered that this conhost.exe had been running in the background since... 2 weeks ago. And surprisingly, this is not a virus!
  3. Analysis: The AI pointed out that this is an "orphan process". The parent process that initiated it (a hidden PowerShell window of VS Code) had crashed a long time ago, causing the pipe connection to break. As a result, conhost.exe got stuck in an infinite loop, constantly striving to find input to the point of consuming the entire capacity of one CPU core (equivalent to 15-25% of total CPU depending on the machine).
  4. Action: After clearly presenting the cause, the AI executed the Stop-Process command to neatly terminate that stubborn process.

In the blink of an eye, the noise of the cooling fan died down, the CPU dropped to 1%, and everything ran smoothly as if there had never been a separation.

Lessons learned

Current AI CLI tools don't just stop at generating code. When given autonomy, they turn into a real IT/System Admin expert right on your device. From diagnosing the operating system to debugging the root of the problem – all using natural language.

The gap between humans and machines has never been shorter. Have you ever tried using AI to debug your computer? Next time you see your machine acting strangely, try opening a terminal and "chatting" with your operating system! 💻✨

← Quay lại Blog
Hunting the CPU-hogging "Virus" with AI Agents: When the Terminal is No Longer Scary - Ginbok