{"record":{"id":"6814de051dea7363","repo":"stablyai/orca","slug":"invalid-argument-6814de","errorCode":"invalid_argument","errorMessage":"${remotePathSubject} requires --path to be an absolute path on the remote server.","messagePattern":"(.+?) requires --path to be an absolute path on the remote server\\.","errorType":"validation","errorClass":"RuntimeClientError","httpStatus":null,"severity":"error","filePath":"src/cli/repo-path-arguments.ts","lineNumber":25,"sourceCode":"    /^[A-Za-z]:[\\\\/]/.test(value) ||\n    value.startsWith('\\\\\\\\') ||\n    value.startsWith('//')\n  )\n}\n\nexport function resolveRepoPathArgument(\n  inputPath: string,\n  cwd: string,\n  isRemote: boolean,\n  remotePathSubject = 'Remote repo path'\n): string {\n  if (!isRemote) {\n    return resolvePath(cwd, inputPath)\n  }\n  // Why: the local CLI cwd is unrelated to a paired runtime's filesystem.\n  // Relative remote paths would silently target the wrong machine.\n  if (!isAbsoluteServerPath(inputPath)) {\n    throw new RuntimeClientError(\n      'invalid_argument',\n      `${remotePathSubject} requires --path to be an absolute path on the remote server.`\n    )\n  }\n  return inputPath\n}\n","sourceCodeStart":7,"sourceCodeEnd":32,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/src/cli/repo-path-arguments.ts#L7-L32","documentation":"Thrown by resolveRepoPathArgument when the runtime is remote (`isRemote` true) and the supplied `--path` is not an absolute server-side path. The local CLI's cwd is irrelevant to a paired runtime's filesystem, so a relative path would silently target the wrong machine; the builder rejects it. The check uses isAbsoluteServerPath and accepts a customizable `remotePathSubject` for callers that want a tailored message.","triggerScenarios":"Passing a relative repo path (e.g. `--path ./my-repo` or `--path ../sibling`) to any command operating against a remote Orca runtime. Any call to resolveRepoPathArgument with isRemote=true and a non-absolute inputPath.","commonSituations":"Running the same command against local and remote runtimes and forgetting that remote needs an absolute path. Assuming the CLI resolves remote paths relative to the remote user's home. SSH/relay sessions where the local cwd differs from the remote cwd.","solutions":["Pass an absolute path on the remote machine: `--path /home/user/my-repo`.","On Windows remote targets, use a server-style absolute path (`C:\\\\...` or the platform's server-path convention).","If you intended a local operation, ensure the runtime is not paired/remote."],"exampleFix":"// before (remote runtime)\nlinear ... --path ./my-repo\n// after\nlinear ... --path /home/user/my-repo","handlingStrategy":"validation","validationCode":"import { isAbsolute } from 'node:path'\n// Use isAbsoluteServerPath() from the codebase for cross-platform server paths\nif (isRemote && !isAbsolute(inputPath)) {\n  throw new Error('Remote --path must be absolute on the remote server')\n}","typeGuard":"function isRemoteAbsolute(path: string, isRemote: boolean): boolean {\n  return !isRemote || isAbsolute(path) // or isAbsoluteServerPath(path) for server conventions\n}","tryCatchPattern":null,"preventionTips":["Always pass absolute paths when targeting remote runtimes.","Resolve relative local paths before forwarding them to a remote command."],"tags":["cli","remote","path-validation","filesystem","runtime"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}