Skip to content

CPU runaway #22

Closed
Closed

Description

@FarVision2

There seems to be a recursive consumption going on. I was forced to remove. CPU went to 90+ percent. SSH on Ubuntu native via VScode. Two projects running one terminal each. I was running some website linting on the first line. We were using subagents, so maybe ccstatusline was kicking off per subagent.

`CPU load averages:
	16.77 (1 mins) , 8.66 (5 mins) , 9.54 (15 mins)
CPU type:
	Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz , 8 cores

ID	Owner	CPU	Command
1828575 	cool2 	61.3 % 	/usr/bin/node /home/cool2/frontend/node_modules/next/dist/compiled/jes ...
1827797 	cool2 	57.4 % 	next-server (v14.2.30)
1783030 	cool2 	29.9 % 	claude
1831348 	cool2 	28.2 % 	npm
1831104 	root 	27.1 % 	/usr/bin/python3 /usr/lib/update-notifier/apt-check --human-readable
1831070 	cool2 	24.0 % 	npm exec ccstatusline@latest
1831499 	cool2 	21.0 % 	node /usr/bin/npx -y ccstatusline@latest
1831420 	cool2 	20.8 % 	node /home/cool2/.npm/_npx/1432d6096563609a/node_modules/.bin/ccstatusline
1830866 	cool2 	20.4 % 	npm exec ccstatusline@latest
1831436 	cool2 	20.0 % 	node /home/cool2/.npm/_npx/1432d6096563609a/node_modules/.bin/ccstatusline
1831514 	cool2 	20.0 % 	node /home/cool2/.npm/_npx/1432d6096563609a/node_modules/.bin/ccstatusline
1831202 	root 	18.4 % 	/usr/share/webmin/authentic-theme/xhr.cgi
1830725 	cool2 	17.5 % 	npm exec ccstatusline@latest
1831191 	cool2 	17.2 % 	npm
1352434 	cool2 	16.5 % 	claude
1831405 	cool2 	15.6 % 	node /usr/bin/npx -y ccstatusline@latest
1830526 	cool2 	15.0 % 	npm exec ccstatusline@latest
1830416 	cool2 	14.0 % 	npm exec ccstatusline@latest
1831222 	root 	11.4 % 	/usr/bin/perl /usr/share/webmin/authentic-theme/stats.pl 556
1831567 	cool2 	10.4 % 	node /home/cool2/.npm/_npx/1432d6096563609a/node_modules/.bin/ccstatusline
1783597 	cool2 	4.3 % 	/usr/bin/node /home/cool2//node_modules/typescript/lib/tsserv ...
34570 	cool2 	4.1 % 	/home/cool2/.vscode-server/cli/servers/Stable-e3550cfac4b63ca4eafca7b601f0d28858 ...
1830676 	root 	4.0 % 	/usr/share/webmin/system-status/recollect.cgi
1345538 	cool2 	3.8 % 	/home/cool2/.vscode-server/cli/servers/Stable-e3550cfac4b63ca4eafca7b601f0d28858 ...
1825579 	cool2 	2.3 % 	node /home/cool2/frontend/node_modules/.bin/next build
1827364 	cool2 	2.3 % 	npm run dev
1185408 	netdata 	2.2 % 	/opt/netdata/usr/libexec/netdata/plugins.d/apps.plugin 1
1184877 	netdata 	2.1 % 	/opt/netdata/bin/srv/netdata -P /run/netdata/netdata.pid -D
1827591 	cool2 	2.1 % 	node /home/cool2/node_modules/.bin/next dev
1825500 	cool2 	1.0 % 	npm run build
19 	root 	0.8 % 	[idle_inject/0]
22 	root 	0.8 % 	[idle_inject/1]
28 	root 	0.8 % 	[idle_inject/2]
34 	root 	0.8 % 	[idle_inject/3]
40 	root 	0.8 % 	[idle_inject/4]
46 	root 	0.8 % 	[idle_inject/5]
52 	root 	0.8 % 	[idle_inject/6]
58 	root 	0.8 % 	[idle_inject/7]
1783596 	cool2 	0.7 % 	/usr/bin/node /home/cool2/node_modules/typescript/lib/tsserv ...
1185335 	netdata 	0.4 % 	/opt/netdata/usr/libexec/netdata/plugins.d/go.d.plugin 1
1345509 	cool2 	0.4 % 	/home/cool2/.vscode-server/code-e3550cfac4b63ca4eafca7b601f0d2885817fd1f command ...
1831039 	root 	0.4 % 	/usr/libexec/packagekitd
1783062 	cool2 	0.3 % 	npm exec @playwright/mcp@latest
1783486 	cool2 	0.3 % 	/home/cool2/.cache/uv/archive-v0/Slkn8Fwi9cubx1GKkpviz/bin/python /home/cool2/.c ...
1830771 	root 	0.3 % 	apt-get update
1345490 	cool2 	0.2 % 	sshd: 
1783063 	cool2 	0.2 % 	npm exec @modelcontextprotocol/server-sequential-thinking
1831369 	root 	0.2 % 	/usr/bin/perl /usr/share/webmin/miniserv.pl /etc/webmin/miniserv.conf
1039 	messagebus 	0.1 % 	@dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activati ...
1636 	cool2 	0.1 % 	/home/cool2/.vscode-server/cli/servers/Stable-e3550cfac4b63ca4eafca7b601f0d28858 ...
1675 	cool2 	0.1 % 	/home/cool2/.vscode-server/cli/servers/Stable-e3550cfac4b63ca4eafca7b601f0d28858 ...
1185406 	netdata 	0.1 % 	/opt/netdata/usr/libexec/netdata/plugins.d/debugfs.plugin 1
1353098 	cool2 	0.1 % 	/usr/bin/node /home/cool2/.cache/uv/archive-v0/Slkn8Fwi9cubx1GKkpviz/lib/python3 ...
1783377 	cool2 	0.1 % 	node /home/cool2/.npm/_npx/9833c18b2d85bc59/node_modules/.bin/mcp-server-playwri ...
1789073 	netdata 	0.1 % 	bash /opt/netdata/usr/libexec/netdata/plugins.d/tc-qos-helper.sh 1
1 	root 	0.0 % 	/sbin/init
2 	root 	0.0 % 	[kthreadd]
3 	root 	0.0 % 	[pool_workqueue_release]`

Activity

  1. sirmalloc commented on Aug 18, 2025

    @sirmalloc
    Owner

    Interesting. I've not seen this in my testing, but I'd love to figure out what's going on. Would you be comfortable providing your ~/.config/ccstatusline/settings.json file, as well as letting me know the node/npm version you are running?

  2. self-assigned this
    on Aug 18, 2025
  3. FarVision2 commented on Aug 18, 2025

    @FarVision2
    Author

    settings json was the defailt, no changes.

    • Node.js: v18.19.1
    • npm: 9.2.0
    `{
      "version": 2,
      "lines": [
        [
          {
            "id": "1",
            "type": "model",
            "color": "cyan"
          },
          {
            "id": "2",
            "type": "separator"
          },
          {
            "id": "3",
            "type": "context-length",
            "color": "brightBlack"
          },
          {
            "id": "4",
            "type": "separator"
          },
          {
            "id": "5",
            "type": "git-branch",
            "color": "magenta"
          },
          {
            "id": "6",
            "type": "separator"
          },
          {
            "id": "7",
            "type": "git-changes",
            "color": "yellow"
          }
        ]
      ],
      "flexMode": "full-minus-40",
      "compactThreshold": 60,
      "colorLevel": 2,
      "inheritSeparatorColors": false,
      "globalBold": false,
      "powerline": {
        "enabled": false,
        "separators": [
          ""
        ],
        "separatorInvertBackground": [
          false
        ],
        "startCaps": [],
        "endCaps": []
      }
    }`
    
  4. FarVision2 commented on Aug 18, 2025

    @FarVision2
    Author

    The issue as I see it was that each Node spawn kicked off /.claude/settings.json which kicked off npx -y
    ccstatusline@latest.

    I use two or three copies of VSCode with one or two terminals each. With YOLO mode on our Ubuntu server due to containment. On an NVME with 32gb RAM.
    It's blazing. Works great.

    When you run subagents with 3 and 4 tasks per terminal running at the same time - in Ubuntu Native - it's perfect. CPU barely breaks a sweat.

    When you run linting and security reviews, it's still a Node process per agent. This creates a cascade effect.

    1901326 	cool2 	23.6 % 	next-server (v15.4.5)
    1902224 	cool2 	20.5 % 	npm exec ccstatusline@latest
    1902076 	cool2 	17.8 % 	npm exec ccstatusline@latest
    1902163 	cool2 	17.8 % 	npm exec ccstatusline@latest
    1901992 	cool2 	17.7 % 	npm exec ccstatusline@latest
    1901938 	cool2 	17.4 % 	npm exec ccstatusline@latest
    1898182 	cool2 	17.3 % 	next-server (v14.2.30)
    1902663 	cool2 	17.3 % 	npm exec ccstatusline@latest
    1901906 	cool2 	16.8 % 	npm exec ccstatusline@latest
    1902110 	cool2 	16.7 % 	npm exec ccstatusline@latest
    1902364 	cool2 	16.7 % 	npm exec ccstatusline@latest
    1902807 	cool2 	16.1 % 	npm exec ccstatusline@latest
    1902505 	cool2 	15.9 % 	npm exec ccstatusline@latest
    1902304 	cool2 	15.8 % 	npm exec ccstatusline@latest
    1892953 	cool2 	15.5 % 	next-server (v14.2.30)
    1902553 	cool2 	15.4 % 	npm exec ccstatusline@latest
    1902731 	cool2 	15.1 % 	npm exec ccstatusline@latest
    1902931 	cool2 	14.9 % 	npm
    1901746 	cool2 	14.8 % 	npm exec ccstatusline@latest
    1902756 	cool2 	13.4 % 	npm exec ccstatusline@latest
    1902893 	cool2 	12.2 % 	npm
    1902852 	cool2 	12.0 % 	npm
    
  5. sirmalloc commented on Aug 18, 2025

    @sirmalloc
    Owner

    A couple things you could try if you don't mind since I'm not able to recreate this yet:

    • Try removing every widget except the model, and see if it still happens. If it's not happening then, add back any token widget, see if it still happens. If it's still not happening, add back the git widget and see if it still happens.
    • Try running Node 20+
    • Alternatively, install Bun (https://bun.sh/) and inside the ccstatusline TUI, use the install option to have it install using bunx

    Hopefully one of these steps will yield some info I can use to narrow down the culprit.

  6. FarVision2 commented on Aug 18, 2025

    @FarVision2
    Author

    I'm not going to be able to do that, but I will provide the environment details for scaleout to see if it appears elsewhere.

    Ubuntu Native is a must. Either SSH>VSCode or full monitor attached. I think the speed without WSL2 or PWSH latency may exacerbate the problem, since there is no translation delay and things just keep stacking up.

    I also installed these two items, and only these two items:
    https://github.com/wshobson/commands
    https://github.com/wshobson/agents

    I have Claude Code install them into every new env I log into. They work great.
    Either three or four subagents will start the cascade issue. Two does not do it.

    There is only one line - in the TUI - that would need the statusline display. The non displays would not. And I'm sorry to say I can't jump in for direct PRs any longer :(

    The workflow MultiAgentReview should kick off the issue in TOP or HTOP for any semi-complex codebase. But if no one else mentions it then I guess don't worry about it :)

  7. sirmalloc commented on Aug 18, 2025

    @sirmalloc
    Owner

    No problem. What version of Ubuntu Native do you have installed? I have a proxmox box I can spin a Ubuntu VM up on and try to replicate this. Maybe it's something to do with the tty width detection hack that runs on posix systems. Either way, thanks for the details so far and I'll see what I can figure out.

  8. FarVision2 commented on Aug 18, 2025

    @FarVision2
    Author

    Current gen - ubuntu-24.04.3-live-server-amd64.iso
    Good luck!

  9. cexll commented on Aug 24, 2025

    @cexll

    it this ?

    Image
  10. sirmalloc commented on Aug 24, 2025

    @sirmalloc
    Owner

    it this ?

    Image

    @cexll can you provide a few details?

    1. What OS are you running? If Windows, are you running in WSL or native mode?
    2. What version of node are you running?
    3. What version of claude code are you running?
    4. Can you attach a copy of your ~/.config/ccstatusline/settings.json so I can see which widgets are active?
    5. How many instances of claude code are running?
    6. If you are on Linux, macOS, or Windows WSL, can you run this: cd ~/.claude/projects && du -h | tail -n 1 and tell me the size outputted? (This is necessary if something is potentially up with the jsonl parsing)

    Thanks!

  11. cexll commented on Aug 24, 2025

    @cexll

    it this ?
    Image

    @cexll can you provide a few details?

    1. What OS are you running? If Windows, are you running in WSL or native mode?
    2. What version of node are you running?
    3. What version of claude code are you running?
    4. Can you attach a copy of your ~/.config/ccstatusline/settings.json so I can see which widgets are active?
    5. How many instances of claude code are running?
    6. If you are on Linux, macOS, or Windows WSL, can you run this: cd ~/.claude/projects && du -h | tail -n 1 and tell me the size outputted? (This is necessary if something is potentially up with the jsonl parsing)

    Thanks!

    1. use macos m1 pro Sonoma14.5
    2. use npx , node version v20.9
    3. claude code version 1.0.88
    4. cat ~/.config/ccstatusline/settings.json
    {
      "version": 3,
      "lines": [
        [
          {
            "id": "1",
            "type": "model",
            "color": "cyan"
          },
          {
            "id": "2",
            "type": "separator"
          },
          {
            "id": "3",
            "type": "tokens-input",
            "color": "brightBlack"
          },
          {
            "id": "a4ee8b10-5080-4c69-aff8-12f872d79463",
            "type": "separator"
          },
          {
            "id": "f1d98628-25ff-4a63-a90f-48a4bc8a302f",
            "type": "tokens-output"
          },
          {
            "id": "9e75b4f4-29ee-414a-bde0-41e0462c2271",
            "type": "separator"
          },
          {
            "id": "d1479e78-00f8-43d7-ac73-5522713b0834",
            "type": "tokens-total"
          }
        ],
        [
          {
            "id": "b3085fcb-9625-4c1c-89e8-49d44ea04312",
            "type": "context-percentage"
          },
          {
            "id": "79509f17-390f-4e02-9bee-8f1181d1d489",
            "type": "separator"
          },
          {
            "id": "c35641ce-7d80-4dee-a114-2e159cfc7675",
            "type": "session-cost"
          },
          {
            "id": "a39faef6-1e0d-4530-859f-36be146939b9",
            "type": "separator"
          },
          {
            "id": "4dc4b303-d470-4858-ad15-d170318bf339",
            "type": "session-clock"
          }
        ],
        [
          {
            "id": "8388b5d5-0631-411c-b6fc-2292db8f51d7",
            "type": "current-working-dir"
          },
          {
            "id": "a98e3a51-4349-41e8-b050-c96ffed1f0d0",
            "type": "separator"
          },
          {
            "id": "f81a6bf2-ffd8-49e7-a59f-b5720d08dc4c",
            "type": "git-branch"
          },
          {
            "id": "10f8ef66-d597-4985-bb33-372fedcecde8",
            "type": "separator"
          },
          {
            "id": "4ccaeae1-18ac-48dc-acc7-9d8633d22af7",
            "type": "git-changes"
          }
        ]
      ],
      "flexMode": "full-minus-40",
      "compactThreshold": 60,
      "colorLevel": 2,
      "inheritSeparatorColors": false,
      "globalBold": false,
      "powerline": {
        "enabled": false,
        "separators": [
          ""
        ],
        "separatorInvertBackground": [
          false
        ],
        "startCaps": [],
        "endCaps": []
      }
    }
    1. maybe 4-5
    2. cd ~/.claude/projects && du -h | tail -n 1
      16M .
  12. sirmalloc commented on Aug 24, 2025

    @sirmalloc
    Owner
    1. claude code version 1.0.88

    @cexll this might be your issue. v1.0.88 constantly runs the statusline. they patched it in v1.0.89. Just run claude update and see if the issue keeps happening after. Might want to reboot just to make sure no stuck processes are running in the background.

  13. cexll commented on Aug 24, 2025

    @cexll
    1. claude code version 1.0.88

    @cexll this might be your issue. v1.0.88 constantly runs the statusline. they patched it in v1.0.89. Just run claude update and see if the issue keeps happening after. Might want to reboot just to make sure no stuck processes are running in the background.

    ok let me try , thanks

  14. sirmalloc commented on Mar 7, 2026

    @sirmalloc
    Owner

    I believe this has been fixed with newer versions of claude in how they invoke the statsuline, and helped by some recent performance enhancement's i've landed within ccstatusline. I'm going to close this for now, but if anyone is still experiencing this CPU runaway please open a new issue with the details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions