[PR #556] fix: skip unreadable dirs in glob/grep instead of crashing #558

Open
opened 2026-06-05 17:23:44 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/deepagentsjs/pull/556
Author: @johannes117
Created: 5/28/2026
Status: 🔄 Open

Base: mainHead: fix/filesystem-glob-suppress-permission-errors


📝 Commits (2)

  • 597ef8b fix(filesystem): skip unreadable dirs in glob/grep instead of crashing
  • 71c07da Create two-teeth-share.md

📊 Changes

2 files changed (+11 additions, -0 deletions)

View changed files

.changeset/two-teeth-share.md (+5 -0)
📝 libs/deepagents/src/backends/filesystem.ts (+6 -0)

📄 Description

Problem

grep/glob call fast-glob without suppressErrors, so one unreadable directory during traversal (e.g. macOS-protected /Library/Trial) throws EPERM and aborts the whole search. Via deepagents-acp this surfaces as session/prompt -> Internal error. Hits packaged apps without Full Disk Access; terminal runs (with access) work.

Fix

suppressErrors: true on both fast-glob calls — skip unreadable dirs instead of throwing, matching the Python FilesystemBackend.

Test

vitest run src/backends/filesystem.test.ts → 20/20 pass; filesystem.ts typechecks clean.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/deepagentsjs/pull/556 **Author:** [@johannes117](https://github.com/johannes117) **Created:** 5/28/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/filesystem-glob-suppress-permission-errors` --- ### 📝 Commits (2) - [`597ef8b`](https://github.com/langchain-ai/deepagentsjs/commit/597ef8b5f1921289759aca4edb0616c0627e22a1) fix(filesystem): skip unreadable dirs in glob/grep instead of crashing - [`71c07da`](https://github.com/langchain-ai/deepagentsjs/commit/71c07da9d5a2d68ded8e35d006a3166f9749fe4f) Create two-teeth-share.md ### 📊 Changes **2 files changed** (+11 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `.changeset/two-teeth-share.md` (+5 -0) 📝 `libs/deepagents/src/backends/filesystem.ts` (+6 -0) </details> ### 📄 Description ## Problem `grep`/`glob` call `fast-glob` without `suppressErrors`, so one unreadable directory during traversal (e.g. macOS-protected `/Library/Trial`) throws `EPERM` and aborts the whole search. Via `deepagents-acp` this surfaces as `session/prompt -> Internal error`. Hits packaged apps without Full Disk Access; terminal runs (with access) work. ## Fix `suppressErrors: true` on both `fast-glob` calls — skip unreadable dirs instead of throwing, matching the Python `FilesystemBackend`. ## Test `vitest run src/backends/filesystem.test.ts` → 20/20 pass; `filesystem.ts` typechecks clean. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-06-05 17:23:44 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/deepagentsjs#558