Skip to content

statusline command causes high CPU usage (300%+) on startup #804

@Chachamaru127

Description

@Chachamaru127

Environment

  • ccusage version: 17.2.1 and 18.0.5
  • OS: macOS Darwin 25.0.0 (Apple Silicon)
  • Node: via bun x ccusage
  • Claude Code: Multiple sessions

Problem

The ccusage statusline command causes extremely high CPU usage (300%+) when starting up, especially when multiple Claude Code sessions are open.

Steps to Reproduce

  1. Configure statusline in ~/.claude/settings.json:
{
  "statusLine": {
    "type": "command",
    "command": "bun x ccusage statusline --visual-burn-rate emoji-text",
    "padding": 0
  }
}
  1. Open multiple Claude Code sessions (e.g., 2-3 terminal tabs)
  2. Each session spawns its own ccusage statusline process

Observed Behavior

  • Each ccusage process consumes 100-400% CPU on startup
  • Memory usage spikes to 1.5-2.4GB per process
  • With 2 sessions: combined CPU usage reaches 600%+
  • v17.2.1 eventually stabilizes (after ~30 seconds) to ~70% CPU
  • v18.0.5 never stabilizes, stays at 300%+ indefinitely

Expected Behavior

  • statusline should be lightweight and not cause noticeable CPU impact
  • Multiple instances should coexist without resource contention

Workaround

Currently disabled statusline with "command": "echo ''" to avoid system slowdown.

Additional Context

  • Running on Mac with 24GB RAM
  • System Load Average jumped from 6.96 to 15.59 when ccusage was active
  • No similar issues found in existing GitHub issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions