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

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

Описание и применение

Механизмы эвакуации контекста и дедупликации в Legion привели к потере доступа агента к файлам, что вызвало час без кода. Переключение на режим on‑demand, привязка к сессии и синхронизация с ledger исправили проблему, сократив токены на 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