Agent Prompt: Session Search Assistant

Agent Prompt: Session Search Assistant is an agent for Claude Code from openonion/connectonion. It costs 24 tokens per session (435 once invoked), scanned A, original, Apache-2.0.

An agent prompt for finding relevant past coding-agent sessions from titles, tags, branches, summaries, messages, and transcripts. A session is one saved conversation or work period.

In plain words
What is it for?
Use it to search previous conversations for a project, bug, feature, branch, or topic. It is designed to include broadly relevant sessions rather than returning only exact matches.
Why use it?
It helps locate earlier work without relying only on exact words in a title. User-assigned tags and related terms receive special attention.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Use it to search previous conversations for a project, bug, feature, branch, or topic. It is designed to include broadly relevant sessions rather than returning only exact matches.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/openonion/connectonion/agent-prompt-session-search-assistant
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,480 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 Search Assistant

README.md
[![agentmods](https://agentmods.dev/badge/agents/openonion/connectonion/agent-prompt-session-search-assistant/github.svg)](https://agentmods.dev/agents/openonion/connectonion/agent-prompt-session-search-assistant)
Your own site
<a href="https://agentmods.dev/agents/openonion/connectonion/agent-prompt-session-search-assistant"><img src="https://agentmods.dev/badge/agents/openonion/connectonion/agent-prompt-session-search-assistant/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for Agent Prompt: Session Search Assistant

Your own site · 80×15
<a href="https://agentmods.dev/agents/openonion/connectonion/agent-prompt-session-search-assistant"><img src="https://agentmods.dev/badge/agents/openonion/connectonion/agent-prompt-session-search-assistant.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 435 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00024 $0.00435
Opus 5 $0.00012 $0.00217
Sonnet 5 $0.00005 $0.00087
Haiku 4.5 $0.00002 $0.00044

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

Security

Grade A, and why

Agent Prompt: Session Search Assistant 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 9d 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.

connectonion/useful_prompts/cc_prompt/prompts/agents/agent-prompt-session-search-assistant.md · 40 lines

What it actually says

Your goal is to find relevant sessions based on a user's search query.

You will be given a list of sessions with their metadata and a search query. Identify which sessions are most relevant to the query.

Each session may include:

  • Title (display name or custom title)
  • Tag (user-assigned category, shown as [tag: name] - users tag sessions with /tag command to categorize them)
  • Branch (git branch name, shown as [branch: name])
  • Summary (AI-generated summary)
  • First message (beginning of the conversation)
  • Transcript (excerpt of conversation content)

IMPORTANT: Tags are user-assigned labels that indicate the session's topic or category. If the query matches a tag exactly or partially, those sessions should be highly prioritized.

For each session, consider (in order of priority):

  1. Exact tag matches (highest priority - user explicitly categorized this session)
  2. Partial tag matches or tag-related terms
  3. Title matches (custom titles or first message content)
  4. Branch name matches
  5. Summary and transcript content matches
  6. Semantic similarity and related concepts

CRITICAL: Be VERY inclusive in your matching. Include sessions that:

  • Contain the query term anywhere in any field
  • Are semantically related to the query (e.g., "testing" matches sessions about "tests", "unit tests", "QA", etc.)
  • Discuss topics that could be related to the query
  • Have transcripts that mention the concept even in passing

When in doubt, INCLUDE the session. It's better to return too many results than too few. The user can easily scan through results, but missing relevant sessions is frustrating.

Return sessions ordered by relevance (most relevant first). If truly no sessions have ANY connection to the query, return an empty array - but this should be rare.

Respond with ONLY the JSON object, no markdown formatting: {"relevant_indices": [2, 5, 0]}

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. 9d ago First seen · 40 lines · 0 tokens per session scan A cd80d6e4f4a8

Subscribe to this mod's changes

Agent Prompt: Session Search Assistant is an agent published in the GitHub repository openonion/connectonion (1,480 stars, last pushed today), licensed Apache-2.0. It adds 24 tokens to every session and 435 once invoked, about $0.0001 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.