Skip to content

Executing via bunx/npx leads to higher resource consumption #103

Closed

Description

@meeghele

I did notice that the installer configures Claude CLI to execute npx/bunx ccstatusline as the Claude Code CLI statusline, i.e.:

{
 "statusLine": {
 "type": "command",
 "command": "npx/bunx ccstatusline"
 }
}

From the official Claude CLI documentation, this command can be executed at most every 300ms. Apart from the fact that would be better to use a persistent statusline process, running npx/bunx ccstatusline is more resource intensive than simply running ccstatusline directly due to the way npx/bunx work.

So heads up, running the statusline without npx/bunx would save some resources, i.e.:

{
 "statusLine": {
 "type": "command",
 "command": "ccusage statusline"
 }
}

I did run benchmarks calling ccstatusline directly or via npx/bunx and the difference is somewhat significant, see here.

Please note that benchmarking ccstatusline is not my main focus; I plugged ccstatusline in the benchmarks once I noticed a large amount of node processes being spawned on a colleague's laptop using multiple Claude CLI instances with ccusage, issue here.

Being ccstatusline a very popular project, I decided to give you guys the heads up by opening an issue.

Activity

  1. Astro-Han commented on Mar 28, 2026

    @Astro-Han

    For what it's worth, a pure Bash + jq approach avoids the process spawning issue entirely. I maintain claude-lens which runs at ~10ms per render with ~2MB RSS, since there's no runtime to start up. The tradeoff is fewer features (no TUI config, no themes), but for a 300ms polling loop the execution overhead stays negligible.

  2. sirmalloc commented on May 12, 2026

    @sirmalloc
    Owner

    There is now an option to pin the install in the TUI as part of ed3ce5b

  3. added a commit that references this issue on May 12, 2026
    ed3ce5b
  4. added a commit that references this issue on Oct 20, 2026
    346186f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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