Skip to content

Commit f6738fd

Browse files
committed
Fix handleSteps ending prematurely. Fix allowing any tool call from handleSteps
1 parent 595d1e7 commit f6738fd

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

backend/src/run-agent-step.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -610,9 +610,7 @@ export const loopAgentSteps = async (
610610
currentAgentState = programmaticAgentState
611611
totalSteps = stepNumber
612612

613-
if (endTurn) {
614-
shouldEndTurn = true
615-
}
613+
shouldEndTurn = endTurn
616614
}
617615

618616
// Check if output is required but missing

backend/src/run-programmatic-step.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ export async function runProgrammaticStep(
298298
state,
299299
autoInsertEndStepParam: true,
300300
excludeToolFromMessageHistory,
301+
fromHandleSteps: true,
301302
})
302303

303304
// TODO: Remove messages from state and always use agentState.messageHistory.

0 commit comments

Comments
 (0)