paperclipai/paperclip · error · Error
Invalid --persona value. Use board or agent.
Error message
Invalid --persona value. Use board or agent.
What it means
parsePersona rejects the --persona option because it is neither 'board' nor 'agent'; a generic enum-validation helper used when building the context set patch.
Solutions
- Pass --persona board or --persona agent.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at cli/src/commands/client/context.ts:157 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18).
Data as JSON: /api/errors/33acfa43b727ab0a.
Report an issue: GitHub.
Appendix: source
Thrown at cli/src/commands/client/context.ts:157
patch[key] = value;
}
}
function buildContextPatch(opts: ContextSetOptions): Partial<ClientContextProfile> {
const patch: Partial<ClientContextProfile> = {};
setIfProvided(patch, "apiBase", opts.apiBase);
setIfProvided(patch, "companyId", opts.companyId);
setIfProvided(patch, "persona", parsePersona(opts.persona));
setIfProvided(patch, "agentId", opts.agentId);
setIfProvided(patch, "agentName", opts.agentName);
setIfProvided(patch, "apiKeyEnvVarName", opts.apiKeyEnvVarName);
return patch;
}
function parsePersona(value: string | undefined): "board" | "agent" | undefined {
if (value === undefined) return undefined;
if (value === "board" || value === "agent") return value;
throw new Error("Invalid --persona value. Use board or agent.");
}
View on GitHub (pinned to 120ae5428f)