fix(agents): Error handling when claude client is not available in region#148
Merged
8nevil8 merged 4 commits intocodemie-ai:mainfrom Feb 16, 2026
Merged
fix(agents): Error handling when claude client is not available in region#1488nevil8 merged 4 commits intocodemie-ai:mainfrom
8nevil8 merged 4 commits intocodemie-ai:mainfrom
Conversation
8nevil8
reviewed
Feb 16, 2026
8nevil8
reviewed
Feb 16, 2026
Problem
The codemie doctor command spawned 14-23 subprocesses sequentially. On Windows, process creation is ~10x slower than Unix, causing the command to exceed the 60s test timeout (took ~63.5s).
Changes
3 parallelization layers:
1. src/agents/registry.ts — getInstalledAgents() now checks all 5 agents' isInstalled() in parallel via Promise.all() instead of a sequential loop. This was the single biggest bottleneck (4-6 process spawns
serialized).
2. src/cli/commands/doctor/checks/AgentsCheck.ts — run() now fetches getVersion() + getInstallationMethod() for all installed agents in parallel instead of one at a time.
3. src/cli/commands/doctor/checks/FrameworksCheck.ts — run() now checks isInstalled() + getVersion() for all frameworks in parallel.
4. src/cli/commands/doctor/index.ts — Restructured the orchestrator into 3 parallel groups:
- Group 1: Tool checks (Node, npm, Python, uv, AWS CLI) — all run concurrently
- Group 2: AI Config + Provider check — sequential (provider depends on config)
- Group 3: Discovery checks (Agents, Workflows, Frameworks) — all run concurrently
Results are collected first, then displayed sequentially to preserve output ordering.
Before: ~23 subprocess spawns executed one after another
After: Same subprocess spawns but organized into parallel batches, reducing wall-clock time from O(n) to roughly O(max-per-group)
067924d to
d4b844b
Compare
8nevil8
approved these changes
Feb 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix error handling when claude client is not available in region
Changes
Impact
When user will try to install claude code from Belarus, previously we have seen message like:
Now user will see correct error during update like:
or during install like:
Checklist