{"record":{"id":"e06a8a4a69d219e0","repo":"musistudio/claude-code-router","slug":"profile-needle-was-not-found-or-is-disabled","errorCode":null,"errorMessage":"Profile \"${needle}\" was not found or is disabled.","messagePattern":"Profile \"(.+?)\" was not found or is disabled\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/core/src/profiles/launch-core.ts","lineNumber":48,"sourceCode":"  const exactId = profiles.find((profile) => profile.id === needle);\n  if (exactId) {\n    return exactId;\n  }\n\n  const normalizedNeedle = normalizeLookupValue(needle);\n  const matches = profiles.filter((profile) =>\n    normalizeLookupValue(profile.name) === normalizedNeedle ||\n    normalizeLookupValue(profile.id) === normalizedNeedle ||\n    sanitizePathSegment(profile.name) === normalizedNeedle ||\n    sanitizePathSegment(profile.id) === normalizedNeedle\n  );\n  if (matches.length === 1) {\n    return matches[0];\n  }\n  if (matches.length > 1) {\n    throw new Error(`Profile \"${needle}\" is ambiguous. Use the profile ID instead.`);\n  }\n  throw new Error(`Profile \"${needle}\" was not found or is disabled.`);\n}\n\nexport function profileOpenSurfaces(profile: ProfileConfig): ProfileOpenSurface[] {\n  if (profile.agent === \"workbuddy\" || profile.agent === \"zcode\" || profile.agent === \"claude-design\") {\n    return [\"app\"];\n  }\n  if (profile.agent === \"grok\" || profile.agent === \"kimi\" || profile.agent === \"pi\" || profile.agent === \"kilo\") {\n    return [\"cli\"];\n  }\n  const surface = normalizeProfileSurface(profile.surface);\n  if (surface === \"cli\") {\n    return [\"cli\"];\n  }\n  if (surface === \"app\") {\n    return [\"app\"];\n  }\n  return [\"cli\", \"app\"];\n}","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/musistudio/claude-code-router/blob/99f24806c6a2c660b16e53e95211c517448a6c90/packages/core/src/profiles/launch-core.ts#L30-L66","documentation":"Error \"Profile \"${needle}\" was not found or is disabled.\" thrown in musistudio/claude-code-router.","triggerScenarios":"Thrown at packages/core/src/profiles/launch-core.ts:48 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":"99f24806c6a2c660b16e53e95211c517448a6c90","analyzedAt":"2026-08-27T04:11:01.184Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}