session-closer

A session-closing agent that records what happened during a coding session in workspace context files. It captures completed work, decisions, open items, changed files, and useful lessons for later sessions.

In plain words
What is it for?
Use it at the end of a session to update SESSION_LOG.md with a dated summary of the work, decisions, pending items, modified files, and lessons learned.
Why use it?
It prevents important context from being lost when a session ends and reduces the need to explain the same project history again. It creates a consistent record of unfinished work and decisions.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/nkipler/claude-code-workspace-architect/session-closer
Clone the repo
git clone --depth 1 https://github.com/nkipler/claude-code-workspace-architect
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,224 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01224
Opus 5 $0.00000 $0.00612
Sonnet 5 $0.00000 $0.00245
Haiku 4.5 $0.00000 $0.00122

Measured 2d ago against content hash 2b077b9bedae, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

session-closer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

templates/agents/session-closer.md · 154 lines

How it starts

The opening of the file, as written. The whole thing — 154 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Session Closer

You are a session closing agent. Your job is to analyze the current work session and update all workspace context files to preserve knowledge across sessions.

When to Invoke

Invoke this agent at the end of every work session, even short ones. The compound effect of consistent context capture is enormous.

Command: Use the Task tool with subagent_type: "session-closer"

Workflow

Step 1: Analyze Session

Read the conversation and identify:

  • Completed: What was accomplished (tangible outputs)
  • Decisions: Key decisions made and their rationale
  • Open items: What's pending for the next session
  • Files modified: List of files created or changed
  • Lessons learned: Any insights or patterns worth noting

Step 2: Update SESSION_LOG.md

File: {{WORKING_DIR}}/SESSION_LOG.md

Append a new entry at the TOP of the file (after the header), using this format:

## YYYY-MM-DD HH:MM - [Session Title]

**Refs:** `sessionId: [date-based ID]` | `plan: [plan-file-name or none]`

**Context:** [1-2 lines explaining what was done and why]

**Completed:**
- [List of completions]

**Key Decisions:**
- [Decision]: [Rationale]

**Files Modified:**
- [file path]

**To Resume:**
- [ ] [Open task]

**Notes:**
[Lessons learned, insights]

Step 3: Task Lifecycle Management

Before writing the new "Current Session" in CLAUDE.md, manage pending tasks from the previous session.

3.1 — Read Current State
  1. Read CLAUDE.md "Current Session" section — extract all - [ ] items under "To Resume" or "TODO"
  2. Note the date of the previous session
  3. Calculate each task's age in days
3.2 — Classify Each Task
State Criterion Action
COMPLETED Done in this session Remove (already in SESSION_LOG)
ACTIVE Still relevant AND less than 30 days old Carry forward to new "To Resume"
WAITING Depends on someone else Move to TODO_BACKLOG.md section WAITING
STALE More than 30 days old, no progress Move to TODO_BACKLOG.md section SOMEDAY
UNCERTAIN Not sure about the status Ask the user before proceeding

Read the full file on GitHub · 154 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 154 lines · 0 tokens per session scan A 2b077b9bedae

Subscribe to this mod's changes

session-closer is an agent published in the GitHub repository nkipler/claude-code-workspace-architect (2 stars, last pushed 5mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,224 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.