{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreiawjxplql7wuc2mkuiav3rxyxkl22ccpcqkq2jrobxzr4hvycn2ei",
    "uri": "at://did:plc:lk3jfj3zq4k4wxnk474axylu/app.bsky.feed.post/3mfgcor6f2mi2"
  },
  "path": "/t/context-pack-mcp-tool-for-high-signal-context-handoff-between-ai-agents/1374795#post_1",
  "publishedAt": "2026-02-22T03:42:07.000Z",
  "site": "https://community.openai.com",
  "textContent": "## The Problem\n\nWhen your orchestrator agent (Codex, Claude Code) sends explorer/reviewer sub-agents to investigate the codebase — to understand architecture, figure out how something is implemented, etc. — those sub-agents typically come back with **vague, opinion-based summaries** rather than precise, factual information.\n\nThe orchestrator can’t rely on these summaries and ends up having to dig into the code itself anyway, wasting output tokens and polluting its context window with noise.\n\n## The Solution: Context Pack (MCP)\n\nI built **context-pack** — a small but useful MCP tool that solves this problem by enabling agents to pass **real code excerpts** instead of opinions.\n\n### How it works\n\n  1. A sub-agent explores the code and places **anchors** — just a file path + line range (e.g. “add lines 123–243 from `main.py`”). No need to copy-paste huge code blocks into output.\n  2. The agent adds **short section titles** for the anchored code, and can group multiple excerpts under one heading.\n  3. The agent can also build **architecture/logic diagrams** so the context pack gives a complete picture.\n  4. When the orchestrator calls `output get`, all anchors are rendered into a single, clean **Markdown pack** with real code snippets.\nThe key insight: the sub-agent transmits **precise context without noise** and without spending expensive output tokens — because anchors (path + line range) are tiny, while the actual code rendering happens on `output`, which counts as input tokens (significantly cheaper).\n\n\n\n### What this gives you\n\n  * **Lower cost** : drastically fewer output tokens in agent-to-agent handoff\n  * **Higher quality** : factual, inspectable code context instead of “trust me” summaries\n  * **Less duplicate work** : the orchestrator reads one complete pack instead of re-opening multiple files\n  * **Better accuracy** : agents make decisions based on real code, not approximations\n\n\n\n### Quick setup\n\nThe repo includes an **Explorer Context Pack skill** , so setup is minimal:\n\n  1. Install and build the server (`cargo build --release`)\n  2. Add server config to your `config.toml` or `mcp.json`\n  3. Tell your sub-agents in the system prompt to hand off context via MCP `context_pack` using the Explorer Context Pack skill\nThat’s it. The skill handles the rest.\n\n\n\n### Links\n\n**GitHub** : github dot com / AmirTlinov / context_pack\n\nWritten in Rust, MIT licensed. Works with any MCP-compatible client (Codex, Claude Code, etc.)\n\n* * *\n\nWould love to hear feedback and ideas from the community. If you’ve been dealing with the same problem of agents giving you vague context — give it a try!",
  "title": "Context Pack — MCP tool for high-signal context handoff between AI agents"
}