From d30013d21944036980460e2a116784e6f4c9bcc4 Mon Sep 17 00:00:00 2001 From: alvedder Date: Mon, 9 Feb 2026 04:19:26 +0500 Subject: [PATCH] fix(deepagents): ls and find shell commands output is unparsable --- libs/deepagents/src/backends/sandbox.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/deepagents/src/backends/sandbox.ts b/libs/deepagents/src/backends/sandbox.ts index e0a3d5a4..6b860957 100644 --- a/libs/deepagents/src/backends/sandbox.ts +++ b/libs/deepagents/src/backends/sandbox.ts @@ -142,7 +142,7 @@ function parseStatLine( */ function buildLsCommand(dirPath: string): string { const quotedPath = shellQuote(dirPath); - return `find ${quotedPath} -maxdepth 1 -not -path ${quotedPath} -exec stat -c '%s\\t%Y\\t%F\\t%n' {} + 2>/dev/null || true`; + return `find ${quotedPath} -maxdepth 1 -not -path ${quotedPath} -exec stat -c "%s\t%Y\t%F\t%n" {} + 2>/dev/null || true`; } /** @@ -153,7 +153,7 @@ function buildLsCommand(dirPath: string): string { */ function buildFindCommand(searchPath: string): string { const quotedPath = shellQuote(searchPath); - return `find ${quotedPath} -not -path ${quotedPath} -exec stat -c '%s\\t%Y\\t%F\\t%n' {} + 2>/dev/null || true`; + return `find ${quotedPath} -not -path ${quotedPath} -exec stat -c "%s\t%Y\t%F\t%n" {} + 2>/dev/null || true`; } /**