{"record":{"id":"cbd6eb5e5e735169","repo":"paperclipai/paperclip","slug":"prompt-text-is-required","errorCode":null,"errorMessage":"Prompt text is required","messagePattern":"Prompt text is required","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/src/commands/client/prompt.ts","lineNumber":239,"sourceCode":"}\n\nfunction wakeAgent(\n  api: { post<T>(path: string, body?: unknown): Promise<T | null> },\n  agentId: string,\n  issueId: string,\n  reason: string,\n): Promise<unknown> {\n  return api.post(apiPath`/api/agents/${agentId}/wakeup`, {\n    source: \"on_demand\",\n    triggerDetail: \"manual\",\n    reason,\n    payload: { issueId },\n  });\n}\n\nfunction normalizePrompt(prompt: string): string {\n  const normalized = prompt.trim();\n  if (!normalized) throw new Error(\"Prompt text is required\");\n  return normalized;\n}\n\nfunction defaultPromptTitle(prompt: string): string {\n  const firstLine = prompt.split(/\\r?\\n/).map((line) => line.trim()).find(Boolean) ?? \"Prompt handoff\";\n  return firstLine.length > 100 ? `${firstLine.slice(0, 97)}...` : firstLine;\n}\n\nfunction assertAgentMatchesReference(agent: Agent, reference: string): void {\n  const normalized = reference.trim().toLowerCase();\n  if (!normalized) throw new Error(\"Agent reference is required\");\n  const matches = [\n    agent.id,\n    agent.name,\n    typeof agent.urlKey === \"string\" ? agent.urlKey : null,\n  ].some((value) => value?.toLowerCase() === normalized);\n  if (!matches) {\n    throw new Error(","sourceCodeStart":221,"sourceCodeEnd":257,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/cli/src/commands/client/prompt.ts#L221-L257","documentation":"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.","triggerScenarios":"Thrown at cli/src/commands/client/prompt.ts:239 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide prompt text via the command argument or --message/--file option."],"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"}