n8n-io/n8n · error · Error

Assistant SDK response has no body

Error message

Assistant SDK response has no body

What it means

Error "Assistant SDK response has no body" thrown in n8n-io/n8n.

Source

Thrown at packages/@n8n/ai-workflow-builder.ee/src/assistant/assistant-handler.ts:169

		}

		return response;
	}

	/**
	 * Consume the SDK's streaming response, mapping messages and writing chunks.
	 * Follows the same approach as the frontend streamRequest() utility.
	 */
	private async consumeSdkStream(
		response: Response,
		writer: StreamWriter,
		signal?: AbortSignal,
		toolCallId?: string,
		context?: AssistantContext,
	): Promise<AssistantResult> {
		const body = response.body;
		if (!body) {
			throw new Error('Assistant SDK response has no body');
		}

		const reader = (body as ReadableStream<Uint8Array>).getReader();
		const decoder = new TextDecoder();

		let buffer = '';
		const state = {
			sdkSessionId: undefined as string | undefined,
			collectedTexts: [] as string[],
			hasCodeDiff: false,
			suggestionIds: [] as string[],
		};

		try {
			while (true) {
				if (signal?.aborted) {
					break;
				}

View on GitHub (pinned to 5ac6606e81)

When it happens

Trigger: Thrown at packages/@n8n/ai-workflow-builder.ee/src/assistant/assistant-handler.ts:169 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12). Data as JSON: /api/errors/ca576ed292ad6048. Report an issue: GitHub.