history

A repository-local store for saving coding-agent session transcripts, grouped by the repository’s first Git commit. It removes secrets and home-directory paths before records are saved.

In plain words
What is it for?
Use it to list saved sessions, inspect one transcript, see sessions waiting to be stored, or capture and drain transcript records safely.
Why use it?
It keeps useful session history without leaving sensitive values in transcripts. It also stages large transcripts at session end and stores them when the next session starts.

Command

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 commands/intentdriven/abcd/history
Clone the repo
git clone --depth 1 https://github.com/intentdriven/abcd
Per session 60 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,025 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.00060 $0.01025
Opus 5 $0.00030 $0.00513
Sonnet 5 $0.00012 $0.00205
Haiku 4.5 $0.00006 $0.00103

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

Security

Grade A, and why

history 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 yesterday.

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.

commands/history.md · 93 lines

How it starts

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

/abcd:history — session-transcript store

The native session-transcript store at ~/.abcd/history/<root-sha>/transcripts/, keyed on this repo's root-commit SHA. list, show and staged perform zero writes; capture and drain are the write paths, and both redact on write — no live secret or absolute home path can survive into a record.

Capture of a live session is split across two hooks. SessionEnd only stages the raw transcript, because redacting at exit costs roughly 0.7s per MB and the host cancels a shutdown hook rather than wait, which silently dropped every transcript past a couple of megabytes. The next SessionStart drains staging into the store. staged shows what has ended but is not yet stored; drain finishes it without waiting for another session.

List

"${CLAUDE_PLUGIN_ROOT}/abcd" history list --json

Summarise each record newest-first: captured_at, session_id, source_kind, and the redacted_secrets / redacted_home_paths counts. An empty list means no transcripts are stored for this repo yet.

Show

"${CLAUDE_PLUGIN_ROOT}/abcd" history show <session-id-or-filename> --json

Fetch one record's metadata and its full redacted body, matched by session id (newest when a session has several records) or by the record filename. Present the metadata and, if the user wants it, the body.

Staged

"${CLAUDE_PLUGIN_ROOT}/abcd" history staged --json

List transcripts that ended but are not yet redacted into the store. Each entry is one session that ended with its capture incomplete — the outcome the store alone cannot report, since an absent record otherwise spans "never ended", "ended before the store existed" and "ended and lost" alike. Report session_id, staged_at and bytes. Staged files hold UNREDACTED transcript text until drained, so say so whenever the list is non-empty.

Drain

"${CLAUDE_PLUGIN_ROOT}/abcd" history drain --json

Redact every staged transcript and store it, then delete the raw copy. A SessionStart drains a bounded number so it cannot stall the first prompt; this verb runs the backlog to completion. A staged file is removed only once its transcript is in the store: anything that fails to capture is reported in failed and its raw copy is deliberately kept, because it is then the only copy abcd holds. Exits non-zero when anything failed.

Read the full file on GitHub · 93 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. yesterday First seen · 93 lines · 60 tokens per session scan A ff27787d0dd6

Subscribe to this mod's changes

history is a command published in the GitHub repository intentdriven/abcd (3 stars, last pushed 2d ago), licensed MIT. It adds 60 tokens to every session and 1,025 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-31.

Related

Other commands, from other repositories