Session Work Log
A session ends. The work continues -- but context evaporates. A human note ("picked up from last time, refactored auth") is not enough for an agent that will resume the task cold. This skill produces a structured artifact the next session can read programmatically: what changed, what was blocked, what state the system is in, what comes next.
This is distinct from a delegation brief (which is forward-looking, written before handing off work). The work log is backward-looking, written after work concludes.
When to trigger
- User says "write a work log", "log this session", "session end", "create a handoff artifact"
- User is wrapping up a session and wants context preserved for the next agent or session
- User explicitly says "the next agent should know X"
- Any session where meaningful state changes occurred (files written, tests run, bugs found, decisions made)
Phases
Phase 1 -- Gather Session State
Collect the following from the current session context:
- What was attempted: the original goal or task as stated
- What changed: files created or modified, commands run, migrations applied, configs updated
- What was verified: tests run and their results, manual checks performed
- What blocked: errors hit, decisions deferred, external dependencies unresolved
- Current system state: what is running, what is stopped, what is in an intermediate state
- What comes next: the next concrete action for whoever picks this up
If any field is unclear, ask one short question before writing. Don't leave fields empty -- write "none" or "not determined" explicitly.
Phase 2 -- Write the Artifact
Write the work log to SESSION_WORK_LOG.md at the project root (or $SESSION_LOG_PATH if set).
Format:
# Session Work Log
**Date**: YYYY-MM-DD
**Session goal**: [original task in one sentence]
## Attempted
- [Action 1]
- [Action 2]
## Changed
| File / Resource | Change |
|-----------------|--------|
| path/to/file.ts | Added X, removed Y |
| db/schema.sql | Added column Z to table T |
## Verified
- [Test suite / check] -- [result: passed / failed / skipped]
- [Manual check] -- [result]
## Blocked
- [Blocker 1]: [brief description of what is stuck and why]
- [Blocker 2]: [what would unblock it]
## System state
- [Service / process]: [running / stopped / in progress]
- [Migration state]: [applied through migration N]
## Next action
[One concrete next step. If multiple paths exist, name the recommended one and why.]
## Context for next session
[Any non-obvious context: env var that must be set, workaround in place, external system in a particular state, decision that was made but not committed.]
Phase 3 -- Confirm and Save
Show the draft to the user. Accept corrections. Write the final version.
State where the file was written.
Storage
Default: SESSION_WORK_LOG.md at project root. Each run appends a new dated section rather than overwriting -- the file accumulates session history.
Override: $SESSION_LOG_PATH environment variable.
Verification
Rules
- The artifact is machine-readable first. Prose is for the "context for next session" section only.
- Append, never overwrite. Session history is valuable.
- If the session was trivial (nothing changed, nothing blocked), still write the log -- "no changes" is useful signal.
- Credentials and secrets must never appear in the log. Reference env var names only.
Source
Nate's Newsletter, 2026-05-07
https://natesnewsletter.substack.com/p/openclaw-agent-runtime-model-swapping
Pattern: TaskFlow Work Log -- structured session-end artifact that survives model swaps and cross-agent handoffs. The missing machine-readable complement to human-facing handoff notes.
1---2name: session-work-log3description: Produces a structured session-end artifact capturing what was attempted, what changed, what blocked progress, and what the next agent or session needs to know. Machine-readable by design -- survives model swaps and cross-agent handoffs. Trigger phrases: "write a work log", "session work log", "log this session", "create a handoff artifact", "what did we do this session", "session end log".4---56# Session Work Log78A session ends. The work continues -- but context evaporates. A human note ("picked up from last time, refactored auth") is not enough for an agent that will resume the task cold. This skill produces a structured artifact the next session can read programmatically: what changed, what was blocked, what state the system is in, what comes next.910This is distinct from a delegation brief (which is forward-looking, written before handing off work). The work log is backward-looking, written after work concludes.1112## When to trigger1314- User says "write a work log", "log this session", "session end", "create a handoff artifact"15- User is wrapping up a session and wants context preserved for the next agent or session16- User explicitly says "the next agent should know X"17- Any session where meaningful state changes occurred (files written, tests run, bugs found, decisions made)1819## Phases2021### Phase 1 -- Gather Session State2223Collect the following from the current session context:24251. **What was attempted**: the original goal or task as stated262. **What changed**: files created or modified, commands run, migrations applied, configs updated273. **What was verified**: tests run and their results, manual checks performed284. **What blocked**: errors hit, decisions deferred, external dependencies unresolved295. **Current system state**: what is running, what is stopped, what is in an intermediate state306. **What comes next**: the next concrete action for whoever picks this up3132If any field is unclear, ask one short question before writing. Don't leave fields empty -- write "none" or "not determined" explicitly.3334### Phase 2 -- Write the Artifact3536Write the work log to `SESSION_WORK_LOG.md` at the project root (or `$SESSION_LOG_PATH` if set).3738Format:3940```markdown41# Session Work Log4243**Date**: YYYY-MM-DD44**Session goal**: [original task in one sentence]4546## Attempted4748- [Action 1]49- [Action 2]5051## Changed5253| File / Resource | Change |54|-----------------|--------|55| path/to/file.ts | Added X, removed Y |56| db/schema.sql | Added column Z to table T |5758## Verified5960- [Test suite / check] -- [result: passed / failed / skipped]61- [Manual check] -- [result]6263## Blocked6465- [Blocker 1]: [brief description of what is stuck and why]66- [Blocker 2]: [what would unblock it]6768## System state6970- [Service / process]: [running / stopped / in progress]71- [Migration state]: [applied through migration N]7273## Next action7475[One concrete next step. If multiple paths exist, name the recommended one and why.]7677## Context for next session7879[Any non-obvious context: env var that must be set, workaround in place, external system in a particular state, decision that was made but not committed.]80```8182### Phase 3 -- Confirm and Save8384Show the draft to the user. Accept corrections. Write the final version.8586State where the file was written.8788## Storage8990Default: `SESSION_WORK_LOG.md` at project root. Each run appends a new dated section rather than overwriting -- the file accumulates session history.9192Override: `$SESSION_LOG_PATH` environment variable.9394## Verification9596- [ ] All 7 sections present (attempted, changed, verified, blocked, system state, next action, context)97- [ ] "Changed" table lists specific files or resources, not vague summaries98- [ ] "Blocked" section is present -- "none" is a valid value, not a missing section99- [ ] "Next action" is one concrete step, not a wish list100- [ ] No hardcoded absolute paths in the artifact101- [ ] File written and path confirmed to user102103## Rules104105- The artifact is machine-readable first. Prose is for the "context for next session" section only.106- Append, never overwrite. Session history is valuable.107- If the session was trivial (nothing changed, nothing blocked), still write the log -- "no changes" is useful signal.108- Credentials and secrets must never appear in the log. Reference env var names only.109110## Source111112Nate's Newsletter, 2026-05-07113https://natesnewsletter.substack.com/p/openclaw-agent-runtime-model-swapping114Pattern: TaskFlow Work Log -- structured session-end artifact that survives model swaps and cross-agent handoffs. The missing machine-readable complement to human-facing handoff notes.