Skip to content

fix(explorer): skip File Provider placeholders in grep/read - #1425

Draft
vkehfdl1 wants to merge 2 commits into
mainfrom
fix/1424-explorer-grep-cloud-placeholders
Draft

fix(explorer): skip File Provider placeholders in grep/read#1425
vkehfdl1 wants to merge 2 commits into
mainfrom
fix/1424-explorer-grep-cloud-placeholders

Conversation

@vkehfdl1

Copy link
Copy Markdown
Contributor

Draft follow-up for #1424.

Problem

autorag-explorer grep/read can stall for the full ~20 minute subagent timeout on macOS iCloud Desktop/Documents (and other File Provider roots). Ripgrep itself is fine on local SSD; open() on UF_DATALESS placeholders hydrates via File Provider. A parent subagent batch then waits for the slowest child.

Change

  • Detect File Provider roots (Library/CloudStorage, Library/Mobile Documents, ancestor com.apple.file-provider-domain-id).
  • grep on those roots uses only materialized files (find ! -flags +dataless) plus a 20s abort.
  • read of a dataless path returns a skip message instead of hydrating.

Linux/Windows are unchanged (no-op). Parent bash rg still bypasses this wrapper; explorers have no bash.

Test

bun test test/filesystem/cloud-placeholder.test.ts and the local-cwd cases in test/subagents/explorer-tools-extension.test.ts.

Closes #1424

vkehfdl1 and others added 2 commits August 19, 2026 16:32
Explorer grep wraps ripgrep with --hidden and no per-call timeout.
On macOS iCloud/OneDrive/Google Drive roots that opens UF_DATALESS
placeholders and hydrates them until the 20-minute subagent timeout.

Classify File Provider trees via path markers and xattr, grep only
materialized files, and refuse to read dataless paths.

Fixes #1424
The placeholder-skip return values in read/grep and the grepMaterializedOnly
helper returned { content } without the required details field, producing
TS2719 (AgentToolResult<T> requires details: T). Add details: undefined and
align the helper's return type so typecheck passes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Explorer grep hydrates iCloud/File Provider placeholders and can stall for the full 20-minute subagent timeout

1 participant