- SimCleaner
- Guides
- Coding agents
Coding agents and Xcode disk space
Agents build into their own workspaces and DerivedData, and create simulators and test clones that nothing removes afterwards. Here's where to look after an agent session, and what to leave alone.
~/Library/Developer/XcodeBuildMCP/workspaces, XCTestDevices and CoreSimulator/Devices. Don't touch Xcode/CodingAssistant; it isn't a cache.What agents leave behind
- Workspaces. XcodeBuildMCP (now MobileBuildMCP, maintained by Sentry) gives each task its own build folder. One report found orphaned workspaces "never swept", 126 GB past their maximum age (issue), and test products are kept without limit (issue).
- DerivedData copies. Agents often build with their own derived data path, so the same project is built several times over.
- Runtimes and simulators. An agent may download a runtime it needs: one report describes 8.5 GB downloaded without asking, plus devices and caches left behind (issue). Another counts about 34 GB in CoreSimulator after simulator workflows (issue).
- Test clones. Parallel test runs clone simulators into
XCTestDevices. Clones share most of their blocks, so they look much bigger than they are.
Where to look
du -sh ~/Library/Developer/{XcodeBuildMCP,MobileBuildMCP}/workspaces 2>/dev/null
du -sh ~/Library/Developer/XcodeBuildMCP/workspaces/* | sort -h | tail
du -sh ~/Library/Developer/XCTestDevices ~/Library/Developer/CoreSimulator/DevicesA workspace nobody has touched for a few days is almost always finished work. Make sure no agent is running before you remove one; deleting a workspace in the middle of a build fails that build. Replace WORKSPACE with the folder's name:
rm -rf ~/Library/Developer/XcodeBuildMCP/workspaces/WORKSPACEFor test clones and simulators, use simctl rather than rm, so CoreSimulator stays in step:
xcrun simctl --set testing delete all
xcrun simctl delete unavailableWhat to keep
~/Library/Developer/Xcode/CodingAssistant belongs to the coding agents built into Xcode 26.3 and later: their settings and connections. It isn't a cache, and deleting it doesn't free meaningful space.
Let the agent clean up after itself
SimCleaner Pro's command line tool gives agents the same rules as the app. It prints what a cleanup would remove and stops unless it gets --yes, and every listing has a JSON form:
simcleaner suggest --json
simcleaner caches list --json
simcleaner caches remove --suggested --yes--suggested picks workspaces nobody has touched for more than three days, DerivedData whose project is gone, and device support for OS versions a device has since moved past.
With SimCleaner
Coding agent workspaces are their own category in the storage bar and on the Xcode caches page, for both XcodeBuildMCP and MobileBuildMCP. Stale ones are marked as suggested, and Smart Cleanup clears the ones no agent has touched for the period you pick, judging by the newest file inside rather than the folder's own date.

Questions
Is it safe to delete XcodeBuildMCP workspaces?
Yes, when no agent is using them. They hold build output for past tasks, not your source code.
Why does my disk fill up during long agent sessions?
Each task can start a fresh workspace, DerivedData copy and simulator. Without a cleanup step they accumulate for as long as the agent works.