Skip to content

Windows + Git Bash: idle CPU still scales with pane count (~0.11 cores/pane); PowerShell panes cost ~0.01 #2459

Description

@hernant

Is this a reproducible bug?

  • I confirm this is a reproducible bug, not a feature request, idea, question, contribution proposal, or direction check.
  • I reproduced this bug on the version and environment reported below using the exact steps provided.

Current behavior

The server sits at ~3.1 of 8 logical cores with every pane idle — no output, no input, no agent activity.

Adding six idle Git Bash panes adds ~0.7 cores; closing them returns to baseline. Changing only terminal.default_shell to PowerShell and repeating the exact same steps adds almost nothing.

Marginal cost per idle pane, same machine, same running server:

Pane shell Runs Cores per idle pane
Git Bash 3 0.093, 0.113, 0.127
PowerShell 2 ~0, 0.013

This is the signature of #1158, which was fixed in v0.7.5 and verified there at ~0.0007 cores/pane. It still reproduces on 0.8.0-preview when panes run Git Bash.

Expected behavior

Idle panes cost near zero CPU regardless of which shell they run — as they already do with PowerShell.

Reproduction

  1. Windows with terminal.default_shell set to Git Bash, server running with idle panes.
  2. Measure server CPU over 12 s:
    $p=Get-Process -Id <server-pid>; $c=$p.TotalProcessorTime.TotalSeconds; Start-Sleep 12; $p.Refresh(); ($p.TotalProcessorTime.TotalSeconds-$c)/12
  3. herdr workspace create --label t, then herdr pane split --pane <root-pane> --direction right --no-focus ×5. Wait for the prompts to settle.
  4. Re-measure: +0.6–0.8 cores.
  5. herdr workspace close <ws>; CPU returns to baseline within ~0.1 cores.
  6. Set default_shell to powershell.exe, run herdr server reload-config, repeat steps 3–5: the same six panes add ~0.08 cores total.

Baseline drifts 3.0–3.5 cores on a live session, so the A-B-A delta is the reliable figure; the before/after baselines agreed within 0.02–0.12 cores in every run.

Impact

An idle 27-pane session permanently occupies ~3 of 8 cores on this machine, around the clock, with no agent doing any work. It also scales with unrelated system load: spawning 120 idle processes with no new panes added a further ~0.2 cores.

Git Bash is the shell I need for this workflow, so the PowerShell workaround is not usable here.

Environment

  • Herdr version: 0.8.0-preview.2026-08-04-d78e3d3b5126
  • Update channel (stable or preview): preview
  • Operating system: Windows 11 Pro for Workstations, build 26200, 8 logical cores
  • Terminal: herdr TUI client (Windows)
  • Shell, if relevant: Git Bash
  • Relevant config, if any: default_shell = "C:\\Program Files\\Git\\bin\\bash.exe", shell_mode = "auto"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions