Skip to content

Commit cd91d33

Browse files
MH4GFclaude
andcommitted
fix: clear schemaIssues after DB agent processing
Prevents infinite loops by clearing schemaIssues array after DB agent completes its processing, ensuring proper workflow termination. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 7bbcce3 commit cd91d33

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

frontend/internal-packages/agent/src/createGraph.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ export const createGraph = (checkpointer?: BaseCheckpointSaver) => {
3030
const modifiedState = { ...state, messages: [], prompt }
3131
const output = await dbAgentSubgraph.invoke(modifiedState, config)
3232

33-
return { ...state, ...output }
33+
// Clear schemaIssues after DB agent processing to prevent infinite loops
34+
return { ...state, ...output, schemaIssues: [] }
3435
}
3536

3637
const callQaAgent = async (state: WorkflowState, config: RunnableConfig) => {

0 commit comments

Comments
 (0)