close-session

close-session is a command for Claude Code from NicoGenti/opencode-orchestrator-kit. It costs 23 tokens per session (576 once invoked), scanned A, original, MIT.

A command for ending a coding session cleanly. It records the final state, pending work, decisions, issues, and required review outcomes before stopping.

In plain words
What is it for?
Use it at the end of a session to update progress records, flush pending memory and issue notes, and shut down without starting new work.
Why use it?
It prevents session notes and unfinished plan pointers from being lost when work ends. It also checks that completed tasks received the required outcome classification.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md). Also seen: agent in frontmatter.

Good fit Use it at the end of a session to update progress records, flush pending memory and issue notes, and shut down without starting new work.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/nicogenti/opencode-orchestrator-kit/close-session
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.

Clone the repo
git clone --depth 1 https://github.com/NicoGenti/opencode-orchestrator-kit

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for close-session

README.md
[![agentmods](https://agentmods.dev/badge/commands/nicogenti/opencode-orchestrator-kit/close-session/github.svg)](https://agentmods.dev/commands/nicogenti/opencode-orchestrator-kit/close-session)
Your own site
<a href="https://agentmods.dev/commands/nicogenti/opencode-orchestrator-kit/close-session"><img src="https://agentmods.dev/badge/commands/nicogenti/opencode-orchestrator-kit/close-session/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for close-session

Your own site · 80×15
<a href="https://agentmods.dev/commands/nicogenti/opencode-orchestrator-kit/close-session"><img src="https://agentmods.dev/badge/commands/nicogenti/opencode-orchestrator-kit/close-session.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 576 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00023 $0.00576
Opus 5.5 $0.00009 $0.00230
Sonnet 5.5 $0.00005 $0.00115
Haiku 4.5 $0.00002 $0.00058

Measured 29d ago against content hash 097797f06a9c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

close-session 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 29d 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.

plugin/assets/commands/close-session.md · 19 lines

What it actually says

Session is ending. Run your close-out cycle and then stop — do not start any new work.

  1. Finalize progress.md: using the write tool (full overwrite — this file is a snapshot, not a log), record the final session state: stack, current Current state, what was completed (Done), and pending Next steps with one pointer line per active/recent plan. For multi-phase plans, the pointer line MUST carry the current phase (e.g. - Plan #0012 (worker pipeline): in-progress — Phase 3b of 14 — see plan/in-progress/0012-worker-pipeline.md). If a plan reached plan/complete/ this session, remove its pointer line from progress.md — the plan file itself is the permanent record.

  2. Audit comprehension announcements: for every task/plan closed this session, confirm a classification (NONE/LIGHT/DEEP) was announced to the user and, for LIGHT/DEEP, a final outcome was recorded; if missing, classify and announce now — before finalizing progress.md.

  3. Flush pending appends: using the edit tool (append-only), add any pending decisions to .context/decisions.md and any pending issues to .context/issues.md. Format: - YYYY-MM-DD: <content> — <why/status>. Keep every entry to bullet points only, maximum 5-10 lines. Skip if there is nothing to add — do not invent entries.

  4. Archive oversized files: if any .context/*.md file exceeds roughly 3,000 tokens, move its content to .context/archive/<name>-<date>.md and restart the live file empty (a fresh header is enough; the next session will repopulate it). Do this for each file independently — only archive what actually crossed the threshold.

  5. Close out cleanly: report in 2-3 lines, in the user's language (the language the user is speaking — this project is language-agnostic at the user-facing interface), what was finalized (which files were updated/archived) and confirm no new work was started. The command file itself stays in English; only the user-facing report is dynamic. Then stop and wait for the next session.

Do not delegate new tasks, do not edit plan bodies, and do not modify PROJECT-PROFILE.md — that is profiler's scope. If a write/edit to .context/ is denied by the permission layer, report the exact path and error verbatim instead of silently skipping the update.

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. 29d ago First seen · 19 lines · 23 tokens per session scan A 097797f06a9c

Subscribe to this mod's changes

close-session is a command published in the GitHub repository NicoGenti/opencode-orchestrator-kit (9 stars, last pushed 5d ago), licensed MIT. It adds 23 tokens to every session and 576 once invoked, about $0.0001 per session on Opus 5.5. 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-11-03.

Related

close-session compared with commands from other repositories

close-session next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
close-sessionNicoGenti/opencode-orchestrator-kitCommand95d agoMITA23Claude Code
flow-nexus-user-toolsruvnet/rufloCommand83ktodayMITA14Claude Code
flow-nexus-authruvnet/rufloCommand83ktodayMITA11Claude Code
dashboard-session-abort-allBlackBeltTechnology/pi-agent-dashboardCommand357todayMITA16Claude Code
dashboard-session-renameBlackBeltTechnology/pi-agent-dashboardCommand357todayMITA18Claude Code
dashboard-session-tellBlackBeltTechnology/pi-agent-dashboardCommand357todayMITA21Claude Code
dashboard-session-unhideBlackBeltTechnology/pi-agent-dashboardCommand357todayMITA18Claude Code