Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

The Agent That Trapped Itself: How Context Eviction and Deduplication Broke on a Go Project

说明与用途

Legion 中的上下文驱逐和去重机制导致代理失去文件访问,导致一小时无代码。切换到按需驱逐、基于会话的保留和账本同步解决了问题,令令牌减少 46%,代码质量提升。

问题

Context eviction and deduplication mechanisms in Legion’s multi‑agent hub caused an agent to lose access to file contents, leading to an hour of work with zero code output.

结果

The new architecture cut prompt size by 46%, reduced completion verbosity by 42%, eliminated extreme outliers, and enabled agents to write correct Go code.

工作流

  • 1. Implemented on‑demand eviction instead of eager.
  • 2. Tied content retention to current session, resetting seen status each new attempt.
  • 3. Rewrote receipt stubs to allow re‑reading of files.
  • 4. Synchronized assembler with read ledger to reset deleted chunk status.

证据

The default policy (eager) left only the three most recent tool results "raw" within a limit of 6,000 tokens.

来源

The investigation revealed a classic deadlock of two independent, yet inconsistent, logic flows: "Always" (Eager) Eviction, Not On‑Demand.

来源

After the post‑mortem, the gateway architecture underwent four key changes: on_demand Eviction Mode, Content Retention Tied to Session, Honest Manifest, Synchronization with Compaction.

来源

  • 记录日期: 2026-10-12T22:40:53.320Z