[BUG] Severe startup lag when launching from a git subdirectory (regression since v2.1.87)

Resolved 💬 3 comments Opened Apr 7, 2026 by Shirley-Ying Closed May 19, 2026

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?

Starting from v2.1.87, Claude Code exhibits significant startup lag when launched from a subdirectory within a git repository, rather than from the repository root.

  • Launching from the repository root (where .git/ resides) — works as expected, no noticeable delay.
  • Launching from any subdirectory — severe lag/stuttering during startup.

The lag is not limited to startup. During normal usage, interactive prompts that present selectable options (e.g. tool call confirmations) exhibit significant input delay — arrow key presses take several seconds to register a response, making the CLI nearly unusable at times. This issue is present only when Claude Code is launched from a subdirectory; launching from the repository root does not exhibit this behavior.

What Should Happen?

no lag, just like start from the repository root.

Error Messages/Logs

Steps to Reproduce

  1. Open a large git repository (300k+ commits).
  2. cd into a subdirectory (e.g. Content/ or Content/Script/).
  3. Launch claude.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.83

Claude Code Version

2.1.92

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

Description

Starting from v2.1.87, Claude Code exhibits significant startup lag when launched from a subdirectory within a git repository, rather than from the repository root.

Environment

  • OS: Windows 11 Pro (Build 26200)
  • Shell: bash
  • Repository size: ~310,000 commits
  • Last known working version: v2.1.83 and earlier

Affected Versions

v2.1.87 and all subsequent releases through v2.1.92 (current latest). The exact version that introduced the regression has not been pinpointed — it occurred somewhere between v2.1.83 and v2.1.87. The issue has persisted across all releases since and remains unresolved.

Reproduction

  1. Open a large git repository (300k+ commits).
  2. cd into a subdirectory (e.g. Content/ or Content/Script/).
  3. Launch claude.

Observed Behavior

  • Launching from the repository root (where .git/ resides) — works as expected, no noticeable delay.
  • Launching from any subdirectory — severe lag/stuttering during startup.

Additional Lag During Usage

The lag is not limited to startup. During normal usage, interactive prompts that present selectable options (e.g. tool call confirmations) exhibit significant input delay — arrow key presses take several seconds to register a response, making the CLI nearly unusable at times. This issue is present only when Claude Code is launched from a subdirectory; launching from the repository root does not exhibit this behavior.

Suspected Cause

A change introduced between v2.1.83 and v2.1.87 may have altered how Claude Code discovers the git root or scans the working directory when started from a subdirectory, causing disproportionate overhead on large repositories.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗