FlowiseAI/Flowise · error · Error
Cannot call the same agentflow!
Error message
Cannot call the same agentflow!
What it means
Self-recursion guard: if the Execute Flow node's selectedFlowId equals the host chatflow's own id (options.chatflowid), Flowise refuses the call because it would invoke itself indefinitely. Checked at init after UUID validation.
Solutions
- Select a different target chatflow in the dropdown.
- If iterative/self-referential logic is needed, use the Loop sequential node or split the work into a separate chatflow.
Defensive patterns
Strategy: validation
Validate before calling
if (selectedFlowId === options.chatflowid) {
throw new Error('Execute Flow cannot target its own chatflow (infinite recursion). Pick a different flow.')
} Prevention
- After cloning a flow, re-check every Execute Flow target — the clone may still reference the original.
- Use the Loop node for intentional iteration rather than self-call.
When it happens
Trigger: The Execute Flow dropdown was set to the same chatflow that contains this node; a chatflow was cloned from a template that referenced the original by id.
Common situations: Cloning a flow that self-referenced the source; the flow list reordered and the wrong (current) item got selected; building a recursive pattern not knowing it is disallowed.
Related errors
- Cannot call the same agentflow!
- Execute Flow must have a predecessor!
- Execute Flow node name is required!
- Invalid base URL: must be a valid URL
- Invalid flow ID: must be a valid UUID
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/7909938c7f981461.
Report an issue: GitHub.
Appendix: source
Thrown at packages/components/nodes/sequentialagents/ExecuteFlow/ExecuteFlow.ts:186
if (!sequentialNodes || !sequentialNodes.length) throw new Error('Execute Flow must have a predecessor!')
const baseURL = (nodeData.inputs?.baseURL as string) || (options.baseURL as string)
const returnValueAs = nodeData.inputs?.returnValueAs as string
// Validate selectedFlowId is a valid UUID
if (!selectedFlowId || !isValidUUID(selectedFlowId)) {
throw new Error('Invalid flow ID: must be a valid UUID')
}
// Validate baseURL is a valid URL
if (!baseURL || !isValidURL(baseURL)) {
throw new Error('Invalid base URL: must be a valid URL')
}
const credentialData = await getCredentialData(nodeData.credential ?? '', options)
const chatflowApiKey = getCredentialParam('chatflowApiKey', credentialData, nodeData)
if (selectedFlowId === options.chatflowid) throw new Error('Cannot call the same agentflow!')
let headers = {}
if (chatflowApiKey) headers = { Authorization: `Bearer ${chatflowApiKey}` }
const chatflowId = options.chatflowid
const sessionId = options.sessionId
const chatId = options.chatId
const executeFunc = async (state: ISeqAgentsState) => {
const variables = await getVars(appDataSource, databaseEntities, nodeData, options)
let flowInput = ''
if (seqExecuteFlowInput === 'userQuestion') {
flowInput = input
} else if (seqExecuteFlowInput && seqExecuteFlowInput.startsWith('{{') && seqExecuteFlowInput.endsWith('}}')) {
const nodeId = seqExecuteFlowInput.replace('{{', '').replace('}}', '').replace(/\$/g, '').trim()
const messageOutputs = ((state.messages as unknown as BaseMessage[]) ?? []).filter(
(message) => message.additional_kwargs && message.additional_kwargs?.nodeId === nodeIdView on GitHub (pinned to abe4a8601a)