{"record":{"id":"873c23eb30203f25","repo":"can1357/oh-my-pi","slug":"path-not-found-missingpaths-join-list-e","errorCode":null,"errorMessage":"Path not found: ${missingPaths.join(\", \")}; list each target in the semicolon-delimited `path`${archiveHint}","messagePattern":"Path not found: (.+?); list each target in the semicolon-delimited `path`(.+?)","errorType":"validation","errorClass":"ToolError","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/tools/grep.ts","lineNumber":1118,"sourceCode":"\t\t\t\t\t\t: physicalScopePath;\n\t\t\t\t} else {\n\t\t\t\t\tsearchPath = this.session.cwd;\n\t\t\t\t\tscopePath = internalResolution.virtualScopePath ?? \".\";\n\t\t\t\t\tglobFilter = undefined;\n\t\t\t\t\tisDirectory = false;\n\t\t\t\t\tmultiTargets = undefined;\n\t\t\t\t\texactFilePaths = undefined;\n\t\t\t\t\tmissingPaths = [];\n\t\t\t\t}\n\t\t\t\tif (\n\t\t\t\t\tmissingPaths.length > 0 &&\n\t\t\t\t\tmissingPaths.length === searchablePaths.length &&\n\t\t\t\t\tvirtualResources.length === 0\n\t\t\t\t) {\n\t\t\t\t\tconst archiveHint =\n\t\t\t\t\t\tarchiveUnreadable.length > 0\n\t\t\t\t\t\t\t? ` (archive members were not searchable: ${archiveUnreadable.join(\", \")})`\n\t\t\t\t\t\t\t: \"\";\n\t\t\t\t\tthrow new ToolError(\n\t\t\t\t\t\t`Path not found: ${missingPaths.join(\", \")}; list each target in the semicolon-delimited \\`path\\`${archiveHint}`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tconst baseDisplayMode = resolveFileDisplayMode(this.session);\n\n\t\t\t\tconst effectiveOutputMode = GrepOutputMode.Content;\n\t\t\t\tconst isMultiScope =\n\t\t\t\t\tisDirectory ||\n\t\t\t\t\tBoolean(exactFilePaths) ||\n\t\t\t\t\tBoolean(multiTargets) ||\n\t\t\t\t\t(virtualResources.length > 0 && (virtualResources.length > 1 || searchablePaths.length > 0));\n\t\t\t\tconst perFileMatchCap = isMultiScope ? MULTI_FILE_PER_FILE_MATCHES : SINGLE_FILE_MATCHES;\n\t\t\t\t// Range filtering happens in JS after the native fetch, so out-of-range\n\t\t\t\t// matches consume fetch budget. Widen the per-file budget just enough\n\t\t\t\t// that filtering can still yield `perFileMatchCap` in-range hits, and\n\t\t\t\t// scale the global safety ceiling by the same amplification so ranged\n\t\t\t\t// searches keep the baseline file coverage while staying finite.","sourceCodeStart":1100,"sourceCodeEnd":1136,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/tools/grep.ts#L1100-L1136","documentation":"All paths supplied to grep were missing on disk (and none were searchable or virtual resources), so the search cannot proceed. The message lists every missing path and reminds you that multiple targets go in the semicolon-delimited `path` field; if archive members were also unsearchable, they are appended as a hint.","triggerScenarios":"grep whose entire semicolon-delimited `path` list contains paths that stat as non-existent, e.g. path: \"old/dir;renamed/file.ts\" after a refactor.","commonSituations":"Files deleted or renamed since the command was written; wrong working directory; case-sensitivity mismatches on Linux; paths copied from another machine.","solutions":["Fix each listed path — verify with ls/read relative to the session cwd","Widen the search: omit `path` (defaults to \".\") or pass a directory that exists","If archive members appear in the hint, read them via `read <archive>:<member>` to confirm member names"],"exampleFix":"// before\nawait grep({ pattern: \"init\", path: \"src/old_config.ts\" });\n// after\nawait grep({ pattern: \"init\", path: \"src/config.ts\" });","handlingStrategy":"validation","validationCode":"import * as fs from \"node:fs\";\nconst missing = paths.filter((p) => !fs.existsSync(p));\nif (missing.length === paths.length) throw new Error(`All grep paths missing: ${missing.join(\", \")}`);","typeGuard":null,"tryCatchPattern":"try {\n  await grep({ pattern, path });\n} catch (err) {\n  if (err instanceof ToolError && err.message.startsWith(\"Path not found:\")) {\n    // fall back to a wider search or log the listed missing paths\n  } else throw err;\n}","preventionTips":["Verify each semicolon-delimited path exists before invoking grep","Handle renames/deletes in refactors; keep paths relative to the session cwd"],"tags":["grep","path-not-found"],"backgroundTag":"path-not-found","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}