What is an agent work log?

By

An agent work log records completed changes across coding sessions. See how it differs from chat history, what to record, and how Git can supply the entries.

An agent work log is a record of completed work across coding sessions. Each entry says what changed, in which project, and when.

How I log every Git commit to a plain text file shows Flavio’s implementation. Git’s post-commit hook adds successful commits to a shared text file, grouped by date and project.

How an agent work log works

A useful entry records an outcome you can check. A commit gives you a stable reference to the files behind it. Work that happens outside Git, such as changing a project setting, needs its own verified record.

Completed changes become work log entriesAn agent changes files and checks them. A successful Git commit triggers a hook that records the project, time, and commit subject in a work log.Change filesCheck resultCommit relevantfilesGit post-commit hookRecord completedoutcome

A session transcript contains prompts, attempts, and tool calls. The work log gives you a shorter view of what was completed.

Agent work logs in each tool

Claude Code

Claude Code’s hooks reference documents Stop when Claude finishes responding and SessionEnd when a session terminates. You can attach your own logging script to lifecycle events. Choose the event that matches what you want to record: finishing a response and completing a verified change are different events.

OpenAI Codex

The Git approach in Flavio’s work-log tutorial works for commits made from Codex too. The event comes from Git, so the logger can record commits made by different coding tools in the same format. See Git’s hook documentation for the trigger.

Cursor

Cursor’s hooks documentation includes afterFileEdit and stop. These can drive a custom logger, but a file edit alone says nothing about whether the change passed its checks. Flavio’s tutorial describes why he moved commit logging to Git’s own hook.

Grok Build

Grok Build’s sessions guide documents saved conversations with prompts, responses, tool calls, and file snapshots. That history can help reconstruct an attempt. A shared outcome log still needs a separate convention or logger, such as the Git hook above.

Details checked against each vendor’s documentation in November 2026.

A real example

Inside this site’s repository, Git can supply the latest commit’s time and subject:

git log -1 --format='%ci %s'

For the full logger, use the script in the post-commit tutorial. It adds project grouping and avoids duplicate entries. Write commit subjects that explain the result, so they remain useful when copied into the log.

When to use an agent work log

Use one when work is spread across projects or several agent sessions. It helps you find the changes behind a weekly update without reopening every conversation.

For reading the shared log by date and project, see Work Tracebook. Logging Codex and ChatGPT Git commits covers another part of Flavio’s setup.

Pitfalls

A commit records a local change. Track deployment separately if you need to know whether readers can see it.

Keep secrets, prompts containing private data, and full command output out of a shared log. Record the result and a reference to the appropriate project instead.

Check for an existing entry before adding one manually. A Git hook may already have recorded the same work.

  • Hooks: Hooks run your own scripts when a coding agent calls a tool or stops. How hooks work in Claude Code, Codex, Cursor and Grok Build, with examples.
  • Sessions: A session is a saved coding-agent conversation you can resume later. How Claude Code, Codex, the Cursor CLI and Grok Build store, name, resume and fork one.
  • Agent memory: Agent memory is notes a coding agent keeps between sessions. How Claude Code, Codex and Grok Build store them, and what Cursor documents instead.

All AI glossary entries →

Want me to talk about your product? You can sponsor this site.