Building an audit trail for what an AI agent did each day
AI agents were already running across two Macs before the firm had any way to answer a basic question: what did they actually do each day? A scheduled task built that answer from scratch, and said plainly, from day one, that it was a stopgap and not real oversight, a distinction that mattered enough to stay in the design.
Category
AI activity auditing and oversight.
What I was trying to accomplish
A running, human-readable record of what an AI agent did each day, across two machines, while the firm weighed a wider rollout, at a time when that activity didn't show up in the standard admin audit logs.
The data challenges
Each agent session runs in its own sandbox, so the logger often couldn't see other sessions' files until it was given deeper system access, and early runs had no reliable timestamps.
The result
A daily log built from a scheduled task that reads each day's sessions and appends a structured entry, plus a dated archive of anything the sessions produced, and a portable setup guide so another person or machine could stand up the same thing. It's worth being direct about the limits: semi-manual logging like this is not a substitute for true oversight, since a user could in principle overwrite what it produced, and it was built and used as a known, deliberate stopgap rather than a permanent answer. One gap did close on its own over time: the tool later began adding desktop browser activity to the log automatically, something it did not do when the task was first set up.
Technical details
Tools: Claude Cowork scheduled tasks, macOS automation, OneDrive
When a desktop AI agent works across your files, email, and browser, a law firm needs to be able to answer a basic question later: what did it do, and what did it produce? The goal was a running, human-readable record of every Cowork session on my two Macs, with copies of everything produced, while the firm weighed a wider rollout.
I built it as a scheduled task on each machine. Each run lists that day's sessions, reads each transcript, and appends a structured entry to a per-machine Cowork Activity Log, then copies any recoverable output files into a dated archive folder. A portable setup guide lets another person, or another machine, get the same log, archive, and schedule after answering two questions. The schedule moved from daily to weekdays with a Monday catch-up for weekend work.
Over about five weeks of runs the log exposed its own limits, which was part of the value. Early runs had no reliable timestamps and occasionally misfiled entries by day, fixed later by reading each session's own last-activity field. The scheduled task sometimes stalled and left silent gaps, and long sessions that outlasted the daily run had to be caught up the next day. Once, a cloud-sync bug left the log file unreadable, and the run stopped rather than risk overwriting it. I treated this as a known, deliberate stopgap rather than a real answer: semi-manual logging like this cannot substitute for true oversight, since a user could in principle overwrite what it produced. The research it prompted pointed to telemetry-based monitoring as the real answer for enterprise oversight of agent activity. One gap did close on its own afterward: the tool later began adding desktop browser activity to the log automatically, something it did not do when the task was first set up.
Pull up a chair.
Let's talk through where things stand, and where they could go.