Blog
Why AI agents give up searching your files

AI agents search like programmers, with grep, regular expressions and many quick follow-up searches. On a cloud drive each of those means opening files one by one over the network, so agents stall. Running the search on the server fixes it.
AI agents give up searching cloud files because the way they search depends on reading files quickly, and a network makes every read slow. An agent looking for one decision might run twenty searches in a minute, each one touching hundreds of files. On a laptop's disk that takes moments. When each file has to be fetched from a server first, the same work takes long enough that the agent stops early and answers with whatever it found. Fabric avoids this by running grep, regular expressions and full-text search on its own servers, across the whole drive, and sending back only the matches.
How agents search
Watch a coding agent such as Claude Code or Codex look for something and the pattern is familiar to anyone who has used a terminal. It starts with an exact phrase. If that finds too much, it narrows the search to one folder. If it finds nothing, it loosens the pattern with a regular expression. When it gets a hit, it reads the lines just above and below the match to see whether it's the right one, and then it often searches again for a name or a date it just learned.
Say a founder asks an agent where the team decided to drop the annual plan. On a laptop, the first few steps might look like this.
text
The first search finds forty matches, most of them in old pricing drafts. The second narrows it to meeting notes and catches "annual billing" too. The third reads three lines either side of the one hit that looks promising. Then the agent spots a reference to a customer call, searches for the customer's name, and finds the transcript where the decision was explained. Five or six searches, a few seconds in total, and the answer comes with a source.
None of this is unusual. Agents learned from a great deal of code and documentation, and searching text with patterns is one of the things they do most reliably. They also search far more often than people do. A person might search a drive a few times an hour. An agent working through a task can search dozens of times before it writes a sentence.
What changes when the files are in the cloud
Cloud drives were designed for people, who open a few files and read them. When an agent works with one through a typical connection, it often has to list a folder, fetch each file and read it before it can check for a match. Every fetch is a round trip over the network. Multiply that by hundreds of files and twenty searches, and a task that took seconds on a laptop takes minutes or longer.
Agents respond to that in predictable ways. Many work within a limited budget of steps or time, and they spend it on the first search. Some fall back to whatever search box the service offers, which was built for a person typing a few words and won't accept a regular expression. Some read the first handful of files, find nothing useful, and conclude that the information isn't there. Then they answer from what they already know, or ask you to paste the file in. From the outside it looks like the agent wasn't trying. In practice it ran out of time before the search could work.
Large files make it worse. An agent that needs to check one section of a long log or a few rows of a big CSV shouldn't have to download the whole file to look. Let AI agents analyze large data files without downloading them covers that side of the problem, and can AI agents use Google Drive or Dropbox? looks at what those services were designed for.
Running the search where the files are
The fix is to move the search to the files instead of moving the files to the search. When the search runs on the server, the agent sends one request with a phrase or a pattern and an optional folder, and gets back the matching lines with their file paths. Nothing is downloaded first. The agent keeps the habits it already has: exact phrases, regular expressions, narrowing to a folder, reading around a match and trying again. Each step comes back quickly enough that twenty searches are practical.
Searching file by file over the network | Searching on the server | |
|---|---|---|
What the agent sends | A request for each file | One request per search |
What comes back | Whole files to read through | Matching lines and paths |
Regular expressions | Only if the agent reads every file itself | Supported |
Twenty searches in a row | Slow enough that agents stop early | Practical |
This is how Fabric handles agent search. Agents can run grep, regular expressions and full-text search across the whole drive through Fabric's MCP server and the CLI, without downloading files. The MCP server works with Claude, ChatGPT, Claude Code, Codex, Cursor and VS Code, and the CLI suits scripts and coding agents that work in a terminal. Agents on your own computer can also use the desktop app, which mounts Fabric as a drive on Mac, Windows and Linux, with files streamed when they're opened. How AI agents connect to a shared drive explains which route fits which agent.
Search results are only as useful as the access behind them. With Agent Vault, running searches is one of the permissions you grant, alongside reading files, creating documents, moving content and deleting items, and you choose which folders, spaces or projects each agent can reach. Access can last for a single task, a day, a week or indefinitely, and Fabric logs what each agent does.
Search for the people on the team
People search differently, and Fabric has a separate search built for them. Click Search in the app, or press Cmd+F (Mac) / Ctrl+F (Windows), and type a question in your own words. Fabric's search is hybrid, working by meaning as well as by keyword, so a query like "why we stopped offering yearly billing" can find the meeting note that says "drop annual plan." Put words in quotes for an exact match, filter by tags, location or kind of item, or use similar search to find anything like a file you've selected.
It also looks inside content an agent's text search might miss: text in PDFs, documents, images and screenshots, and transcribed audio and video, with results that jump to the exact page or timestamp. The knowledge search panel extends this to your connected apps, and you can ask follow-up questions.
So the two kinds of search sit side by side. Agents get the pattern-matching tools they're good at, run where the files are. People get search by meaning. Both look at the same files, which is the point of a shared drive in the first place, as your AI agents need a shared drive, not a group chat argues.
Helping agents find things
Some habits make any search easier for an agent. Keep decisions in plain text files such as decisions.md, with a date and a short line for each, so a single grep finds them. Use consistent names for customers, projects and features across notes. Keep exports and raw data next to a short notes file that explains what's in them, an idea we develop in ask your files, don't build a dashboard. And when you ask an agent a question, tell it which folder to start in. Narrowing the search is the first thing a good agent does, and you can save it the step.
For a short definition of the whole idea, see what is a shared drive for AI agents?
Frequently asked questions
Why does my AI agent stop searching before it finds the file?
Agents often search many times in a row, and on a cloud drive each search can mean fetching and reading files one at a time. That's slow, so agents with a limited budget of steps or time stop early and answer with what they have.
How do AI agents search files?
Much like programmers do. They grep for exact phrases, use regular expressions, narrow the search to one folder, read the lines around a match, and then search again with what they've learned.
What is server-side search?
The search runs on the server where the files are stored, and only the matching lines and file paths are sent back. The agent doesn't have to download each file to check it.
Can AI agents use grep on Fabric?
Yes. Agents can run grep, regular expressions and full-text search across the whole drive through Fabric's MCP server and CLI, without downloading files.
Which AI tools can search Fabric through MCP?
Fabric's MCP server works with Claude, ChatGPT, Claude Code, Codex, Cursor and VS Code, and with other MCP clients that support remote servers.
Can I control what an agent is allowed to search?
Yes. Agent Vault lets you give each agent access to specific folders, spaces or projects and choose which actions it can take, including running searches. Every action is logged.
How do people search in Fabric?
Click Search or press Cmd+F (Mac) / Ctrl+F (Windows) and type a query. Fabric searches by meaning and by keyword, and quotes give an exact match.
Does Fabric search inside PDFs, images and recordings?
Yes. Fabric's search covers text in PDFs, documents, images and screenshots, plus transcribed audio and video, and results jump to the exact page or timestamp.
Related pages
Outros posts do blog:

Agent memory vs a shared drive

Can AI agents use Google Drive or Dropbox?

What happens when an AI agent deletes the wrong file

Why AI agents give up searching your files

Why AI agent access should expire

Your agent instruction files are a security risk

When two AI agents edit the same file

Ask your files, don't build a dashboard