paperclipai/paperclip · error
Prompt text is required
Error message
Prompt text is required
What it means
normalizePrompt trims the prompt argument and got an empty string, so there is no prompt text to hand to the agent; a required-argument guard.
Solutions
- Provide prompt text via the command argument or --message/--file option.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at cli/src/commands/client/prompt.ts:239 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/cbd6eb5e5e735169.
Report an issue: GitHub.
Appendix: source
Thrown at cli/src/commands/client/prompt.ts:239
}
function wakeAgent(
api: { post<T>(path: string, body?: unknown): Promise<T | null> },
agentId: string,
issueId: string,
reason: string,
): Promise<unknown> {
return api.post(apiPath`/api/agents/${agentId}/wakeup`, {
source: "on_demand",
triggerDetail: "manual",
reason,
payload: { issueId },
});
}
function normalizePrompt(prompt: string): string {
const normalized = prompt.trim();
if (!normalized) throw new Error("Prompt text is required");
return normalized;
}
function defaultPromptTitle(prompt: string): string {
const firstLine = prompt.split(/\r?\n/).map((line) => line.trim()).find(Boolean) ?? "Prompt handoff";
return firstLine.length > 100 ? `${firstLine.slice(0, 97)}...` : firstLine;
}
function assertAgentMatchesReference(agent: Agent, reference: string): void {
const normalized = reference.trim().toLowerCase();
if (!normalized) throw new Error("Agent reference is required");
const matches = [
agent.id,
agent.name,
typeof agent.urlKey === "string" ? agent.urlKey : null,
].some((value) => value?.toLowerCase() === normalized);
if (!matches) {
throw new Error(View on GitHub (pinned to 120ae5428f)