All pages
Autonomy you can trust · Lesson 2.2 · 10 min
Read the audit trail
The audit log, activity history and terminal history after a long run.
After this lesson you can turn on the records you'll want before a long run, and afterwards reconstruct what the agent did, what it saw, and what your Mac was doing at the time, fast enough that reviewing a run doesn't take longer than the run.
Time: 10 minutes · Works on: macOS app. The iPhone app shows remote activity under Account → Activity.
Trails you don't turn on don't exist
The worst time to discover a log was off is the morning after something went wrong. Several of TRMNLY's records are off by default, for privacy and disk space, so the first habit is a short pre-flight: before any run you won't watch, switch on the records you'd want if it went badly. It costs a few clicks and some disk. Not having them costs a guess.
Four questions, four records
After a long run, you're answering four questions. Each has a record built for it.
| Question | Record |
|---|---|
| What changed? | git: the commits and the diff |
| What did the agent do, and who allowed it? | The audit log |
| What did the agent and the terminal see? | Terminal history and command provenance |
| What was the machine doing? | The Activity tab's history |
Work in that order. Start from the outcome, because that's what you'll keep or throw away. If the diff is right and the tests pass, a skim of the audit log is enough. If something in the diff surprises you, the audit log tells you which tool call made it and whether you, a rule or Auto-accept let it through. If the audit log shows a command whose result you need, terminal history has its full output, long after it scrolled away.
A worked example
You left the agent upgrading a dependency overnight. In the morning the tests pass, but the diff deletes a test fixture you didn't expect to lose.
- What changed:
git logshows three commits. The fixture's deletion is in the second. - Who did it: in the audit log, among last night's entries, the deletion is a shell command, not a file tool. It ran without a card, because a standing rule you'd written earlier allowed it.
- Why: terminal history for that pane shows the test run just before it. A fixture failed to load under the new version, and the agent removed it rather than fix it.
- What to change: you restore the fixture from git, narrow the rule that let the command through, and add a line to your brief template: "Never delete a test or a fixture to make a run pass."
The last step is the point of the exercise. Each review should end with one rule, brief or posture change that makes the next run safer.
Do it in TRMNLY
- Turn on the on-disk audit log. Open Settings → Security and find Audit log. Turn on the toggle that begins Append every tool call to. The file it writes appears underneath once it's on. Without it, the Safety panel keeps only the newest 500 entries in memory, and they aren't kept after TRMNLY quits.
- Turn on terminal history. In Settings → AI Agent → Terminal history, set Keep terminal history to On this Mac. Each pane's output is written as a plain text file, one per pane per day, headed with its project, tab and pane. Delete history on this Mac after sets how long they're kept. Remember it records everything a command printed, secrets included.
- Start recording machine history. Open the Activity tab from the right sidebar's More menu, switch to History, and press the record button. It keeps sampling CPU and memory while TRMNLY is in the background.
- Read the audit log. Click the shield icon at the top right of the agent sidebar and open Audit Log. Every tool call, approval, denial and rule change has a row, with its input, its result, the project and the working folder. A row whose result was scrubbed says how many items were redacted. The Client picker filters to one MCP client, such as Claude Code, or All callers. Reveal in Finder shows the file on disk.
- Check it hasn't been altered. In the Safety panel's Session tab, press Verify integrity. Each entry is signed into a chain, so this confirms nothing in the log was changed after it was written.
- Revoke what you over-allowed. On a tool call or approval row, Revoke locks that tool for the project and clears the saved rules that allowed it. It's the quickest fix for "I approved too much last night." For a browser call, Replay runs it again with the same input, still subject to approval.
- See what remote devices did. Ask the agent to run
audit_list. It lists what the paired phone or web remote did on this Mac, newest first, refusals included, and can filter bysince,deviceortool. Passremote_only: falseto include local MCP clients too. The phone shows the same under Account → Activity. - Search the terminal's past. Ask the agent: "Search terminal history for
the migration error from last night in this project." It uses
terminal_history_search, filtered byproject,pane_idordays, and thenterminal_history_readto read the lines around a match. You can also open the folder yourself with Show in Finder in the same settings section. - Ask who ran a command. In the command palette, run Toggle Command
Provenance to float a panel over the focused pane listing its recent
commands, who produced each one (you, the agent, the queue, a runbook, a
replay), its exit code and how long ago it ran. The agent reads the same
record with
command_provenance. - Line the machine up with the run. In Activity → History, drag across
the chart to select the hours of the run and Save it as a named period.
A saved period keeps its own copy of the samples after the live history
rolls off. The agent can query it with
activity_history. - Close the loop. Read the diff last, with the gear menu's File-grouped
diffs… or
git diffin a pane, and end the review with one concrete change: a revoked rule, a narrower posture or a new line in your brief.
Check yourself
- The on-disk audit log and terminal history are both on, and you know where each file lives.
- You found one tool call in the Audit Log, said who or what allowed it, and pressed Verify integrity.
- The agent found a line from an earlier pane's output with
terminal_history_search. - Your last review ended in a specific change to a rule, a posture or a brief.
Go further
- Agent safety — the audit log, per-row Revoke and the signed chain
- Terminal history — file format, what is and isn't recorded, and the cloud mode
- Activity Monitor — the process table, history recording and saved periods
- Terminal intel — command provenance, anomaly flags and repro bundles
- Review the diff — reading the change itself before you keep it