{"slug": "why-parallel-coding-agents-can-make-your-mac-work-harder", "title": "Why parallel coding agents can make your Mac work harder", "summary": "A Mac running several parallel coding agents can burn CPU and disk I/O on file churn rather than model responses, with macOS's fseventsd file-event system and Spotlight's mds and mdworker_shared indexers reacting to every write, according to a guide by Flavio. The guide recommends diagnosing the load first in Activity Monitor's CPU and Disk tabs, then running a short trace with `sudo fs_usage -w -f filesys -t 10 fseventsd mds mdworker_shared` to identify the responsible processes. It notes that disabling Spotlight on a volume only pauses search indexing, that file events still fire, and that `.gitignore` does not stop macOS indexers or dev-tool watchers from scanning a folder.", "body_md": "# Why parallel coding agents can make your Mac work harder\n\nBy [Flavio](https://flaviocopes.com/about/)\n\nUpdated\n\nTagged: [Mac](https://flaviocopes.com/tags/mac/)\n\nDiagnose file churn from parallel coding agents on a Mac, reduce unnecessary watchers, and decide when a separate APFS volume makes sense.\n\nA coding agent can touch hundreds of files before you finish reading its last reply. Run a few agents at once, install dependencies across several folders, and leave a dev server running in each one, and your Mac ends up doing plenty of work beyond waiting on model responses.\n\nSome of that load comes from the tools you started, and the rest comes from macOS reacting to every file they write.\n\nBefore you change any system settings or reorganize your disk, find out which process is burning CPU and disk I/O. A hot laptop could be Spotlight, a test runner, a compiler, or five dev servers watching the same generated folder.\n\n## Start with one repeatable task\n\nOpen Activity Monitor, click the CPU tab, and sort by CPU usage. Watch what sits at the top while your agents are idle, then run one normal task and look again.\n\nCheck the Disk tab while you’re there. A dependency install can hammer the disk even while the model itself is waiting for a response.\n\nJot down the process names you see. A Node process might be your dev server, an agent, or a build tool, so check what’s running behind that name before blaming macOS.\n\nNext, run the same kind of task with the number of agents you normally use, on the same project and with similar commands. If you compare a quiet code edit against four dependency installs running in parallel, you’re measuring two completely different workloads.\n\nAim for a concrete cause you can test: every time this build recreates its output directory, the dev server restarts and indexing spikes. From there, you have one specific thing to change and retest.\n\n## File events and search indexing do different jobs\n\nThe macOS file event system (`fseventsd`) notifies apps whenever a directory changes. Backup tools rely on it, and so do editors and build tools that need to know which folders to re-read (see Apple’s [File System Events guide](https://developer.apple.com/library/archive/documentation/Darwin/Conceptual/FSEvents_ProgGuide/Introduction/Introduction.html)).\n\nSpotlight does a different job. It builds a searchable index, and when it’s busy you’ll see `mds` and `mdworker_shared` show up near the top of Activity Monitor.\n\nBecause those two systems are separate, turning off Spotlight for a volume only pauses search indexing. File events still fire, and your editor, language server, test runner, and dev server keep watching files as usual.\n\nSeveral listeners can wake up from the same disk write. Turning one off might lower CPU usage, though the writes themselves are still happening.\n\nDon’t expect `.gitignore` to hide a folder from macOS or your dev tools either. It tells Git what to leave untracked, while search indexers and file watchers often keep scanning that directory anyway.\n\n## Take a short trace when you need one\n\nIf Activity Monitor doesn’t narrow things down, macOS ships with `fs_usage`. You can filter it to filesystem calls, pick specific process names, and cap how long it runs.\n\nRun this command to watch filesystem activity from those processes for ten seconds:\n\n```\nsudo fs_usage -w -f filesys -t 10 fseventsd mds mdworker_shared\n```\n\nYou’ll need administrator access to run it. Since the output prints real paths from your disk, keep it local and don’t paste a raw trace into a public issue or an agent prompt.\n\nSwap the process names to match whatever you saw in Activity Monitor. If ten seconds come back mostly quiet, run it again right when an agent hits the busy part of its task.\n\nCheck `man fs_usage` on your Mac if you want to adjust the flags, and keep your traces short so the profiler itself doesn’t pile extra load onto the machine.\n\n## Reduce the writes and watchers first\n\nStart by hunting down generated files that one tool writes while another tool treats them as source files.\n\nThat’s how you end up with a dev server watching its own build output and rebuilding in a loop, or a test runner scanning a folder of temporary reports. Another common trap is letting multiple agents spin up their own dev servers and leave them running long after their task finishes.\n\nOpen the watcher settings in those tools and exclude build directories and caches wherever you can. Stop any dev servers you’re done with, and leave your real source files watched instead of hiding them just to make a CPU graph look cleaner.\n\nWhen it fits the task, tell your agents to reuse a dev server that’s already running. Skip reinstalling dependencies unless they’ve changed, and give parallel tasks clear ownership over different folders or files so they aren’t constantly regenerating the same output.\n\n## Exclude a specific folder from Spotlight\n\nIf Spotlight is the culprit in Activity Monitor, exclude the smallest folder that solves the problem.\n\nOpen System Settings, go to Spotlight, open Search Privacy, and add the folder you want to skip. The exact menu names shift a bit depending on your macOS version; the [Spotlight Search Privacy](https://support.apple.com/guide/mac-help/prevent-spotlight-searches-specific-folders-mchl1bb43b84/mac) guide covers the current steps.\n\nAnything inside that folder drops out of Spotlight search results until you remove it from the list.\n\nStart with a disposable build or dependency folder instead of your whole home directory, and check whether you rely on Finder search for those files before hiding them.\n\nOne quirk to keep in mind: excluding a Time Machine backup disk still leaves the indexing Time Machine needs running.\n\n## When a dedicated APFS volume helps\n\nIf you want a clean boundary for throwaway agent work, you can put it on its own APFS volume. That lets you change Spotlight settings for that volume without touching your regular documents.\n\nMoving projects onto a separate volume comes with some housekeeping. Existing absolute paths can break, and you may have to update paths in your editor, backup app, sync tools, and agent configs. Double-check what’s backed up before keeping anything important there.\n\nAPFS volumes in the same container share the same storage pool and sit on the same physical SSD, so a separate volume gives you a clean settings boundary rather than faster hardware. If you want to look into space sharing, quotas, and reserve sizes, check Apple’s [APFS volume guide](https://support.apple.com/guide/disk-utility/add-delete-or-erase-apfs-volumes-dskua9e6a110/mac).\n\nIf you already have a dedicated volume mounted at `/Volumes/AgentWork`, inspect it before changing anything:\n\n```\ndiskutil info /Volumes/AgentWork\nmdutil -s /Volumes/AgentWork\n```\n\nMake sure the path points to the volume you expect, and note its current indexing status so you know what to restore later.\n\nNext, update indexing for that volume with `mdutil`:\n\n```\nsudo mdutil -i off /Volumes/AgentWork\n```\n\nIf indexing was on before and you want to bring it back, run:\n\n```\nsudo mdutil -i on /Volumes/AgentWork\nmdutil -s /Volumes/AgentWork\n```\n\nTurning indexing back on triggers a catch-up pass while Spotlight scans the volume again. Wait for that to settle, then re-run your original test task to see if the change helped.\n\nLeave file event services alone. File watchers and backup tools depend on change notifications across the whole system, so tampering with that layer breaks things well outside the directory you wanted to quiet down. When you need to cut down the noise, narrow your tool watchers or exclude a specific folder in Spotlight, and run fewer builds at the same time if your CPU is still pegged.\n\nWant me to talk about your product? You can [sponsor this site](https://flaviocopes.com/sponsor/).", "url": "https://wpnews.pro/news/why-parallel-coding-agents-can-make-your-mac-work-harder", "canonical_source": "https://flaviocopes.com/mac-agent-file-churn/", "published_at": "2026-11-29 19:19:16+00:00", "updated_at": "2026-11-29 19:45:36.868322+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools"], "entities": ["Apple", "macOS", "Spotlight", "fseventsd", "Flavio"], "also_reported_by": [], "takeaway": "Diagnose parallel coding-agent load with Activity Monitor and a 10-second `sudo fs_usage -w -f filesys -t 10 fseventsd mds mdworker_shared` trace before changing settings, since disabling Spotlight only pauses indexing while fseventsd file events keep firing.", "recommendation": {"advice": "When parallel coding agents spike CPU or disk I/O, trace fseventsd, mds and mdworker_shared with a short fs_usage run, then cut generated-file writes and redundant watchers before touching system settings.", "playbook": "production-ops", "playbook_url": "https://wpnews.pro/playbooks/production-ops"}, "alternates": {"html": "https://wpnews.pro/news/why-parallel-coding-agents-can-make-your-mac-work-harder", "markdown": "https://wpnews.pro/news/why-parallel-coding-agents-can-make-your-mac-work-harder.md", "text": "https://wpnews.pro/news/why-parallel-coding-agents-can-make-your-mac-work-harder.txt", "jsonld": "https://wpnews.pro/news/why-parallel-coding-agents-can-make-your-mac-work-harder.jsonld"}}