Skip to content

perf(starship): pin explicit command_timeout so wedged git modules get reaped#126

Merged
Gerrrt merged 1 commit into
mainfrom
claude/dotfiles-windows-git-processes-qjqcpz
Jul 1, 2026
Merged

perf(starship): pin explicit command_timeout so wedged git modules get reaped#126
Gerrrt merged 1 commit into
mainfrom
claude/dotfiles-windows-git-processes-qjqcpz

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

What

Pin an explicit command_timeout = 1300 in starship/starship.toml (previously the implicit 500ms default), and record it under [Unreleased] in CHANGELOG.md.

Why

command_timeout is the ceiling starship waits for any external command it runs to render a segment — the git_* modules (git_status/branch/commit/state) and any [custom] command — before it abandons the call and kills the child. Two reasons to pin it:

  • Correctness. A git status on a large or cold repo can legitimately take >500ms, and the default blanks the git segment mid-render. 1300ms clears that on real repos without feeling laggy.
  • Reaping (the real motivation). The timeout is also the safety valve. When a git call wedges — a stale .git/index.lock, a repo on a slow \\wsl$/network path, a hung credential probe — starship stops waiting and terminates the child at this bound instead of leaving it running. On Windows especially, an un-reaped git child orphans, and one per prompt render piles up into hundreds of stuck git.exe — enough that scoop/winget then can't replace the in-use git binary to update it.

Related

Pairs with a Windows-side pwsh change (dotfiles-Windows, same branch) that makes shell-spawned git fail fast rather than block on an auth prompt, and mirrors this command_timeout into the vendored starship.toml there.

Testing

make audit-changed — pass 229 / fail 0 (luacheck + markdownlint skipped: not installed in this environment).

🤖 Generated with Claude Code


Generated by Claude Code

…t reaped

Pin command_timeout = 1300 (was the implicit 500ms default). It is both a
correctness knob (a git status on a large/cold repo can exceed 500ms and blank
the git segment) and, more importantly, the safety valve: command_timeout is the
bound at which starship abandons AND kills the external command backing a segment
(git_* modules, [custom] commands). When a git call wedges — stale index.lock,
a repo on a slow \\wsl$/network path, a hung credential probe — the child is now
reaped at this bound instead of left running. On Windows an un-reaped git child
orphans, and one-per-prompt-render piles up into hundreds of stuck git.exe
(enough that scoop/winget can't replace the in-use git binary to update it).

Pairs with a Windows-side pwsh change that makes shell-spawned git fail fast
rather than block on an auth prompt.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xz3QgaavdDKmbtLcQStnDE
Copilot AI review requested due to automatic review settings July 1, 2026 02:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR pins an explicit command_timeout = 1300 (ms) in the vendored starship/starship.toml, replacing reliance on starship's implicit 500ms default. The value serves two purposes: allowing git status on large/cold repos to finish rendering (correctness), and acting as a bound at which starship abandons and kills a wedged external git child (reaping), which is especially important on Windows where un-reaped git.exe children can accumulate. The change is recorded under [Unreleased] in CHANGELOG.md and pairs with a companion Windows-side pwsh change in the dotfiles-Windows repo.

Changes:

  • Set command_timeout = 1300 at the top of starship/starship.toml, with a detailed rationale comment.
  • Add a ### Changed entry documenting the timeout pin under [Unreleased] in CHANGELOG.md.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
starship/starship.toml Adds explicit command_timeout = 1300 top-level key with an explanatory comment covering correctness and child-reaping rationale.
CHANGELOG.md Records the timeout pin as a ### Changed bullet under [Unreleased].

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Gerrrt Gerrrt merged commit 43bc9f4 into main Jul 1, 2026
17 checks passed
@Gerrrt Gerrrt deleted the claude/dotfiles-windows-git-processes-qjqcpz branch July 1, 2026 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants