paperclipai/paperclip · error · Error
Profile '${ctx.profileName}' is persona=${ctx.profile.person
Error message
Profile '${ctx.profileName}' is persona=${ctx.profile.persona}; use an agent profile or board prompt. What it means
`runAgentPrompt` resolves the active CLI context profile and requires its `persona` to be `agent` (or unset). If the profile's persona is `board`, the function throws before issuing any API request, because an agent-prompt must run with agent credentials. The profile/persona come from `resolveCommandContext` -> `resolveProfile`, driven by `--profile` or the current context profile.
Source
Thrown at cli/src/commands/client/prompt.ts:119
try {
const result = await runBoardPrompt(opts.agent ?? "", promptParts.join(" "), opts);
printOutput(result, { json: opts.json });
} catch (err) {
handleCommandError(err);
}
}),
{ includeCompany: false },
);
}
export async function runAgentPrompt(
agentRef: string | undefined,
prompt: string,
opts: PromptOptions,
): Promise<PromptResult> {
const ctx = resolveCommandContext(opts);
if (ctx.profile.persona && ctx.profile.persona !== "agent") {
throw new Error(`Profile '${ctx.profileName}' is persona=${ctx.profile.persona}; use an agent profile or board prompt.`);
}
const body = normalizePrompt(prompt);
const me = await ctx.api.get<Agent>("/api/agents/me");
if (!me) throw new Error("Agent authentication failed");
const expectedRef = agentRef?.trim() || ctx.profile.agentId || me.id;
assertAgentMatchesReference(me, expectedRef);
const result = await createOrCommentForAgent({
api: ctx.api,
actor: "agent",
agent: me,
companyId: me.companyId,
prompt: body,
issueId: opts.issue,
title: opts.title,
wake: opts.wake !== false,
});
return result;View on GitHub (pinned to 67001ec6eb)
Solutions
- Switch to an agent profile: `paperclipai --profile <agentProfile> agent prompt ...`, or set the agent profile current via `paperclipai context set`
- Reconfigure the profile persona to agent with `paperclipai connect` (choose the agent persona)
- If you actually want to act as the board, use `paperclipai board prompt --agent <agentRef> ...` instead
Example fix
# before (current profile is a board profile) paperclipai agent prompt "fix the bug" # after paperclipai --profile my-agent agent prompt "fix the bug"
Defensive patterns
Strategy: validation
Validate before calling
import { readContext, resolveProfile } from "../../client/context.js";
function profileIsAgent(options: { context?: string; profile?: string }): boolean {
const { profile } = resolveProfile(readContext(options.context), options.profile);
return !profile.persona || profile.persona === "agent";
}
if (!profileIsAgent(opts)) {
throw new Error("Switch to an agent profile before running an agent prompt.");
} Type guard
function isAgentProfile(profile: { persona?: string }): profile is { persona: "agent" } {
return profile.persona === "agent";
} Prevention
- Check the current profile persona with `paperclipai context show` before agent commands
- Use `--profile <name>` to be explicit about which profile runs
- Keep board and agent profiles in separate context files to avoid cross-use
When it happens
Trigger: Invoking `paperclipai agent prompt ...` or `agent-prompt ...` while the active profile was connected as a board operator (persona=board) via `paperclipai connect`. Also triggered by passing `--profile <boardProfileName>` to an agent-prompt command.
Common situations: Switching between a board profile and an agent profile and forgetting which persona the current profile carries; sharing a context file where the default profile is board; running agent automation in a shell whose current profile is the board operator.
Related errors
- Profile '${ctx.profileName}' is persona=${ctx.profile.person
- Environment variable ${envName} is empty or not set.
- Challenge secret is required. Pass --token or --token-env.
- Agent key belongs to ${agent.name} (${agent.id}), not '${ref
- Environment variable ${opts.apiKeyEnv.trim()} is not set
AI-assisted analysis of paperclipai/paperclip@67001ec6eb (2026-08-12).
Data as JSON: /api/errors/2ff5789e987ede82.
Report an issue: GitHub.