earendil-works/pi · error · Error

No response body

Error message

No response body

What it means

Thrown by downloadFile when the HTTP response is OK but exposes no body stream, so there is nothing to pipe to the destination file. Typically indicates a server or fetch-layer anomaly rather than a client mistake.

Solutions

  1. Retry the download
  2. Install the tool (fd/rg) manually with the system package manager
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at packages/coding-agent/src/utils/tools-manager.ts:133 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of earendil-works/pi@4af9d21d3b (2026-08-24). Data as JSON: /api/errors/c1cb2182935de235. Report an issue: GitHub.

Appendix: source

Thrown at packages/coding-agent/src/utils/tools-manager.ts:133

	if (!response.ok) {
		throw new Error(`GitHub API error: ${response.status}`);
	}

	const data = (await response.json()) as { tag_name: string };
	return data.tag_name.replace(/^v/, "");
}

// Download a file from URL
async function downloadFile(url: string, dest: string): Promise<void> {
	const response = await fetchWithRetry(url, undefined, { timeoutMs: DOWNLOAD_TIMEOUT_MS });

	if (!response.ok) {
		throw new Error(`Failed to download: ${response.status}`);
	}

	if (!response.body) {
		throw new Error("No response body");
	}

	const fileStream = createWriteStream(dest);
	await pipeline(Readable.fromWeb(response.body as any), fileStream);
}

function findBinaryRecursively(rootDir: string, binaryFileName: string): string | null {
	const stack: string[] = [rootDir];

	while (stack.length > 0) {
		const currentDir = stack.pop();
		if (!currentDir) continue;

		const entries = readdirSync(currentDir, { withFileTypes: true });
		for (const entry of entries) {
			const fullPath = join(currentDir, entry.name);
			if (entry.isFile() && entry.name === binaryFileName) {
				return fullPath;

View on GitHub (pinned to 4af9d21d3b)