n8n-io/n8n · error · GraphValidationError
Edge ${edge.from} → ${edge.to} has slot index ${index}; slot
Error message
Edge ${edge.from} → ${edge.to} has slot index ${index}; slot indices above ${MAX_SLOT_INDEX} are not supported yet What it means
GraphValidationError (code: invalid_graph) thrown by validateExecutableGraph when an edge's outputIndex or inputIndex is a valid non-negative integer but exceeds MAX_SLOT_INDEX. Slot counts above the current cap are not yet supported (see CAT-3042 for raising the bound); the message names the edge, the value, and the current MAX_SLOT_INDEX.
Source
Thrown at packages/@n8n/engine/src/graph/validate-executable-graph.ts:47
}
// TODO(CAT-2875): loop iteration needs re-runnable steps; until that lands,
// graphs with back-edges are rejected outright rather than deadlocking.
if (graph.edges.some((edge) => edge.isBackEdge)) {
throw new UnimplementedError('Graphs with back-edges (loops) are not supported yet');
}
// Slot indices are structural, so they're enforced here rather than left to
// the transport boundary. TODO(CAT-3042): enforce an upper bound too.
for (const edge of graph.edges) {
for (const index of [edge.outputIndex, edge.inputIndex]) {
if (!Number.isInteger(index) || index < 0) {
throw new GraphValidationError(
`Edge ${edge.from} → ${edge.to} has slot index ${index}; slot indices are non-negative integers`,
);
}
if (index > MAX_SLOT_INDEX) {
throw new GraphValidationError(
`Edge ${edge.from} → ${edge.to} has slot index ${index}; slot indices above ${MAX_SLOT_INDEX} are not supported yet`,
);
}
}
}
// TODO(CAT-2874): multi-slot outputs arrive with branching; until then only
// output slot 0 fires, and the runtime can assume single-slot outputs.
for (const edge of graph.edges) {
if (edge.outputIndex !== 0) {
throw new UnimplementedError(
`Edge ${edge.from} → ${edge.to} leaves output slot ${edge.outputIndex}; only output slot 0 is supported yet`,
);
}
}
// TODO(CAT-3982): same-slot convergence gets a defined meaning (concatenation);
// until then it is rejected rather than given accidental semantics.View on GitHub (pinned to 5ac6606e81)
Solutions
- Clamp indices to <= MAX_SLOT_INDEX when constructing graphs; check the current value of MAX_SLOT_INDEX for your build.
- Redesign high-fan-out nodes to use a different primitive until branching/multi-slot lands (CAT-2874).
- If the graph originated from a newer n8n, downgrade the graph structure or upgrade the engine to a build with a higher MAX_SLOT_INDEX.
- Validate client-side: `if (index > MAX_SLOT_INDEX) throw ...` with a clearer producer-side message.
Example fix
// before
edges: [{ from: 'A', to: 'B', outputIndex: 99, inputIndex: 0, isBackEdge: false }]
// after
edges: [{ from: 'A', to: 'B', outputIndex: 0, inputIndex: 0, isBackEdge: false }] Defensive patterns
Strategy: validation
Validate before calling
import { MAX_SLOT_INDEX } from '@n8n/engine/...';
function withinSlotCap(n: number): boolean {
return Number.isInteger(n) && n >= 0 && n <= MAX_SLOT_INDEX;
}
for (const e of graph.edges) {
if (!withinSlotCap(e.outputIndex) || !withinSlotCap(e.inputIndex)) {
// refuse to submit; reduce slot fan-out
}
} Type guard
function isValidSlotIndex(n: unknown): n is number {
return typeof n === 'number' && Number.isInteger(n) && n >= 0 && n <= MAX_SLOT_INDEX;
} Try / catch
try {
validateExecutableGraph(graph);
} catch (err) {
if (err instanceof GraphValidationError && /slot indices above .* are not supported yet/.test(err.message)) {
// clamp the named edge's index to <= MAX_SLOT_INDEX and retry
} else throw err;
} Prevention
- Clamp generated slot indices to MAX_SLOT_INDEX for your build.
- Avoid high-fan-out designs until branching support (CAT-2874) lands.
- Track CAT-3042 for a higher cap; re-validate graphs after upgrades.
When it happens
Trigger: Submitting a graph where a node claims to connect to input/output slot N and N > MAX_SLOT_INDEX. Both indices are checked per edge after the non-negative-integer check.
Common situations: A workflow exported from a future version that supports more slots; programmatically generated slot indices that overshoot; a node type designed for branching with many outputs before branching support landed (CAT-2874); off-by-one producing an index one past the cap.
Related errors
- invalid_graph
- unimplemented
- Edge ${edge.from} → ${edge.to} leaves output slot ${edge.out
- Node ${edge.to} has more than one edge into input slot ${edg
- invalid_request
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/3e6f760477b018f5.
Report an issue: GitHub.