Register and share your invite link to earn from video plays and referrals.

cv usk
@cv_usk
AI / Software Research Notes AI Agent, LLMOps, MLOps, Software Architecture
Joined May 2026
240 Following    207 Followers
Harness Engineering Anti-Patterns AP1. The Context Hoarder 🎯 Point "Include everything just in case" — that feeling of safety is silently killing your agent's performance. More information isn't safer; it's often harmful. ❗ Problem The context window overflows with irrelevant information, diluting the agent's attention. Important information gets buried in the middle, leaving insufficient space for the code and specs the agent actually needs. The result: degraded judgment accuracy, with cost and latency worsening super-linearly. 🔍 Mechanism & Symptoms This anti-pattern is seductive because the intuition "more info = safer" is strong. Designing retrieval (what to fetch and when) takes effort, so stuffing everything in feels easier. But the context window is a scarce resource like a CPU's L1 cache. Utility does not increase monotonically. Beyond a threshold, irrelevant tokens dilute the attention mechanism, causing "lost in the middle" — critical info buried in the center gets ignored. Symptoms include injecting entire repositories, full conversation histories, all tool definitions on every call, and "the agent inexplicably ignores information it already read." 📋 Scenarios - An issue-to-PR agent is fed not just the issue but the entire repo's README, config files, and past PR history. The agent misses the issue's key points and starts editing unrelated files. - A migration agent receives thousands of files at once, overflowing context and losing consistency mid-task. - In pair programming, unopened files and long conversation history consume context, slowing responses. 🛡 How to Avoid - Measure context usage by category and visualize allocation like a memory profiler - Default to pull (let the agent fetch what it needs) and limit push (force injection) to only invariants that are fatal to violate - Summarize and compress older conversation turns; dynamically load only task-relevant tool definitions - When you catch yourself thinking "include everything for safety," recognize that as this anti-pattern's signature #HarnessEngineering# #AIAgent#
Show more