stablyai/orca · error

node-pty ConPTY console-list fallback is not installed

Error message

node-pty ConPTY console-list fallback is not installed

What it means

Thrown by assertPatchedNodePtyConsoleListAgent when the SHA256 of lib/conpty_console_list_agent.js does not equal PATCHED_SOURCE_SHA256. The assertion is the verification step at the end of patchNodePtyConsoleListAgent and is also called standalone during relay startup to confirm the ConPTY console-list fallback (the try/catch around getConsoleProcessList) is actually installed.

Source

Thrown at config/relay-assets/node-pty-1.1.0-console-list-agent-patch.cjs:35

function inspectNodePtyConsoleListAgent(relayDir = process.cwd()) {
  const nodePtyDir = resolve(relayDir, 'node_modules', 'node-pty')
  const packageJsonPath = join(nodePtyDir, 'package.json')
  const agentPath = join(nodePtyDir, 'lib', 'conpty_console_list_agent.js')
  const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8'))
  if (packageJson.version !== EXPECTED_NODE_PTY_VERSION) {
    throw new Error(
      `Refusing to patch node-pty ${packageJson.version}; expected ${EXPECTED_NODE_PTY_VERSION}`
    )
  }
  const source = readFileSync(agentPath, 'utf8')
  return { agentPath, source }
}

function assertPatchedNodePtyConsoleListAgent(relayDir = process.cwd()) {
  const inspected = inspectNodePtyConsoleListAgent(relayDir)
  if (sourceSha256(inspected.source) !== PATCHED_SOURCE_SHA256) {
    throw new Error('node-pty ConPTY console-list fallback is not installed')
  }
}

function patchNodePtyConsoleListAgent(relayDir = process.cwd()) {
  const inspected = inspectNodePtyConsoleListAgent(relayDir)
  const sourceHash = sourceSha256(inspected.source)
  if (sourceHash === PATCHED_SOURCE_SHA256) {
    return
  }
  if (sourceHash !== ORIGINAL_SOURCE_SHA256) {
    throw new Error('Refusing to patch unexpected node-pty console-list agent source')
  }
  const patchedSource = inspected.source.replace(ORIGINAL_BODY, PATCHED_BODY)
  const temporaryPath = `${inspected.agentPath}.orca-patch-${process.pid}`
  // Why: a terminated remote install must leave either known source version recoverable on reconnect.
  try {
    writeFileSync(temporaryPath, patchedSource)
    renameSync(temporaryPath, inspected.agentPath)

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Run node config/relay-assets/node-pty-1.1.0-console-list-agent-patch.cjs from the relay directory to apply the patch.
  2. Ensure the relay's postinstall hook invokes patchNodePtyConsoleListAgent and that it is not skipped under --ignore-scripts.
  3. Confirm node-pty is still 1.1.0 (otherwise you will hit error 23 first).
  4. If the patch step reports success but this still fires, re-derive PATCHED_SOURCE_SHA256 against the patched file and update the constant.

Example fix

// before — relay started without the patch
// node dist/relay.js   // -> 'node-pty ConPTY console-list fallback is not installed'

// after — apply the patch then start
// node config/relay-assets/node-pty-1.1.0-console-list-agent-patch.cjs
// node dist/relay.js
Defensive patterns

Strategy: try-catch

Try / catch

try {
  assertPatchedNodePtyConsoleListAgent(relayDir)
} catch (error) {
  if (/console-list fallback is not installed/.test(error.message)) {
    // Apply the patch rather than starting the relay unpatched.
    patchNodePtyConsoleListAgent(relayDir)
    assertPatchedNodePtyConsoleListAgent(relayDir)
    return
  }
  throw error
}

Prevention

When it happens

Trigger: Relay startup on Windows where node-pty's install ran but the postinstall patch step never executed; the file was restored to its original form by a reinstall but the patch step was skipped; a different patch or upstream change produced a third hash.

Common situations: Relay postinstall hook disabled or skipped in CI; node_modules restored from a cache that predates the patch; running the relay binary on a host where the patch had not been baked in at build time.

Related errors


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