What is SafariHistoryServiceAgent on my Mac?
Last reviewed: 19 November 2026. Path, launchd job, keep-alive condition and man page checked on macOS 26.3.1.
SafariHistoryServiceAgent is the macOS launch agent that starts Safari's history service to finish clearing history when that is still needed, for example if Safari quit before clearing completed. launchd keeps it running only while a marker file says clearing is in progress. Most of the time it is not running.
SafariHistoryServiceAgent at a glance
| SafariHistoryServiceAgent | |
|---|---|
| Made by | Apple (part of macOS, Safari) |
| Type | Per-user agent |
| Location | /System/Cryptexes/App/usr/libexec/SafariHistoryServiceAgent |
| Runs as | your user |
| Started by | launchd job com.apple.SafariHistoryServiceAgent |
| Can you quit it? | Not usefully. launchd keeps it running until clearing history has finished. |
What is SafariHistoryServiceAgent?
Its man page describes it as the system launch agent that launches Safari's history service to finish clearing history if necessary, with no configuration options, not to be run manually.
Its launchd agent, com.apple.SafariHistoryServiceAgent, has one condition: keep the agent alive while the file ~/Library/Safari/ClearHistoryInProgress exists. When clearing finishes and the file is gone, it has no reason to run. On the Mac checked here the file did not exist and the agent had never run.
Is SafariHistoryServiceAgent safe?
Yes. It is part of macOS in the Safari part of the system under /System/Cryptexes/App and is signed by Apple.
Why does SafariHistoryServiceAgent use so much disk and CPU?
- Finishing a history clear. Clearing history removes records from Safari's history database, which means disk writes.
- A large history. Clearing a long history takes longer and keeps the agent around a little longer.
- An interrupted clear. If Safari quit or the Mac restarted during a clear, the marker file remains and launchd starts the agent to finish the job.
How much disk is normal for SafariHistoryServiceAgent?
Typical: not running. After you clear history, a short run is expected.
If it runs for a long time, clearing may be stuck.
What should you do if SafariHistoryServiceAgent keeps running?
- Let it finish. Leave the Mac on for a few minutes after clearing history so the agent can complete.
- Open Safari. Opening Safari lets its history service finish any pending work.
- Check the marker file. In Finder, choose Go > Go to Folder and enter
~/Library/Safari. WhileClearHistoryInProgressexists, launchd keeps the agent running. - Clear history again. In Safari, choose History > Clear History and pick a range. A completed clear removes the marker file.
When should you worry about SafariHistoryServiceAgent?
It is not a concern. If it runs for hours, restart the Mac and clear history again in Safari.
A copy outside /System/Cryptexes/App/usr/libexec would not be Apple's.
How do you check SafariHistoryServiceAgent in Activity Monitor and Terminal?
Open Activity Monitor (Applications > Utilities), and type SafariHistoryServiceAgent in the search field. The Disk tab shows its Bytes Written and Bytes Read. The CPU tab shows its % CPU. Double-click the row for its parent process, memory details and open files.
In Terminal, the first command lists every SafariHistoryServiceAgent process with its PID, user, CPU and memory (RSS is resident memory in kilobytes). fs_usage prints each file it reads or writes until you press Control-C; it needs an administrator password.
ps -axo pid,user,%cpu,%mem,rss,command | grep -F 'SafariHistoryServiceAgent' | grep -v grep
sudo fs_usage -w -f filesys <PID> # PID from the ps line above
How can Thrum help with SafariHistoryServiceAgent?
Thrum's Disk tab shows read and write speed for the whole Mac and for each app, so you can see when SafariHistoryServiceAgent is reading or writing and how fast. Click SafariHistoryServiceAgent in the list for its PID, threads and memory, and Quit or Force Quit it after a confirmation.
Thrum is $4.99 once with a 14-day free trial and no account. It requires macOS 26 Tahoe on Apple silicon or Intel.
Questions about SafariHistoryServiceAgent
Does SafariHistoryServiceAgent record my browsing?
Its man page says its job is to start Safari's history service to finish clearing history.
Why is it running when I did not clear history?
An earlier clear may not have finished, for example if Safari quit during it.
Sources
- SafariHistoryServiceAgent(8) man page: run man SafariHistoryServiceAgent in Terminal
- launchd.plist(5) man page (KeepAlive, PathState): run man launchd.plist in Terminal