LLM 编码 agent(论文以 Claude Code 为具体对象)每次启动新会话都从空上下文开始,此前积累的项目理解、用户偏好、历史决策全部丢弃。对于长期陪伴式的"个人 AI 基础设施"场景,这意味着每次 spawn 新实例都要重新"自我介绍"一遍上下文,而用户实际上早已在其他系统里(数据库、笔记、历史对话)沉淀了这些信息。
▶ 原文摘要 Abstract
Large language model (LLM) coding agents start each session with an empty context window, discarding accumulated knowledge from prior work. We present PrimeAgentOrchestrator (PAO), a system that spawns new instances of Claude Code -- Anthropic's terminal-based coding agent -- pre-loaded with relevant memories compiled from the user's existing personal databases. At spawn time, PAO queries two independently-operated memory backends in parallel (a PostgreSQL entity-observation database and a Cloudflare Worker semantic search index), fuses results using backend-specific retrieval strategies, and delivers the compiled briefing via filesystem injection that exploits the host agent's configuration auto-read behavior. PAO manages the full agent lifecycle including trust pre-seeding, readiness polling with error detection, and adaptive terminal text injection. We report on four months of regular deployment (December 2025 through March 2026) as an experience report, documenting three generations of context delivery mechanisms, the failure modes that motivated each redesign, and the engineering tradeoffs of bridging heterogeneous memory systems rather than building a unified one.