Skip to content

fix(desktop/windows): check-agent-deps also verifies the Claude Code … - #10399

Merged
undivisible merged 1 commit into
BasedHardware:mainfrom
karthikyeluripati:fix/win-claude-binary-install-guard
Jul 24, 2026
Merged

undivisible merged 1 commit into
BasedHardware:mainfrom
karthikyeluripati:fix/win-claude-binary-install-guard

Conversation

@karthikyeluripati

@karthikyeluripati karthikyeluripati commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #9304 / #9302, closing the one gap from that review cycle still open on main.

scripts/check-agent-deps.mjs verifies the coding-agent JS packages resolve, but the
Claude Code executable (claude.exe, ~235 MB — spawned by the Claude Agent SDK for
every agent turn; SDK 0.3.205 ships no JS fallback) lives in the binary-only
optionalDependency @anthropic-ai/claude-agent-sdk-win32-x64: a failed download leaves
pnpm install exiting 0, and import.meta.resolve() can't see a package with no JS
entry. Result: an app where the ACP initialize handshake succeeds and every real agent
task fails to spawn. This exact failure shape occurred live during the #9304 review
(flaky network → error 23 → empty residual .pnpm directory → exit 0), and the reviewer
validated this check's logic against that broken tree at the time.

  • scripts/claude-binary-check.mjs (pure, unit-tested): locates claude.exe in the
    flattened or pnpm virtual-store layout — requiring the binary itself, so an empty
    residual store directory doesn't pass — and rejects truncated (<50 MB) downloads.
  • check-agent-deps.mjs reports it through its existing missing-deps path (so it runs
    at postinstall and standalone, same as today). Non-Windows installs skip.

Test plan

  • node scripts/check-agent-deps.mjs on a clean pnpm@10 hoisted install — OK,
    finds the real 236 MB binary
  • vitest run scripts/claude-binary-check.test.mjs — 6 passed (absent package,
    empty residual virtual-store dir, truncated download, both layouts, non-Windows skip)
  • Full postinstall chain (incl. verify-pimono-unpack) green with the check wired in
  • eslint clean

Failure-Class: none

Review in cubic

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Windows check-agent-deps fix — approved; held from merge on red Hygiene check

@karthikyeluripati
karthikyeluripati force-pushed the fix/win-claude-binary-install-guard branch from 2ba6ff5 to 98adb79 Compare July 23, 2026 15:01
…executable

check-agent-deps verifies the coding-agent JS packages resolve, but the
Claude Code EXECUTABLE (claude.exe, ~235 MB, spawned by the Claude
Agent SDK for every agent turn — SDK 0.3.205 ships no JS fallback)
lives in the binary-only optionalDependency
@anthropic-ai/claude-agent-sdk-win32-x64: a failed download leaves
`pnpm install` exiting 0 and import.meta.resolve() can't see a package
with no JS entry. The result is an app where the ACP initialize
handshake succeeds and every real task fails to spawn. This failure
shape was hit live during the PR BasedHardware#9304 review (flaky network, empty
residual .pnpm directory, exit 0), and the reviewer validated this
exact check logic against that broken tree on the routing branch.

scripts/claude-binary-check.mjs (pure, unit-tested) locates claude.exe
in the flattened or pnpm virtual-store layout — requiring the binary
itself, so an empty residual store directory doesn't pass — and rejects
truncated (<50 MB) downloads; check-agent-deps.mjs reports it through
its existing missing-deps path. Non-Windows installs skip.

Verification: node scripts/check-agent-deps.mjs on a clean pnpm@10
hoisted install — OK (finds the real 236 MB binary); vitest
scripts/claude-binary-check.test.mjs — 6 passed (absent package, empty
residual virtual-store dir, truncated download, flattened + store
layouts, non-Windows skip); eslint clean; full postinstall chain (incl.
verify-pimono-unpack) green with the check wired in.

Failure-Class: none

Co-Authored-By: Claude Fable 5 <[email protected]>
@karthikyeluripati
karthikyeluripati force-pushed the fix/win-claude-binary-install-guard branch from 98adb79 to c6d7048 Compare July 23, 2026 15:02
@Git-on-my-level Git-on-my-level added positive-signal Automation verified a genuine fix/quality contribution workflow-review Needs maintainer review for workflow, automation, hooks, or CI behavior needs-maintainer-review Needs a human maintainer to sign off before merge labels Jul 23, 2026
@Git-on-my-level

Copy link
Copy Markdown
Member

Thanks for tightening this Windows agent install guard. The implementation looks well-scoped: the binary check is side-effect-free/testable, covers both flattened and pnpm virtual-store layouts, catches empty residual store dirs and truncated downloads, and skips non-Windows installs. I also ran the targeted Vitest suite locally against this head and it passed (6/6).

I’m not formally approving because this touches the Windows postinstall/agent dependency path and the current Hygiene check is red. The failing guard is failure-class-protocol: the fix(...) commit needs a Failure-Class: FC-<slug> | new | none declaration where the workflow validator reads it (the PR body has Failure-Class: none, but CI reports declaration: null). Once that metadata/CI issue is fixed, this looks like a good candidate for maintainer sign-off.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@undivisible
undivisible merged commit 8158d80 into BasedHardware:main Jul 24, 2026
39 of 41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-maintainer-review Needs a human maintainer to sign off before merge positive-signal Automation verified a genuine fix/quality contribution workflow-review Needs maintainer review for workflow, automation, hooks, or CI behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants