We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e167359 commit 76761e8Copy full SHA for 76761e8
backend/src/run-agent-step.ts
@@ -322,16 +322,14 @@ export const runAgentStep = async (
322
323
const iterationNum = agentState.messageHistory.length
324
325
- const system = await getAgentPrompt(
326
- agentTemplate,
327
- { type: 'systemPrompt' },
328
- fileContext,
329
- agentState,
330
- agentRegistry
331
- )
332
- if (!system) {
333
- throw new Error(`System prompt is required for agent type: ${agentType}`)
334
- }
+ const system =
+ (await getAgentPrompt(
+ agentTemplate,
+ { type: 'systemPrompt' },
+ fileContext,
+ agentState,
+ agentRegistry
+ )) ?? ''
335
const systemTokens = countTokensJson(system)
336
337
// Possibly truncated messagesWithUserMessage + cache.
0 commit comments