stablyai/orca · critical

[verify-skills-cli-runtime] ${args.join(' ')} exited ${Strin

Error message

[verify-skills-cli-runtime] ${args.join(' ')} exited ${String(result.status)}\n${detail}

What it means

Thrown by verify-skills-cli-runtime.cjs runCli() when a spawned CLI subprocess fails — non-zero exit, termination by signal, or a spawn-level error (e.g. executable missing, timeout). It aggregates stdout, stderr, signal, and error.message into a single diagnostic string. This is a build/CI verification script that drives the built Orca skills CLI as a black box.

Source

Thrown at config/scripts/verify-skills-cli-runtime.cjs:159

  delete env.ORCA_CLI_CWD
  const result = spawnSync(process.execPath, [entry, ...args], {
    cwd: dirname(outDir),
    encoding: 'utf8',
    env,
    killSignal: 'SIGKILL',
    maxBuffer: 16 * 1024 * 1024,
    timeout: timeoutMs
  })
  if (result.error || result.signal || result.status !== 0) {
    const detail = [
      result.error?.message,
      result.signal ? `terminated by ${result.signal}` : null,
      result.stdout,
      result.stderr
    ]
      .filter(Boolean)
      .join('\n')
    throw new Error(
      `[verify-skills-cli-runtime] ${args.join(' ')} exited ${String(result.status)}\n${detail}`
    )
  }
  return result.stdout
}

function parseJson(label, output) {
  try {
    return JSON.parse(output)
  } catch {
    throw new Error(`[verify-skills-cli-runtime] ${label} emitted invalid JSON:\n${output}`)
  }
}

function verifySkillsCliRuntime(outDir, artifactRoot = dirname(outDir), options = {}) {
  const absoluteOutDir = resolve(outDir)
  const closure = collectRuntimeClosure(absoluteOutDir, resolve(artifactRoot))
  if (options.executeCommands === false) {

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Read the embedded detail block (error.message, signal, stdout, stderr) to identify which of the 5 CLI commands failed and why.
  2. If signal is present (e.g. SIGKILL), the command timed out — profile the specific skills subcommand for hangs or infinite loops.
  3. If stdout/stderr show a module resolution error, rebuild the outDir closure or check that all runtime imports are bundled (collectRuntimeClosure verifies this beforehand).
  4. If maxBuffer was exceeded, increase maxBuffer or reduce the output volume of the offending subcommand.
  5. Reproduce locally with the same node binary and env (NODE_PATH='') to get a stack trace: node out/cli/index.js <failing-args>.

Example fix

// before: command times out silently
const result = runCli(absoluteOutDir, ['skills', 'list', '--json'])

// after: isolate which command and surface its exit detail
try {
  runCli(absoluteOutDir, ['skills', 'list', '--json'])
} catch (err) {
  console.error('skills list failed under NODE_PATH="" env:', err.message)
  throw err
}
Defensive patterns

Strategy: try-catch

Validate before calling

const entry = resolve(outDir, 'cli', 'index.js')
if (!existsSync(entry)) {
  throw new Error(`CLI entry missing: ${entry}`)
}
// Pre-flight: confirm node can load the entry without running it
const probe = spawnSync(process.execPath, ['--check', entry], { encoding: 'utf8' })
if (probe.status !== 0) {
  throw new Error(`CLI entry has a syntax/load error: ${probe.stderr}`)
}

Try / catch

try {
  const stdout = runCli(outDir, args)
} catch (err) {
  // err.message contains args, exit code, signal, stdout, stderr
  if (err.message.includes('terminated by SIGKILL')) {
    // timeout — increase timeoutMs or optimize the command
  } else if (err.message.includes('maxBuffer')) {
    // output too large — increase maxBuffer
  }
  throw err
}

Prevention

When it happens

Trigger: spawnSync(process.execPath, [outDir/cli/index.js, ...args]) returns with result.error set, result.signal set (e.g. SIGKILL from timeout), or result.status !== 0. Triggered by: skills list/get/install/update commands crashing, timing out (>30s), exceeding the 16MB stdout buffer, or the CLI entry file failing to load.

Common situations: Running the skills CLI runtime verification on a broken build where the CLI throws on startup; a skills topic that crashes when listed; NODE_PATH cleared (env sets NODE_PATH='') causing a dependency to fail to resolve at runtime; a command hanging past CLI_COMMAND_TIMEOUT_MS (30s); stdout exceeding maxBuffer on a large skills list.

Related errors


AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12). Data as JSON: /api/errors/72519f5c6b001701. Report an issue: GitHub.