Thrum

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 byApple (part of macOS, Safari)
TypePer-user agent
Location/System/Cryptexes/App/usr/libexec/SafariHistoryServiceAgent
Runs asyour user
Started bylaunchd 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?

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?

  1. Let it finish. Leave the Mac on for a few minutes after clearing history so the agent can complete.
  2. Open Safari. Opening Safari lets its history service finish any pending work.
  3. Check the marker file. In Finder, choose Go > Go to Folder and enter ~/Library/Safari. While ClearHistoryInProgress exists, launchd keeps the agent running.
  4. 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