Skip to content

Commit 0308b78

Browse files
committed
Don't throw for empty prompt
1 parent 27fbe91 commit 0308b78

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/agent-runtime/src/tools/handlers/tool/spawn-agent-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export function validateAgentInput(
133133

134134
// Validate prompt requirement
135135
if (inputSchema.prompt) {
136-
const result = inputSchema.prompt.safeParse(prompt)
136+
const result = inputSchema.prompt.safeParse(prompt ?? '')
137137
if (!result.success) {
138138
throw new Error(
139139
`Invalid prompt for agent ${agentType}: ${JSON.stringify(result.error.issues, null, 2)}`,

0 commit comments

Comments
 (0)