fix(runtime): surface catalog spawn failures and stop misreporting resolved executables - #215
Merged
eddiearc merged 3 commits intoSep 13, 2026
Conversation
…solved executables The claude/codex model-catalog probes replaced the underlying spawn error with a fixed "command failed" message, so ENOENT and friends never reached the readiness classifier. And classifyRuntimePrerequisite's ENOENT branch claimed "<runtime> is not installed" even when the caller had already resolved an existing absolute executable — a launch environment failure (working directory, interpreter, permissions) then read as a missing install. Carry the underlying error message through the probes and keep the raw spawn reason when the resolved executable still exists on disk. Co-Authored-By: Claude Code <noreply@anthropic.com>
itswl
force-pushed
the
fix/runtime-catalog-spawn-diagnostics
branch
from
September 12, 2026 09:17
55a6134 to
ef21516
Compare
This was referenced Sep 13, 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.
What
The runtime model-catalog probes (claude / codex) discard the underlying spawn error (
child.on("error", () => finish(new Error("... model catalog command failed")))), so the real cause is lost. AndclassifyRuntimePrerequisite's ENOENT branch reportsnot installedeven when the caller already resolved an absolute, existing executable — a launch-environment failure (bad working directory, interpreter, permissions) then reads as "reinstall the runtime". The pi runtime already surfaces the spawn errno throughPiRpcClient(Pi RPC process failed: ... ENOENT), but its resolved-executable case was misclassified the same way.Change
src/runtime/claude-model-catalog.ts/src/runtime/codex-model-catalog.ts: include the underlyingerror.message(carries the errno, e.g.spawn <path> ENOENT) in the wrapped failure.src/runtime/runtime-readiness.ts(classifyRuntimePrerequisite): keep thenot installeddiagnosis only when no executable was resolved or the resolved file no longer exists; a still-existing resolved executable preserves the raw spawn reason and gets a nextAction pointing at the launch environment (working directory, interpreter, permissions).test/unit/runtime/{claude,codex}-model-catalog.test.mjsand classification coverage for all three runtimes — including pi'sPi RPC process failed: ... ENOENTshape — intest/unit/runtime/runtime-readiness.test.mjs.Validation
bun run build✅bun run typecheck✅bun test test/unit/runtime/claude-model-catalog.test.mjs test/unit/runtime/codex-model-catalog.test.mjs test/unit/runtime/runtime-readiness.test.mjs→ 28 pass / 0 failbun run test:unit→ 882 pass / 16 skip / 2 fail. Both failures (shared tmux session lists windows by recorded owner,three-Agent live acceptance is opt-in, hermetic by default, and fixture-verifiable) reproduce identically on unmodifiedmainin this environment (tmuxis not installed here) and are unrelated to this change.Fixes #213
🤖 Generated with Claude Code