# The History tool: past chats become a primitive (v1.20.0)

> Source: <https://loomcycle.dev/blog/the-history-tool-past-chats-as-a-primitive.html>
> Published: 2026-07-14 05:35:36.841151+00:00

RFC BE ships the History tool: a built-in surface with ten ops for reaching past chats — list (chats in a scope, pinned-first, paginated, per-chat token/cost/run-count aggregates), get (metadata + full transcript, format:markdown renders it), search (case-insensitive title match; body-search FTS deferred), rename / annotate / pin / archive, recap (idempotent LLM summary stored on the session row, live-and-parked-chat-safe), resume (returns a continuation handle for a new run against the chat's session_id), related (semantic similar-chats via the configured embedder, cosine ranking in Go, no pgvector). Owner scopes self / user / tenant / global, gated per agent by history_scope, resolved server-side from RunIdentity(ctx) and never the wire. Cross-scope by-id reads fold to an opaque not-found so session IDs are never an existence oracle. Global is stripped for non-admin principals at policy resolution and fails closed. A "chat" is a session (session → runs → events); History adds the human and organizational layer on top: title, description, tags, pinned, archived_at, summary, summary_updated_at (migration 0057). Related's index is session_embeddings (migration 0058), filled lazily on recap / rename / annotate. Transcripts are persisted already-redacted (RFC Z) so a History reader can never see a secret. Transports: HTTP POST /v1/_history, gRPC History RPC, MCP history meta-tool, @loomcycle/client + Python at 1.20.0. Supersedes and removes Context op=history. Also folds in five post-merge review fixes (#723) including the strict identity-required rule for self and user scope.
