{"record":{"id":"25627220bdfbd61a","repo":"Fission-AI/OpenSpec","slug":"managed-copilot-path-is-not-a-regular-file-file","errorCode":null,"errorMessage":"Managed Copilot path is not a regular file: ${filePath}","messagePattern":"Managed Copilot path is not a regular file: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/github-copilot/cloud-agent.ts","lineNumber":380,"sourceCode":"    } catch (error) {\n      if ((error as NodeJS.ErrnoException).code !== 'ENOENT') {\n        throw error;\n      }\n    }\n\n    const parent = path.dirname(candidate);\n    if (parent === candidate) {\n      throw new Error(`Cannot resolve a directory ancestor for: ${filePath}`);\n    }\n    candidate = parent;\n  }\n}\n\nasync function assertMissingOrRegularFile(filePath: string): Promise<void> {\n  try {\n    const stats = await fs.stat(filePath);\n    if (!stats.isFile()) {\n      throw new Error(`Managed Copilot path is not a regular file: ${filePath}`);\n    }\n  } catch (error) {\n    if ((error as NodeJS.ErrnoException).code !== 'ENOENT') {\n      throw error;\n    }\n  }\n}\n\nasync function classifyCopilotAgentReconciliation(\n  agentPath: string,\n  alternateAgentPath: string\n): Promise<'reconcile' | 'skip' | 'remove-managed'> {\n  if (!(await FileSystemUtils.fileExists(alternateAgentPath))) {\n    return 'reconcile';\n  }\n  if (!(await FileSystemUtils.fileExists(agentPath))) {\n    return 'skip';\n  }","sourceCodeStart":362,"sourceCodeEnd":398,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/github-copilot/cloud-agent.ts#L362-L398","documentation":"Error \"Managed Copilot path is not a regular file: ${filePath}\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/core/github-copilot/cloud-agent.ts:380 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6926ccb18afa4ff621112813e9968334576ee11a","analyzedAt":"2026-08-25T12:29:45.729Z","schemaVersion":2},"datasetVersion":"2026-08-25T16:17:27.014Z"}