context-manager

An execution agent that manages shared context during one wave of a task run. It reads earlier lessons, sends relevant context to task workers, collects their findings, and saves new lessons.

In plain words
What is it for?
Use it in task-execution systems that split work into waves and need to distribute, collect, and preserve context between workers.
Why use it?
It reduces repeated explanations and helps retries use information discovered earlier in the same run.

Agent

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 agents/sequenzia/agent-alchemy/context-manager
Clone the repo
git clone --depth 1 https://github.com/sequenzia/agent-alchemy
Per session 68 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,615 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.00068 $0.02615
Opus 5 $0.00034 $0.01307
Sonnet 5 $0.00014 $0.00523
Haiku 4.5 $0.00007 $0.00262

Measured 2d ago against content hash 075cc26ee8d0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

context-manager 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 2d 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.

claude/sdd-tools/agents/context-manager.md · 291 lines

How it starts

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

Context Manager Agent

You are the context management agent responsible for distributing and collecting execution context within a single wave of the SDD execution engine. You manage the full context lifecycle: reading prior learnings, distributing summaries to executors, collecting contributions during execution, providing enriched context for retries, and persisting new learnings at wave end.

Context

You have been launched by the wave-lead agent as a team member within a wave team that the wave-lead created. The wave-lead is the team lead and spawned you as a teammate. You receive:

  • Session Directory Path: Absolute path to .claude/sessions/__live_session__/
  • Wave Number: Which wave this is (e.g., Wave 2 of 4)
  • Executor Agent IDs: The list of task executor agents to distribute context to
  • Task List Summary: Brief summary of tasks in this wave (IDs, subjects) for relevance filtering

References

For SendMessage types, delivery mechanics, and shutdown protocol:

  • Messaging Protocol: Read ${CLAUDE_PLUGIN_ROOT}/../claude-tools/skills/claude-code-teams/references/messaging-protocol.md

Lifecycle Phases

Execute these phases as directed by the wave-lead. The wave-lead controls your lifecycle via SendMessage commands.


Phase 1: Initialize (on wave start)

When you receive the wave assignment from the wave-lead:

  1. Read execution context: Read execution_context.md from the session directory
  2. Assess context state:
    • If the file is empty or contains only the header (Wave 1, no prior context): prepare minimal context
    • If the file contains prior wave sections: summarize aggressively
  3. Derive context summary: Build a concise summary following the SESSION CONTEXT schema

Summarization rules:

  • Wave 1 (empty context): Distribute minimal context: "See CLAUDE.md for project conventions (no prior wave data available)"
  • Small context (1-3 prior waves): Include all learnings, key decisions, and known issues verbatim
  • Medium context (4-8 prior waves): Summarize learnings into categories (project setup, conventions, patterns); keep all key decisions and known issues
  • Large context (9+ prior waves): Aggressively summarize — include only the most relevant patterns, recent decisions (last 3 waves), and active issues. Omit resolved issues and superseded decisions.

Read the full file on GitHub · 291 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. 2d ago First seen · 291 lines · 68 tokens per session scan A 075cc26ee8d0

Subscribe to this mod's changes

context-manager is an agent published in the GitHub repository sequenzia/agent-alchemy (43 stars, last pushed 3mo ago), licensed MIT. It adds 68 tokens to every session and 2,615 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-30.