{"record":{"id":"b22445dca6d9da35","repo":"stablyai/orca","slug":"invalid-argument-b22445","errorCode":"invalid_argument","errorMessage":"unknown computer sidecar method '${method}'","messagePattern":"unknown computer sidecar method '(.+?)'","errorType":"error_code","errorClass":"RuntimeClientError","httpStatus":null,"severity":"error","filePath":"src/main/computer/sidecar-entry.ts","lineNumber":90,"sourceCode":"      return await provider.action('drag', params)\n    }\n    case 'typeText': {\n      return await provider.action('typeText', params)\n    }\n    case 'pressKey': {\n      return await provider.action('pressKey', params)\n    }\n    case 'hotkey': {\n      return await provider.action('hotkey', params)\n    }\n    case 'pasteText': {\n      return await provider.action('pasteText', params)\n    }\n    case 'setValue': {\n      return await provider.action('setValue', params)\n    }\n    default:\n      throw new RuntimeClientError(\n        'invalid_argument',\n        `unknown computer sidecar method '${method}'`\n      )\n  }\n}\n\nfunction isRequest(message: unknown): message is SidecarRequest {\n  if (!message || typeof message !== 'object') {\n    return false\n  }\n  const record = message as Record<string, unknown>\n  return (\n    typeof record.id === 'number' &&\n    typeof record.method === 'string' &&\n    (record.params === undefined || (typeof record.params === 'object' && record.params !== null))\n  )\n}\n","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/src/main/computer/sidecar-entry.ts#L72-L108","documentation":"sidecar-entry dispatch's switch falls through to default when message.method is not one of the known ComputerSidecarMethod values. It throws 'invalid_argument' with the offending method name. The caller is the parent sidecar-client which only ever sends typed ComputerSidecarMethod values, so reaching here means a contract drift or external IPC.","triggerScenarios":"A new method was added to ComputerSidecarMethod in the parent but the sidecar entry's switch was not updated (skewed builds); an external process sent a raw IPC message to the sidecar child; a typo or stale cached codepath dispatching an old method name.","commonSituations":"See trigger scenarios.","solutions":["Rebuild so parent (sidecar-client) and child (sidecar-entry) ship from the same commit — the ComputerSidecarMethod union and the dispatch switch must stay in sync.","If you added a new method, add the matching case to dispatch in the same change.","Do not drive the sidecar IPC channel from outside the sidecar-client wrapper; treat it as private."],"exampleFix":"// before: parent sends a method the child does not know yet\nawait sidecar.call('highlightElement' as ComputerSidecarMethod, params)\n\n// after: add the case in sidecar-entry.ts dispatch and rebuild both sides\ncase 'highlightElement': {\n  return await provider.action('highlightElement', params)\n}","handlingStrategy":"validation","validationCode":"const KNOWN_METHODS = new Set<ComputerSidecarMethod>([\n  'capabilities', 'listApps', 'listWindows', 'getAppState',\n  'click', 'performSecondaryAction', 'scroll', 'drag',\n  'typeText', 'pressKey', 'hotkey', 'pasteText', 'setValue'\n])\n\nfunction isKnownSidecarMethod(method: string): method is ComputerSidecarMethod {\n  return KNOWN_METHODS.has(method as ComputerSidecarMethod)\n}\n\n// guard at the call boundary\nif (!isKnownSidecarMethod(method)) throw new TypeError(`unknown method ${method}`)","typeGuard":"function isKnownSidecarMethod(method: string): method is ComputerSidecarMethod {\n  return KNOWN_METHODS.has(method as ComputerSidecarMethod)\n}","tryCatchPattern":"try {\n  await dispatch(method, params)\n} catch (e) {\n  if (e instanceof RuntimeClientError && e.code === 'invalid_argument' && /^unknown computer sidecar method/.test(e.message)) {\n    // parent/child skew — rebuild both; do not retry\n  } else throw e\n}","preventionTips":["Keep the ComputerSidecarMethod union and sidecar-entry dispatch switch in the same commit.","Treat the sidecar IPC channel as private — do not drive it from outside sidecar-client.","Rebuild parent and child together after touching the method set."],"tags":["computer-use","sidecar","ipc","contract-drift","invalid-argument"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}