fix: increase Claude auth probe timeout to 10s#2272
Conversation
`claude auth status` can exceed the 4s DEFAULT_TIMEOUT_MS on Windows due to Node.js cold-start overhead, causing a spurious "Could not verify Claude authentication status. Timed out while running command." warning even when the CLI is correctly installed and authenticated. A separate AUTH_PROBE_TIMEOUT_MS (10s) is introduced for the auth check specifically, leaving the faster --version probe unchanged.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Approved This is a simple timeout increase for auth status checks from 4s to 10s to handle slow disk/network operations on first run. No authentication logic is changed, only the allowed duration for the operation to complete. Low-risk configuration tweak. You can customize Macroscope's approvability policy. Learn more. |
Co-authored-by: Heinz Gericke <115458264+heinzgericke@users.noreply.github.com> (cherry picked from commit b8305af)
|
Not sure if this is fixed i think i have similar issue to this PR fix:
|
Co-authored-by: Heinz Gericke <115458264+heinzgericke@users.noreply.github.com>
Summary
AUTH_PROBE_TIMEOUT_MS = 10_000toproviderSnapshot.tsclaude auth statusprobe inClaudeProvider.tsinstead ofDEFAULT_TIMEOUT_MS(4s)Why
claude auth statusinvolves disk/account lookups and can exceed 4s on Windows due to Node.js cold-start overhead. This causes a spurious "Could not verify Claude authentication status. Timed out while running command." warning in the provider panel — even when the CLI is correctly installed and authenticated.The
--versionprobe is fast and keeps its 4s timeout unchanged. Only the auth check gets the higher limit.Before / After
Before: Provider shows yellow "Needs attention – Could not verify Claude authentication status. Timed out while running command." on Windows on first load.
After: Auth check has 10s to complete, resolving the false positive on Windows.
Test plan
claudeon PATH and authenticated--versionprobe speed is unaffected (still uses 4s timeout)🤖 Generated with Claude Code
Note
Low Risk
Low risk: only adjusts the timeout used for the
claude auth statusprobe to reduce false timeout warnings, without changing auth parsing or other probes.Overview
Increases the timeout for the Claude provider’s
claude auth statuscheck by introducingAUTH_PROBE_TIMEOUT_MS(10s) and using it instead ofDEFAULT_TIMEOUT_MS.This makes the auth probe more tolerant of slow first-run startup (notably on Windows) while leaving other CLI probes (e.g.
--version) on the existing 4s timeout.Reviewed by Cursor Bugbot for commit 8179582. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Increase Claude auth probe timeout to 10s
Auth checks against Claude can be slow, causing false failures with the previous 4s timeout. Introduces a new
AUTH_PROBE_TIMEOUT_MSconstant (10,000ms) inproviderSnapshot.tsand applies it inClaudeProvider.tsinstead of the generalDEFAULT_TIMEOUT_MS.Macroscope summarized 8179582.