{"record":{"id":"33acfa43b727ab0a","repo":"paperclipai/paperclip","slug":"invalid-persona-value-use-board-or-agent","errorCode":null,"errorMessage":"Invalid --persona value. Use board or agent.","messagePattern":"Invalid --persona value\\. Use board or agent\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/client/context.ts","lineNumber":157,"sourceCode":"    patch[key] = value;\n  }\n}\n\nfunction buildContextPatch(opts: ContextSetOptions): Partial<ClientContextProfile> {\n  const patch: Partial<ClientContextProfile> = {};\n  setIfProvided(patch, \"apiBase\", opts.apiBase);\n  setIfProvided(patch, \"companyId\", opts.companyId);\n  setIfProvided(patch, \"persona\", parsePersona(opts.persona));\n  setIfProvided(patch, \"agentId\", opts.agentId);\n  setIfProvided(patch, \"agentName\", opts.agentName);\n  setIfProvided(patch, \"apiKeyEnvVarName\", opts.apiKeyEnvVarName);\n  return patch;\n}\n\nfunction parsePersona(value: string | undefined): \"board\" | \"agent\" | undefined {\n  if (value === undefined) return undefined;\n  if (value === \"board\" || value === \"agent\") return value;\n  throw new Error(\"Invalid --persona value. Use board or agent.\");\n}\n","sourceCodeStart":139,"sourceCodeEnd":159,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/cli/src/commands/client/context.ts#L139-L159","documentation":"parsePersona rejects the --persona option because it is neither 'board' nor 'agent'; a generic enum-validation helper used when building the context set patch.","triggerScenarios":"Thrown at cli/src/commands/client/context.ts:157 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass --persona board or --persona agent."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}