[BUG] statusline triggers sysctl command on every run

Open 💬 0 comments Opened Jul 13, 2026 by TrevorBurnham

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Every time my statusline executes, it spawns a shell call to sysctl -n hw.physicalcpu_max. This shell call triggers logging by my company's security software, creating unnecessary overhead.

What Should Happen?

I'm not sure why the statusline cares about how many CPU cores I have. But if it does, I'd suggest making the sysctl call once and caching the result. The number of CPU cores isn't going to change.

Error Messages/Logs

Steps to Reproduce

  1. Set up monitoring for shell calls
  2. Run a status line script

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

claude 2.1.207.548

Platform

AWS Bedrock

Operating System

macOS

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗