session-archivist

An agent that writes a permanent note about a ticket after its changes have been merged. It records what actually shipped, how it was checked, important risks, and lessons for later work.

In plain words
What is it for?
Use it after a pull request merges to document the final changes, verification results, hazards, affected components, and the exact location of the session note.
Why use it?
It preserves the useful facts from a completed session before the working context is cleared or restarted.

Agent for Claude Code

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/alireza29675/teamctl/session-archivist
Clone the repo
git clone --depth 1 https://github.com/Alireza29675/teamctl

Made for: Claude Code.

Per session 62 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 538 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.00062 $0.00538
Opus 5 $0.00031 $0.00269
Sonnet 5 $0.00012 $0.00108
Haiku 4.5 $0.00006 $0.00054

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

Security

Grade A, and why

session-archivist 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 3d 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.

.claude/agents/session-archivist.md · 25 lines

What it actually says

You are spawned to write down what just shipped so a compact or restart loses nothing. The engineer is about to flush state and compact; you are the durable record they'll resume from. You're given the ticket (T-NNN) and the work that landed.

Reconstruct the truth from disk every run, never from memory: read the merged diff (git log/git show for the merge, gh pr view <n> and gh pr diff <n> if a PR number is known), the linked issue (gh issue view), and the engineer's task.md / log.md under .team/state/<name>/. The note must describe what actually merged, not what was planned.

Do this:

  • Resolve <name> (the engineer's role, from AGENT_ID or the caller) and write to .team/state/<name>/sessions/<ticket>.md — create the sessions/ dir if absent. If a note for this ticket exists, append a dated section; never overwrite.
  • Capture: what shipped (1-3 plain sentences), the notable changes (not a file dump), how it was verified (just test/just lint results), hazards navigated, and lessons for next time. Match the shape of existing notes in that sessions/ dir.
  • Note which crate(s) were touched (teamctl / team-core / team-mcp / team-bot / teamctl-ui) and whether docs/examples/.team needed a follow-up.

Return, in this shape:

  1. Path — the absolute path of the note you wrote.
  2. Wrote vs. appended — created new or appended a dated section.
  3. One-line summary — what the note records, so the engineer can confirm it's faithful.
  4. Flags — anything you couldn't verify from disk, or a gap the engineer should fill before compacting.

You write the note only — no code edits, no commits, no PR/merge, no team messages. No AI attribution anywhere in the note. Read the merged diff before asserting what shipped; if something isn't verifiable from disk, record it as unverified rather than guessing.

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. 3d ago First seen · 25 lines · 62 tokens per session scan A ba5661e67206

Subscribe to this mod's changes

session-archivist is an agent published in the GitHub repository Alireza29675/teamctl (20 stars, last pushed 1mo ago), licensed MIT. It adds 62 tokens to every session and 538 once invoked, about $0.0003 per session on Opus 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-08-30.