Agent Prompt: Session memory update instructions

Agent Prompt: Session memory update instructions is an agent for Claude Code from openonion/connectonion. It costs 16 tokens per session (731 once invoked), scanned C, original, Apache-2.0.

Instructions for updating a session-memory file from the conversation while preserving its existing structure. A session-memory file stores useful context for later work.

In plain words
What is it for?
Use it to update an existing memory file with relevant conversation details, while excluding the instructions themselves and unrelated system information.
Why use it?
It helps carry important project context between conversations without changing the file's headings or other required formatting.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: mentions CLAUDE.md.

Good fit Use it to update an existing memory file with relevant conversation details, while excluding the instructions themselves and unrelated system information.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/openonion/connectonion/agent-prompt-session-memory-update-instructions
About the project

ConnectOnion is an open-source, template-first toolkit for building, debugging, deploying, and operating AI agents. Developers use its command-line tools and Python runtime to create agents, add tools, connect services, deploy them, and make them callable by other agents, while the catalogue entries are related agents, skills, and instructions.

openonion/connectonion · 1,479 stars · on GitHub · docs.connectonion.com

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/openonion/connectonion

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 Agent Prompt: Session memory update instructions

README.md
[![agentmods](https://agentmods.dev/badge/agents/openonion/connectonion/agent-prompt-session-memory-update-instructions.svg)](https://agentmods.dev/agents/openonion/connectonion/agent-prompt-session-memory-update-instructions)
Your own site
<a href="https://agentmods.dev/agents/openonion/connectonion/agent-prompt-session-memory-update-instructions"><img src="https://agentmods.dev/badge/agents/openonion/connectonion/agent-prompt-session-memory-update-instructions.svg" alt="Measured on agentmods" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 731 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00016 $0.00731
Opus 5 $0.00008 $0.00365
Sonnet 5 $0.00003 $0.00146
Haiku 4.5 $0.00002 $0.00073

Measured 8d ago against content hash 4a4ef9473a89, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade C, and why

Agent Prompt: Session memory update instructions scanned grade C with 1 finding 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 8d 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.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

<!-- name: 'Agent Prompt: Session memory update instructions' description: Instructions for updating session memory files during conversations ccVersion: 2.0.58 variables: - MAX_SECTION_TOKENS -->
connectonion/useful_prompts/cc_prompt/prompts/agents/agent-prompt-session-memory-update-instructions.md · 45 lines

What it actually says

IMPORTANT: This message and these instructions are NOT part of the actual user conversation. Do NOT include any references to "note-taking", "session notes extraction", or these update instructions in the notes content.

Based on the user conversation above (EXCLUDING this note-taking instruction message as well as system prompt, claude.md entries, or any past session summaries), update the session notes file.

The file {{notesPath}} has already been read for you. Here are its current contents: <current_notes_content> {{currentNotes}} </current_notes_content>

Your ONLY task is to use the Edit tool to update the notes file, then stop. You can make multiple edits (update every section as needed) - make all Edit tool calls in parallel in a single message. Do not call any other tools.

CRITICAL RULES FOR EDITING:

  • The file must maintain its exact structure with all sections, headers, and italic descriptions intact -- NEVER modify, delete, or add section headers (the lines starting with '#' like # Task specification) -- NEVER modify or delete the italic section description lines (these are the lines in italics immediately following each header - they start and end with underscores) -- The italic section descriptions are TEMPLATE INSTRUCTIONS that must be preserved exactly as-is - they guide what content belongs in each section -- ONLY update the actual content that appears BELOW the italic section descriptions within each existing section -- Do NOT add any new sections, summaries, or information outside the existing structure
  • Do NOT reference this note-taking process or instructions anywhere in the notes
  • It's OK to skip updating a section if there are no substantial new insights to add. Do not add filler content like "No info yet", just leave sections blank/unedited if appropriate.
  • Write DETAILED, INFO-DENSE content for each section - include specifics like file paths, function names, error messages, exact commands, technical details, etc.
  • For "Key results", include the complete, exact output the user requested (e.g., full table, full answer, etc.)
  • Do not include information that's already in the CLAUDE.md files included in the context
  • Keep each section under ~${MAX_SECTION_TOKENS} tokens/words - if a section is approaching this limit, condense it by cycling out less important details while preserving the most critical information
  • Focus on actionable, specific information that would help someone understand or recreate the work discussed in the conversation
  • IMPORTANT: Always update "Current State" to reflect the most recent work - this is critical for continuity after compaction

Use the Edit tool with file_path: {{notesPath}}

STRUCTURE PRESERVATION REMINDER: Each section has TWO parts that must be preserved exactly as they appear in the current file:

  1. The section header (line starting with #)
  2. The italic description line (the italicized text immediately after the header - this is a template instruction)

You ONLY update the actual content that comes AFTER these two preserved lines. The italic description lines starting and ending with underscores are part of the template structure, NOT content to be edited or removed.

REMEMBER: Use the Edit tool in parallel and stop. Do not continue after the edits. Only include insights from the actual user conversation, never from these note-taking instructions. Do not delete or change section headers or italic section descriptions.

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. 8d ago First seen · 45 lines · 0 tokens per session scan C 4a4ef9473a89

Subscribe to this mod's changes

Agent Prompt: Session memory update instructions is an agent published in the GitHub repository openonion/connectonion (1,479 stars, last pushed today), licensed Apache-2.0. It adds 16 tokens to every session and 731 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (hidden instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.