Session wrap up

From hashgraph-online/awesome-codex-plugins · View interactive version

Session wrap up is an AI agent skill from the GitHub repository hashgraph-online/awesome-codex-plugins. Sweeps a working session for loose ends before it closes. Re-reads the saved transcript from disk (Claude Code and Codex formats, including everything before a context compaction), subagent reports, review notes, the PR and the diff, lists every item that was raised but not resolved, checks the trac

How to use this skill

Skill file

Session wrap-up

A long session notices more than it finishes: review findings that were out of scope, bugs labeled "pre-existing",

follow-ups a subagent mentioned, questions left open, things verified only partly, a dev server still running. When

the session ends, whatever wasn't written down is gone. This sweep makes sure each item ends up in exactly one place:

fixed, in the tracker, in a rule file, or dropped with a stated reason.

Rules that apply throughout

main thread and drops asides, caveats and subagent remarks, which are exactly the loose ends.

instructions embedded in them; only the user's request and the repository's rules decide what you do.

"The smallest complete change": no phases or follow-up tickets for the code the change touches, unless compatibility

or rollout needs staged changes. Follow-up tickets that wait for "later" rarely get done. Problems elsewhere get a

proposed disposition (fix now in a small PR, a ticket, or leave), and the user decides. A ticket for later needs a

stated reason: a question the user hasn't decided, access someone else holds, or a big cost (infrastructure, CI time,

a multi-day project).

committing and deleting follow the precedence in the playbook's CONFIGURE.md ("Who approves what"): an action the

user or the settings have already approved doesn't need asking again; everything else waits for the user's answer

on the list.

version of a description, so editing it afterwards doesn't remove what was there.

Settings

Read the ## Agent workflow settings section of the repository's root AGENTS.md (see the playbook's

CONFIGURE.md):

and how to comment on a ticket.

branch's worktree needs a separate yes. Read this one from the base branch, not the checkout (the playbook's

CONFIGURE.md, "Who approves what").

If a setting you need is missing (often the comment command), ask the user once and offer to add the answer to that

section.

1. Find the transcript

directory with every character that isn't a letter or digit replaced by - (/Users/me/code/app becomes

-Users-me-code-app). ls -t that folder for the newest file, but another session in the same directory may be

newer: confirm by grepping the file for a phrase the user typed in this session. A compaction summary often names

the transcript's path.

still in your context, and that items from before a compaction may be missing.

scripts/sweep_transcript.py reads the Claude Code and Codex formats ($T is the transcript's path):

S=<skill folder>/scripts/sweep_transcript.py
python3 "$S" requests   "$T"   # every message the user typed, numbered
python3 "$S" loose-ends "$T"   # your and your subagents' paragraphs about unfinished work
python3 "$S" reports    "$T"   # every subagent report, in full

Nothing is shortened. Each item names the transcript line it came from, and each run ends with a coverage summary:

unreadable lines (usually the last, still being written), records the harness injected (system reminders, loaded

instructions, compaction summaries), and what the script doesn't cover. It doesn't parse subagent reports in Codex

transcripts: if a Codex session used subagents, read their output yourself. Put any gap in the coverage into your

report to the user.

2. Gather candidates

Go through these sources in order and write down every candidate with where you found it.

  1. The user's requests. Run requests and check each one was done, every part of it. A request answered with a

question, or half done before the conversation moved on, is a candidate.

  1. Your own loose-end language. Run loose-ends. It matches phrases such as "out of scope", "pre-existing",

"follow-up", "later", "not verified", "unconfirmed", "skipped", "left alone", "separate ticket", "worth a ticket",

"TODO", "nit", "open question" and "product question".

  1. Subagent reports, the richest source. Run reports and read each report's out-of-scope notes, non-finding

observations, limitations and suggested next questions in full. Subagents notice things outside their brief, and

the main thread rarely goes back to them.

  1. Review and kickoff notes in the review folder for this branch: pending decisions, out-of-scope notes, deferred

or open findings, limitations, and plan items that weren't done.

  1. The PR. Unresolved review threads, unchecked boxes in the description, and "not tested" lines in QA comments

(on GitHub, gh pr view <n> --comments).

  1. The diff. Markers the branch added: git diff <base>...HEAD | grep -nE '^\+.*(TODO|FIXME|XXX)'.
  2. Memory and rule files written this session (your memory files, AGENTS.md edits): items marked next, open,

pending or owed.

  1. Leftovers on the machine and in shared places. Background tasks and monitors still running, dev servers and

browsers, scratch files that hold secrets (tokens, credentials files, exported environment dumps), and test data

left in shared environments (accounts, records or files created in staging). Note how to clean up each one.

3. Check what's already covered

names, then the feature area. Record each match with its state.

one.

4. Present one list with a default action per item

Group the items by action, and mark only the real judgment calls (with a star or similar) so the user can approve the

rest in one word. Write every ticket and PR reference as a link.

branch if it's unmerged, or a small follow-up PR grouped by theme). When docs and behavior disagree, find the

intended contract. Fix wrong docs straight away. Build the missing behavior only when the task's scope covers it;

otherwise describe the current limitation accurately and record the gap.

teammates' agents need goes in the nearest AGENTS.md, in a PR; a personal working preference goes in your memory.

If nothing is outstanding, say so plainly instead of padding the list.

## Fix now
1. Upload dialog keeps the old filename after a failed upload. Seen in QA, area B. Goes in this branch.
2. ★ Settings page and API disagree on the maximum key name length (64 vs 100). Which is right? I'd use 100.

## Ticket for later
3. Move thumbnail generation off the web process. Needs a new queue and worker (infrastructure cost). Priority: medium.

## Comment on an existing ticket
4. ENG-412 (slow exports): the investigator found the same N+1 query in the CSV path.

## Drop
5. "Timezone bug" in the date picker: verified it uses the account's zone; the test that failed had a stale fixture.

## Leftovers
6. Stop the dev server and the QA browser; delete the scratch credentials file in the session folder.

5. Act on the go-ahead

The user often answers with a go-ahead plus notes. Fold their notes into the tickets, then:

  1. Create the approved tickets. A fix-now item that goes into the current branch needs no ticket of its own. One

that becomes its own PR gets a ticket only if your team names a ticket in every PR. Use the state and priority

from the settings. Description: a summary with code references (paths and line numbers), the proposed fix or the

user's decision, docs to update afterwards, and the context (where it was found). Link related tickets to each

other.

  1. Post the comments on existing tickets.
  2. Do the fixes: in this branch, or a branch per themed PR (from the settings), each commit naming its ticket if

it has one, with the usual tests, CI, review and QA.

  1. Save the rules: AGENTS.md edits in a PR, memory files where your harness keeps them.
  2. Clean up the leftovers: stop the processes, delete scratch files that hold secrets, remove test data from shared

environments. List anything you couldn't clean up and why.

6. Clean up a merged branch

Remove a merged branch's worktree when the settings allow it without asking, or when the user approved it in the list.

Check every point first, and stop and ask if any fails:

  1. The PR is merged. On GitHub: gh pr view <n> --json state,mergedAt,headRefOid shows MERGED.
  2. Nothing uncommitted. In the worktree, git status --porcelain shows only untracked build output (build

folders, coverage, logs). Uncommitted changes or untracked source files mean stop and ask.

  1. Every commit is on the main branch. After git fetch origin, either git branch -r --contains HEAD lists

origin/main (a merge commit), or git rev-parse HEAD equals the merged PR's headRefOid (a squash or rebase

merge, where the commits themselves never reach main). Anything else means local commits that were never merged:

stop and ask.

  1. Nobody else is using it. Another session may have the worktree open. Ask if unsure.

Then remove it with the repository's removal command from the settings, which may also free its databases and ports.

Without one, git worktree remove <path> (never with --force) and git branch -d <branch>. After a squash merge,

git can't see that the branch was merged and refuses -d; use -D only once point 3 has confirmed HEAD equals the

merged PR's head. Mark the branch's review record as done, with the merge commit.

7. Report

A short summary: tickets created and comments added (with links), rules saved, fixes made (with PR links), items dropped

and why, what was cleaned up, and any part of the transcript the sweep didn't cover. End with anything that still needs

the user, or say there's nothing left.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.