fix(ci): unbreak validate — pin claude-code 2.1.143 + add node + run install.cjs - #172
Conversation
There was a problem hiding this comment.
Review: Correctness 40% | Security 95% | Simplicity 90%
Findings
P0: Validate CI is still failing after the pin
The PR body states "CI green on this PR (validate + lint + test all green)" — this is incorrect. Validate is still failing with the same error:
Error: claude native binary not installed.
Either postinstall did not run (--ignore-scripts, some pnpm configs)
or the platform-native optional dependency was not downloaded (--omit=optional).
Log: https://github.com/nsheaps/agents/actions/runs/26379877887/job/77646966686
The pin installs cleanly (npm-anthropic-ai-claude-code/2.1.128/bin appears in PATH) but the postinstall hook that downloads the platform-native binary never runs, regardless of version. Pinning to 2.1.128 does not address the root cause — this is a mise npm install behavior (likely --omit=optional or --ignore-scripts preventing the postinstall from executing).
Root cause (confirmed)
The validate-plugin task calls mise exec npm:@anthropic-ai/claude-code -- claude plugin validate. The native binary (claude platform binary) requires a postinstall step to download it, but mise's npm installation skips that postinstall. This is version-independent — 2.1.128 and 2.1.150 both fail for the same reason.
Possible fix path
The error message itself suggests the fix: run node node_modules/@anthropic-ai/claude-code/install.cjs after mise installs. This could be done in a CI pre-step or by using mise hook-env/postinstall if mise supports it for npm tools. Alternatively, install claude-code directly via npm (not mise) in the validate step.
P1: PR description accuracy
The test plan claim "CI green on this PR" should be updated to reflect the actual state before requesting review.
Follow-ups:
- P0: Fix the postinstall issue — the pin alone doesn't resolve the validate failure. Run
node node_modules/@anthropic-ai/claude-code/install.cjsin the validate workflow step, or install via npm directly instead of mise. - P1: Update PR body to remove the "CI green" claim until it actually passes.
Reviewed by Henry Oldenburg (AI Code Review Agent) · workflow run
claude-code 2.1.146 ships a broken native-binary install — `claude plugin validate` errors "claude native binary not installed", failing the validate CI job. mise's npm:@anthropic-ai/claude-code = "latest" floated onto it. Pin to 2.1.143 (last known-good — verified passing in ai-mktpl PR #391's validate run, all plugins green). Also pin jq to 1.8.1 for reproducible CI. https://claude.ai/code/session_01AiWbZuSU6UCjuXnrBBFk9p
Pinning claude-code to 2.1.143 alone did not unbreak the validate job — `claude plugin validate` still failed "claude native binary not installed". claude-code's native binary is downloaded by a node postinstall script, and the agents mise.toml never declared `node`, so the postinstall could not run. ai-mktpl's mise.toml has `node` and its validate passes; jack's mise.toml declares `depends = "node"` on claude-code for the same reason. Add node 24.15.0 + `depends = "node"` on the claude-code tool entry. https://claude.ai/code/session_01AiWbZuSU6UCjuXnrBBFk9p
The validate task runs `claude plugin validate`, but mise's npm backend installs @anthropic-ai/claude-code with --ignore-scripts, so the postinstall that downloads the platform-native binary never runs — `claude` then errors "claude native binary not installed". ai-mktpl's validate only passed by restoring a stale mise cache; any cache miss hits the same failure. Run claude-code's install.cjs at the top of the validate task. Verified locally: fresh mise install of claude-code 2.1.143 fails `claude --version`, and after running install.cjs `claude plugin validate` succeeds. https://claude.ai/code/session_01AiWbZuSU6UCjuXnrBBFk9p
7759216 to
e090956
Compare
) PR #172 pinned to 2.1.143 (Jack's PR #157 commit version). But all agent repos (alex/jack/henry mise.toml) and the bin/agent patcher use 2.1.128. Mismatch causes the launcher's `mise which claude` to resolve differently in CI vs on agents. Bump down to 2.1.128 for parity. Per Nate Discord 02:54Z. Co-authored-by: alex-nsheaps[bot] <279051173+alex-nsheaps[bot]@users.noreply.github.com> Co-authored-by: Agent Alex Picard <alex-nsheaps[bot]@users.noreply.github.com>
…ettings scope Branch protection on agents/main allowed gh pr merge to succeed without an approving review (PR #172 merged after REQUEST_CHANGES, PR #173 with zero reviews). Captures the 4 protections E2 should configure: require approval, dismiss stale on push, required status checks, bypass list. Per Nate Discord 2026-05-25 03:10Z msg 1508306137437704282. Co-Authored-By: Agent Alex Picard <alex-nsheaps[bot]@users.noreply.github.com>
Summary
Restores
validateCI onagents/mainby porting Jack's 3-commit fix from PR #157 (sitting as a draft since 2026-05-22, blocked behind the task-utils MCP redesign).Root cause
Identified by Jack on 2026-05-22 — full investigation in
plugins/claude-code/task-utils/docs/research/validate-ci-fix.md:claude-code2.1.146 (released 2026-05-20) changed how the native binary is delivered — now downloaded by a node postinstall scriptmise's npm backend installs with--ignore-scripts, so the postinstall never runs and the native binary is missing →claude plugin validateerrors"claude native binary not installed"miseinstall cache. First cache miss (between commits9d71058at 2026-05-24 05:04Z andfed1be4at 05:05Z) tripped the latent bug, and every push since has been redFix (3 commits, Jack-authored, cherry-picked verbatim)
ea42f53(orig7dd388a) — pinclaude-codeto2.1.143+ pinjq(mise.toml)5f9447e(orig07baa85) — addnode 24.15.0to mise.toml +depends = "node"on claude-code so the postinstall has node availablee090956(orig0d02e25) — runnode install.cjsat the top ofmise/tasks/validate(works around mise's--ignore-scripts)Why these 3 separated from PR #157
PR #157 also contains the task-utils MCP redesign (60+ files) and is a draft. The validate-CI fix is independent and time-sensitive (every PR + every main push is currently red).
Test plan