What is an agent work log?
By Flavio
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 a verifiable outcome: commits anchor file changes in Git, while non-Git actions like changing a project setting need their own verified record.
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 exposes Stop and SessionEnd lifecycle events for custom logging scripts, though finishing a reply and completing a verified change are separate events.
OpenAI Codex
The Git hook in Flavio’s work-log tutorial works identically for Codex commits, recording commits from every coding tool in one format via Git’s post-commit hook.
Cursor
Cursor’s hooks documentation includes afterFileEdit and stop, though file edits alone don’t confirm checks passed, so Flavio’s tutorial moved logging to Git’s 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.
Related glossary entries
- 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 → · AI for coding hub →
Want me to talk about your product? You can sponsor this site.