Skip to content

Agent memory: sessions, notes, compaction & project memory

Agent CLIs are one-shot by nature — every message would normally start a stranger. Mastery HQ layers four kinds of memory on top so your agents behave like colleagues instead.

Claude Code and Codex windows keep a resumable conversation: the first reply links the session (the header shows · linked and the real model name), and every later message resumes it — across minimize, reload, and app restarts. New conversation starts over. The token meter in the header counts real usage for linked Claude sessions and a running estimate elsewhere; it survives restarts.

Each agent keeps a notes.md per workspace — durable facts it curates itself at the end of replies. Notes are injected as working memory on future runs and editable by you via the Notes drawer. Notes belong to the agent and workspace: Alex’s notes never leak into Bo’s.

Long conversations degrade before they overflow. The context meter warns at 50% and turns red at your threshold (Settings → Agents → Context & memory); Compact asks the agent to write a handoff of goals, decisions, and state, then seeds the next fresh session with it. Auto-compact does this for you when enabled.

The workspace’s project.md holds durable project facts — say remember for the project: the demo city is Porto and it’s logged with a date. Every Hermes-routed task carries a distilled slice of it, so any agent picking up work knows the ground rules. Strike through a line (~~…~~) to retire a fact. You can also hand a conversation across agents: hand this to Bo compacts the source session and seeds the target with the handoff.

  • Files live in the workspace folder on disk (agents/<name>/notes.md, project.md) — see data location.
  • A failed resume (expired session) retries fresh automatically; you’ll see it start over rather than error out.