AI Engineer
Dumping full codebases into model context windows causes severe attention loss across the middle of prompts, requiring engineering teams to replace monolithic agents with specialized sub-agents filtered by a deterministic judge node.
AI-assisted summary of Why More Context Makes Your Agent Dumber and What to Do About It — Nupur Sharma, Qodo — original source. Check the original for full context.
Source published:
Key ideas
- Expanding context windows does not make agents smarter; models consistently suffer from attention degradation across the middle of long prompts, exhibiting a U-shaped retention curve that quietly drops auxiliary data. (2:34)
- Capable foundation models often succumb to an orchestration paradox, exhausting token budgets on meta-planning and tool selection rather than executing solutions. (8:31)
- Qodo resolves orchestration paralysis through an 80/20 hybrid split, using high-reasoning models for open-ended discovery under strict iteration caps while routing validation and summarization to lightweight, deterministic models. (8:31)
- Monolithic agents assigned multiple responsibilities consistently abandon secondary tasks midway through execution, necessitating a mixture-of-agents design tied together by a downstream judge node. (11:49)
- Qodo's PR review architecture dynamically recalibrates heuristic suggestion weights based on developer acceptance, while strictly enforcing organizational security and compliance rules regardless of historical code habits. (24:54)
Detailed notes
## Background Published on YouTube by AI Engineer on June 8, 2026, this talk features Nupur Sharma from Qodo explaining why expanding context windows fails to make autonomous agents smarter. According to the page description, the session explores the 'U curve' of context retention, iterative retrieval trade-offs, the orchestration paradox, and Qodo's 80/20 multi-agent code review architecture.
## TL;DR Nupur Sharma shows that dumping full codebases into expanding LLM context windows triggers a 'U curve' attention failure, where models attend to the start and end of prompts while dropping the middle. To fix this, engineering teams should abandon monolithic prompts in favor of targeted context strategies like iterative retrieval and hierarchical summarization. She introduces an 80/20 hybrid orchestration model to prevent reasoning agents from burning tokens in infinite planning loops, reserving frontier models for open-ended discovery and lightweight, deterministic logic for validation. Finally, she breaks down Qodo's live pull request review architecture, where specialized sub-agents evaluate scoped code slices and feed a central judge node that dynamically calibrates feedback against historical merge data and non-negotiable compliance rules.
## Atmosphere & style The presentation is candid, pragmatic, and refreshingly unsentimental about the current limitations of generative AI, feeling more like a battle-tested post-mortem than a promotional keynote. Sharma delivers her points with straightforward authority, illustrating complex failure modes through relatable anecdotes like vacation-planning debacles and arguments with developers defending hardcoded API keys. The audience Q&A adds a sharp, collaborative energy as attendees press on real-world edge cases like architectural trade-offs and legacy technical debt, which Sharma addresses with transparent operational realism.
## Bulletin - [02:34](https://www.youtube.com/watch?v=EcqMYoIV57A&t=154s) Expanding context windows does not make agents smarter; models consistently suffer from attention degradation across the middle of long prompts, exhibiting a U-shaped retention curve that quietly drops auxiliary data. - [08:31](https://www.youtube.com/watch?v=EcqMYoIV57A&t=511s) Capable foundation models often succumb to an orchestration paradox, exhausting token budgets on meta-planning and tool selection rather than executing solutions. - [08:31](https://www.youtube.com/watch?v=EcqMYoIV57A&t=511s) Qodo resolves orchestration paralysis through an 80/20 hybrid split, using high-reasoning models for open-ended discovery under strict iteration caps while routing validation and summarization to lightweight, deterministic models. - [11:49](https://www.youtube.com/watch?v=EcqMYoIV57A&t=709s) Monolithic agents assigned multiple responsibilities consistently abandon secondary tasks midway through execution, necessitating a mixture-of-agents design tied together by a downstream judge node. - [24:54](https://www.youtube.com/watch?v=EcqMYoIV57A&t=1494s) Qodo's PR review architecture dynamically recalibrates heuristic suggestion weights based on developer acceptance, while strictly enforcing organizational security and compliance rules regardless of historical code habits.
## Key takeaways - [00:14](https://www.youtube.com/watch?v=EcqMYoIV57A&t=14s) Transitioning from deterministic DevSecOps pipelines to non-deterministic autonomous agents requires analyzing production failure modes to establish robust architectural guardrails. - [00:14](https://www.youtube.com/watch?v=EcqMYoIV57A&t=14s) Expanding context windows and equipping single agents with open-ended search tools introduces unbounded feedback loops lacking clear stopping criteria. - [02:34](https://www.youtube.com/watch?v=EcqMYoIV57A&t=154s) Internal benchmarking at Qodo demonstrates that dumping full repositories, Jira tickets, and tool outputs into a prompt causes LLMs to drop the middle context while retaining only opening and closing instructions. - [04:31](https://www.youtube.com/watch?v=EcqMYoIV57A&t=271s) Dedicated context engines provide high-precision ranking for messy codebases, but indexing performance degrades significantly when scaled across hundreds of repositories. - [04:31](https://www.youtube.com/watch?v=EcqMYoIV57A&t=271s) Hierarchical summarization avoids brute-force context dumping by having agents navigate folder and file summaries, but it incurs recurring compute costs whenever files are modified. - [04:31](https://www.youtube.com/watch?v=EcqMYoIV57A&t=271s) Iterative retrieval functions like a card catalog, giving agents targeted pointers to pull source code on demand while avoiding heavy upfront graph or engine engineering. - [08:31](https://www.youtube.com/watch?v=EcqMYoIV57A&t=511s) Under the orchestration paradox, high-reasoning models become paralyzed by tool choices and strategy deliberations, burning tokens on finding a way to act rather than acting. - [08:31](https://www.youtube.com/watch?v=EcqMYoIV57A&t=511s) Hard guardrails—such as capping exploration loops at 4 to 5 iterations or imposing a 5-minute timeout—are essential to truncate deliberation and force execution. - [11:49](https://www.youtube.com/watch?v=EcqMYoIV57A&t=709s) Assigning multiple tasks (such as testing, reviewing, and tracking) to a single monolithic agent triggers mid-context degradation, causing the agent to drop secondary objectives. - [13:14](https://www.youtube.com/watch?v=EcqMYoIV57A&t=794s) A Mixture of Agents (MoA) architecture delegates work to specialized sub-agents, but requires a downstream judge agent to reconcile conflicting recommendations into a coherent output. - [14:41](https://www.youtube.com/watch?v=EcqMYoIV57A&t=881s) Qodo's production code review pipeline uses a centralized context collector to ingest pull requests and tool data, passing only scoped context slices to specialized domain agents. - [16:01](https://www.youtube.com/watch?v=EcqMYoIV57A&t=961s) Inter-agent communication relies on structured prompt chaining, where an orchestrator filters upstream outputs into contextual prompts for downstream specialists and the judge node. - [16:01](https://www.youtube.com/watch?v=EcqMYoIV57A&t=961s) Historical pull request indexing calibrates reviews against company-specific engineering norms, enabling the judge agent to filter out noise that human reviewers routinely ignore. - [19:43](https://www.youtube.com/watch?v=EcqMYoIV57A&t=1183s) Mirroring human team divisions, explicit architectural guidelines, security policies, and compliance rules uploaded via an organizational portal ground agent evaluations without requiring global codebase visibility. - [23:22](https://www.youtube.com/watch?v=EcqMYoIV57A&t=1402s) Developer interactions feed a dynamic weighting system where accepted suggestions gain prominence and repeatedly rejected recommendations lose influence over time. - [24:54](https://www.youtube.com/watch?v=EcqMYoIV57A&t=1494s) A dual-track evaluation model ensures soft heuristic suggestions adapt to reviewer preferences, while invariant compliance and security rules are enforced deterministically regardless of past merge habits.
## Detailed walkthrough ### [00:14](https://www.youtube.com/watch?v=EcqMYoIV57A&t=14s) From Deterministic DevSecOps to Non-Deterministic Agents
Nupur Sharma introduces herself and her work at Qodo, where they build systems for agentic code reviews. Coming from a background in DevSecOps, she describes the stark contrast between the traditional software world and modern AI engineering. In DevSecOps, systems are inherently deterministic: pipelines execute, and if they crash, developers inspect the errors and fix them. Transitioning into building autonomous agents means stepping into an environment where non-determinism rules. Over the past few years, her focus has been analyzing precisely where and how agents fail, turning those production failures into design principles.
She reflects on the history of LLM tooling, beginning with early static prompting constrained by tight 4K context windows. In that era, engineers had to hand-pick whatever information they deemed essential, leaving the model vulnerable to poor output whenever developers supplied the wrong inputs. When context windows expanded, the industry shifted toward agentic workflows. Developers gave agents external tools—such as search APIs—to crawl documentation and execute commands. However, that introduced unbounded feedback loops: an agent would execute a search, decide it needed more data, search again, and get trapped in an endless cycle with no stopping criteria. To resolve these limitations, teams moved toward multi-agent architectures, dividing work among specialized units: a security agent evaluating vulnerabilities, a review agent inspecting code quality, and a coding agent attempting fixes. Yet introducing multiple agents simply multiplied the failure modes. Different agents often clash in their internal interpretations of the problem, leading to contradictory outputs rather than cohesive solutions.
```mermaid flowchart TD accTitle: Evolution of LLM Architectures accDescr: Progression from static prompts to single-agent loops and multi-agent coordination.
subgraph Static["Static Prompting (4K Context)"] A["Manual Input Selection"] --> B["LLM Output"] end
subgraph SingleAgent["Single-Agent Workflows"] C["Agent"] -->|"Search / Command"| D["External Tools"] D -->|"Unbounded loop"| C end
subgraph MultiAgent["Multi-Agent Architectures"] E["Security Agent"] F["Review Agent"] G["Coding Agent"] E -.->|"Clashing views"| H["Conflicted Output"] F -.->|"Clashing views"| H G -.->|"Clashing views"| H end ```
[02:34](https://www.youtube.com/watch?v=EcqMYoIV57A&t=154s) The "U Curve" Context Trap in Production Codebases
Despite massive expansions in model context windows allowing developers to dump entire repositories and external tickets into a single prompt, bigger context does not produce smarter decisions. Sharma explains that large language models consistently suffer from attention degradation across long prompts: they attend strongly to the opening instructions and remember the final tokens, but quietly drop or purge the context placed in the middle. She identifies this phenomenon as a "U curve," where the model's retention dips heavily between the beginning and the end.
When an audience member asks, “How do you know this?”, Sharma clarifies that these insights come directly from internal benchmarking at Qodo:
> “This is something which we are working on and we are actually benchmarking things. So when we create agents we try to see this is the context we provide to the agents. Does it take this context into effect and also give us the results.”
In their multi-agent code review experiments, Qodo tested passing full codebases alongside rich supplemental data—such as Jira tickets and Model Context Protocol (MCP) tool outputs. The models consistently retained the initial instructions and the closing inputs, but systematically purged the middle content. Rather than relying on raw context window scale, developers must implement explicit context optimization strategies.
- Context retention forms a U-shaped curve: high attention at the start and end of a context window, with severe loss across the middle. - In multi-agent tasks, dumping auxiliary resources (like Jira issues or MCP endpoints) into the prompt middle leads the LLM to discard that information entirely. - Increasing the raw volume of input data does not make models better at autonomously discerning relevance.
[04:31](https://www.youtube.com/watch?v=EcqMYoIV57A&t=271s) Comparing Context Strategies: Engines, Graphs, and Retrieval
To avoid flooding context windows, engineering teams employ diverse strategies to route relevant code to their agents. Sharma compares the tradeoffs across four primary approaches: dedicated context engines, hierarchical summarization, knowledge graphs, and iterative retrieval.
A context engine acts like an aggressive bouncer, evaluating incoming tasks, ranking code files, and deciding what deserves to pass through to the model. While effective for large, messy codebases, building one introduces serious scaling roadblocks. Indexing requires moderate engineering effort, but performance deteriorates rapidly when scaling across 600 or 700 repositories. Unless a team's core product is building a context engine, the maintenance overhead quickly becomes prohibitive.
Hierarchical summarization bypasses brute-force repository ingestion by generating summaries for individual files and directories. Agents inspect high-level summaries before deciding whether to read deeper source files. The downside is significant upfront LLM compute cost: every time a developer creates or edits a file, background agents must execute LLM passes to update the summary trees.
For codebases characterized by intricate logical dependencies across modules or repositories, knowledge graphs hosted on graph databases excel. They trace how changing one file cascades across others. However, constructing and maintaining these graphs demands extensive manual engineering up front. For teams building internal agents rather than dedicated developer-tooling products, Sharma recommends iterative retrieval. Acting like an index or a library card catalog, iterative retrieval provides the agent with lightweight topic pointers, letting it pull deep source code on demand. It lowers developer configuration overhead while maintaining high precision. Finally, self-correction uses an external critic node to compare intermediate agent outputs against the original goal. If the agent loses context or strays, the critic forces a retry. While this adds execution latency, it requires minimal developer setup.
| Context Strategy | Strengths | Trade-offs & Costs | Best Used For | |:--- |:--- |:--- |:--- | | **Context Engine** | High-precision search and ranking for messy repositories. | Indexing degrades significantly when scaling across 600–700+ repositories. | Teams dedicated to building specialized context infrastructure. | | **Hierarchical Summarization** | Agents inspect file/folder summaries instead of raw source code. | Heavy ongoing LLM compute; every file update triggers new summary generations. | Large codebases where broad structural navigation is required. | | **Knowledge Graph** | Tracks cross-file and cross-repo logical dependencies reliably. | High developer effort and complex graph DB maintenance. | Complex architectures with deep multi-repository coupling. | | **Iterative Retrieval** | Minimal developer configuration; acts like a targeted library card. | Moderate query costs, but avoids massive manual mapping overhead. | Internal workflow agents and non-specialized product teams. | | **Self-Correction (Critic Node)** | Verifies output against initial goals and forces retries on drift. | Increases system latency due to agent re-runs. | Scenarios requiring high fidelity without heavy initial data engineering. |
[08:31](https://www.youtube.com/watch?v=EcqMYoIV57A&t=511s) The Orchestration Paradox and the 80/20 Hybrid Solution
As foundation models grow in reasoning capability, they frequently succumb to the "orchestration paradox." Given a complex objective, frontier models like Anthropic's Claude Opus often become paralyzed by meta-planning. They spend their token budget deliberating over which tool to select, questioning their own strategy, and swapping from one methodology to another without executing concrete steps:
> “They hop on from one method to one another method and most of the API tokens are wasted on finding a way to do it rather than doing it.”
To break these infinite deliberation loops, Qodo implemented an 80/20 hybrid architecture:
```mermaid flowchart LR accTitle: 80/20 Hybrid Agent Architecture accDescr: High-reasoning models perform open-ended research while deterministic models validate and summarize.
subgraph ResearchPhase["80% Research & Discovery Phase"] A["High-Reasoning LLM<br/>(e.g., Claude Opus)"] -->|"Explores Tools & Methods"| B{"Loop Guard"} B -->|"Exceeds Counter (4-5 runs)<br/>or Timeout (5 mins)"| C["Forced Intermediate Output"] B -->|"Normal Completion"| C end
subgraph ValidationPhase["20% Deterministic Phase"] C --> D["Lightweight Model / Hard Gates"] D --> E["Critic Node / Verification"] E --> F["Final Summarized Result"] end ```
The system allocates 80% of the workflow to open-ended research, planning, and discovery powered by high-reasoning frontier models. The remaining 20%—reserved for final summarization, evaluation, and validation—is stripped of open-ended autonomy. Instead, it runs on deterministic logic, strict validation gates (such as expecting strict output Y given input X), and lighter, cheaper models.
To ensure the 80% exploratory phase does not loop endlessly, teams enforce hard guardrails: - **Counter-based mechanisms:** Capping exploration loops at 4 or 5 iterations, forcing the agent to proceed with its latest findings. - **Timeout mechanisms:** Setting a strict 5-minute deadline that truncates tool selection and forces execution.
Sharma emphasizes that this split also dramatically cuts inference costs. High-reasoning models handle open-ended planning, while lightweight models run deterministic checkpoints—such as critic nodes—because evaluating whether an output matches a target goal requires strict verification rather than open-ended research.
[11:49](https://www.youtube.com/watch?v=EcqMYoIV57A&t=709s) The 80/20 Model Split and Single-Agent Context Overwhelm
Nupur Sharma outlines the practical division of labor between model tiers. High-volume, dynamic actions—such as deciding what immediate next action to take, running a targeted query, or performing routine summarization—are handled by lighter, dynamic models comprising roughly 80% of the workload. Conversely, the high-reasoning 20% model is reserved for synthesis and higher-level arbitration, determining how the aggregated outputs should ultimately be structured to answer what the user is actually seeking.
```mermaid flowchart TD accTitle: The 80/20 Model Division of Labor accDescr: Diagram illustrating the division between dynamic 80% models and high-reasoning 20% models.
subgraph Discovery["Dynamic Operations (80% Tier)"] A["Next Action & Tool Calls"] B["Iterative Search & Summarization"] end
subgraph Arbitration["High-Reasoning Operations (20% Tier)"] C["Evaluate Aggregated Outputs"] D["Determine User Relevance & Intent"] end
A --> C B --> C C --> D ```
Sharma warns against an alluring anti-pattern that emerges as context windows expand: teams assume a single agent can do everything simply because the entire codebase and prompt history fit into memory. Developers dump test generation, code reviews, and architectural checks into a single agent's instructions under the assumption that shared context yields unified results. In practice, the agent becomes overwhelmed by the volume of instructions and suffers from mid-context degradation, quietly dropping secondary tasks to focus exclusively on the first or last instructions it processed.
As Nupur Sharma describes the failure mode: “So maybe you give four tasks to the agent and somewhere down the line it focuses on two tasks.”
- Expanding the context window leads teams into the trap of consolidating disparate responsibilities into one monolithic agent. - A single agent assigned multiple responsibilities (e.g., testing, reviewing, tracking) frequently delivers high-quality outputs on two tasks while abandoning the remaining objectives midway through execution.
---
[13:14](https://www.youtube.com/watch?v=EcqMYoIV57A&t=794s) Mixture of Agents and the Judge Node
To resolve single-agent task degradation, Sharma advocates for a mixture of agents (MoA) architecture composed of focused, domain-specific sub-agents rather than one generalized model. Breaking tasks into issue-expert agents guarantees that individual tasks receive dedicated attention. However, decomposing tasks introduces a reconciliation problem: independent sub-agents frequently return valid individual findings that clash or fail to align globally.
To illustrate this coordination failure, Sharma uses a vacation planning analogy. If one agent finds the best hotel in Greece, a second independently books a flight from Amsterdam to Portugal, and a third recommends attractions elsewhere, each agent technically succeeded at its specific assignment, but the trip itinerary as a whole is incoherent. The solution is introducing a dedicated "judge agent" that sits downstream of the specialized workers, ingesting their raw recommendations, identifying contradictions, and assembling them into a unified, actionable response.
As Nupur Sharma summarizes the role of the aggregator: “Now you are doing all the greatest things from different agent getting the best results from their part but a judge agent help us to combine these and make one sense out of it instead of getting so many things which doesn't make sense together.”
---
[14:41](https://www.youtube.com/watch?v=EcqMYoIV57A&t=881s) Qodo's Code Review Architecture
Sharma walks through Qodo's live production architecture for automated pull request (PR) reviews, which implements this multi-agent and judge pattern. The pipeline begins with a centralized context collector. Rather than processing the PR code immediately or attempting to generate an end-to-end review in a single pass, the context collector ingests data from the pull request, external tools, and Qodo's underlying context engine. It then bifurcates and scopes this information, passing only domain-relevant slices to specialized sub-agents.
```mermaid flowchart TD accTitle: Qodo Pull Request Review Architecture accDescr: Architecture showing context collection, bifurcation to specialized agents, and judge agent aggregation.
subgraph Ingestion["Context Ingestion"] PR["Pull Request Data"] Tools["Developer Tools & Jira"] Engine["Context Engine & PR History"] Collector["Context Collector"] PR --> Collector Tools --> Collector Engine --> Collector end
subgraph Specialized["Specialized Sub-Agents"] SecAgent["Security Flaws Agent"] DiffAgent["Code Differences Agent"] JiraAgent["Jira Issues Agent"] end
subgraph Adjudication["Evaluation & Output"] Judge["Judge Agent"] FinalReview["Refined, Relevant Review"] end
Collector -->|"Security Context"| SecAgent Collector -->|"Diff Context"| DiffAgent Collector -->|"Issue Context"| JiraAgent
SecAgent --> Judge DiffAgent --> Judge JiraAgent --> Judge Engine -.->|"Historical Relevancy Check"| Judge Judge --> FinalReview ```
Each specialized agent runs its dedicated evaluation: a security agent scans specifically for vulnerabilities and security flaws, another tracks code differences, and a third maps changes back to associated Jira issues. Once their individual findings are generated, they feed into the judge agent. The judge cross-references these findings back against the context engine and PR history to filter out noise, evaluating which subset of ten or fifteen disparate issues genuinely matters to the developer.
Nupur Sharma explains the selection process: “Once all these agents give us back, a judge agent actually looks for the results and say okay these are interesting enough but is it relevant to you?”
---
[16:01](https://www.youtube.com/watch?v=EcqMYoIV57A&t=961s) Q&A: Inter-Agent Communication and PR History Calibration
Opening the floor to questions, an audience member asks about the underlying mechanics of swarm communication: how agent A, agent B, and the judge coordinate, and whether they communicate via a shared file system or proprietary messaging tools. Sharma explains that Qodo uses LangChain as their baseline infrastructure layer. The communication pattern relies on chaining: an orchestrating agent collects the output from upstream sub-agents and constructs a refined, contextual prompt that is fed directly into the next agent or into the judge.
```mermaid flowchart LR accTitle: Inter-Agent Prompt Chaining Flow accDescr: Sequence showing raw sub-agent outputs refined into clean prompts for downstream agents.
A["Specialized Agent Outputs"] --> B["Collection Agent"] B -->|"Refined & Filtered Prompt"| C["Downstream Agent / Judge"] ```
Another attendee asks whether Qodo incorporates a calibration step to define what constitutes "good" or "bad" code for a specific team. Sharma agrees, pointing out that general foundation models possess no innate understanding of industry-specific engineering standards: an identical Java framework is utilized completely differently by a healthcare company, a retail platform, or a financial institution. Qodo handles calibration via historical pull request indexing:
- The platform indexes historical PRs and past code modifications across the organization to map how developers and human reviewers historically commented on similar diffs. - This historical context is supplied twice: first to the sub-agents so their initial discovery targets patterns the team cares about, and a second time to the judge agent. - When the judge agent evaluates 15 separate review recommendations, it compares them against historical reviewer feedback to prune suggestions that human reviewers routinely ignore or reject. - By injecting only relevant, filtered context into each specific agent, the architecture avoids dumping the entire codebase into the LLM, neutralizing the U-shaped attention curve.
---
[19:43](https://www.youtube.com/watch?v=EcqMYoIV57A&t=1183s) Q&A: Bridging the Context Gap for Architecture and Compliance
An audience member challenges the compartmentalized agent design, questioning how isolated, autonomous agents can make sound architectural decisions when they lack the full codebase picture. While linting or test-coverage checks work cleanly in isolation, architectural choices inherently balance security, performance, and framework conventions against one another. The questioner asks how Qodo reconciles these cross-cutting trade-offs if agents run strictly atomically without global visibility.
Sharma responds by drawing a parallel to how human engineering organizations handle pull requests. In a traditional workflow, no single reviewer holds complete, exhaustive knowledge of every concern simultaneously; instead, reviews rely on specialized domain roles:
- A senior software engineer evaluates idiomatic code usage, package dependencies, and whether a change fits team conventions. - A security specialist looks exclusively for hard-coded API secrets, injection risks, and credential leaks. - A compliance auditor verifies regulatory concerns such as change-logging under ISO or SOC 2 compliance frameworks.
Sharma points out that Qodo mimics this human division of labor by allowing architects, security leads, and compliance officers to input organizational guidelines and policy documents through a dedicated web portal. The context collector ingests these rules alongside PR history, extracts the relevant parameters, and provides them to the appropriate specialized agents and judge node. When an audience member asks whether uploading these guidelines is an explicit requirement for the customer, Sharma clarifies that it depends on organizational maturity: teams without formal written rules rely out of the box on indexed PR history, which surfaces implicit norms by observing what reviewers accepted or corrected in the past.
[23:22](https://www.youtube.com/watch?v=EcqMYoIV57A&t=1402s) Balancing Context Weights: PR History vs. Engineering Principles
An audience member presses on the challenge of balancing diverse inputs in the judge or jury node. They note that relying heavily on PR history could conflict with forward-looking engineering standards: an organization's existing merged pull requests might represent legacy practices, while new architectural principles and engineering guidelines mandate a completely different direction. If the jury node weighs historical merge patterns against newly minted engineering documentation, the priorities could be completely out of balance.
Nupur Sharma explains that evaluating code quality cannot rely on a single vantage point. The system avoids over-indexing on flawed past habits by ingesting context from multiple angles simultaneously, distinguishing between hard compliance rules, fatal errors, and soft recommendations. Each input source feeds into a dynamic weighting system that continuously adapts based on real developer interactions. As Nupur Sharma notes: “And every time your developer expect accepts a suggestion, it gets more weighted for the next one.” Conversely, if developers repeatedly reject a specific type of suggestion, the system downgrades that signal's weight in subsequent evaluations so the agent does not produce recurring, unhelpful noise.
```mermaid flowchart TD accTitle: Dynamic Weighting in Qodo Code Review accDescr: Feedback loop showing multi-source context feeding into a judge node that adjusts weights based on developer acceptance.
subgraph Inputs["Context Sources"] PR["PR & Merge History"] Doc["Engineering & Architecture Principles"] Comp["Compliance Portal & Rules"] end
subgraph Evaluation["Judging & Scoring"] Judge["Judge Node / Jury"] Weights["Dynamic Weight Index"] end
subgraph Action["Developer Interaction"] Rec["Review Suggestions & Bug Flags"] Dev{"Developer Action"} end
PR --> Judge Doc --> Judge Comp --> Judge Weights --> Judge Judge --> Rec Rec --> Dev Dev -->|"Accepted"| Weights Dev -->|"Rejected / Ignored"| Weights ```
- **Dynamic Weight Adjustments**: Suggestion weights are continuously indexed; accepted suggestions gain prominence, while ignored or rejected suggestions lose influence over time. - **Categorized Feedback Tiers**: The system classifies feedback into distinct categories such as hard compliance issues, critical errors, and optional recommendations, preventing soft suggestions from overriding vital checks.
---
[24:54](https://www.youtube.com/watch?v=EcqMYoIV57A&t=1494s) Enforcing Invariant Rules Against Bad Historical Habits
Addressing how the system stops historical bad habits from perpetuating themselves, Nupur Sharma details two specific indexing mechanisms. First, the platform tracks whether developers explicitly accept or reject proposed recommendations during live reviews. Second, it searches historical pull requests to see whether similar flagged issues were actually addressed and fixed in the past. This raises a common real-world dilemma: developers frequently justify poor practices simply because they are ubiquitous in the existing codebase. Nupur Sharma shares an anecdote about confronting an engineer who defended committing secrets: “For example some people are used to hard-coding their API keys and I literally had a tough argument with the developer but this is how we do it. No this is should this should not be the way.”
The questioner points out that just because a pattern repeatedly appears in the git history does not make it good practice, asking if explicit guidance must be supplied to override it. Nupur Sharma clarifies the boundary between flexible agent suggestions and rigid rule enforcement:
> “So if you provide them as a rule it will get highlighted doesn't matter if you want it or not.”
While general bug-hunting agents make probabilistic recommendations that can be down-weighted if a reviewer consistently ignores them across ten PRs, strict organizational rules and compliance policies completely bypass developer preference. They are enforced deterministically across every pull request regardless of past merge habits, ensuring foundational security and architectural guardrails cannot be eroded by bad historical precedents.
- **Dual-Track Evaluation**: - **Deterministic Rules & Compliance**: Enforced unconditionally across all code; cannot be down-voted or bypassed simply because past PRs violated them. - **Heuristic Bug Fixes & Suggestions**: Agents surface potential problems and learn from reviewer responses; if a reviewer repeatedly dismisses a heuristic across multiple reviews, the model reduces the priority of that specific warning pattern.
## Notable quotes > [11:49](https://www.youtube.com/watch?v=EcqMYoIV57A&t=709s) So maybe you give four tasks to the agent and somewhere down the line it focuses on two tasks. — Nupur Sharma
## Mentioned Nupur Sharma, Qodo, Anthropic, Claude Opus, LangChain, Jira, Model Context Protocol
## Video description Give an agent your full codebase and it will attend to the start and the end, then quietly drop the middle. Nupur from Qodo calls this the U curve and builds the whole talk around it: why growing the context window did not fix the problem, and what actually does. She runs through iterative retrieval, hierarchical summarization, and self correction with honest cost tradeoffs for each.
The second half covers the orchestration paradox: capable models burn most of their tokens deciding how to solve a problem rather than solving it. Her team's fix is an 80/20 split, using high reasoning models for open ended discovery and lighter deterministic models for validation. Qodo's code review architecture runs this live: a context collector feeds specialized agents, a judge node recombines the results and weighs them against PR history, and every accepted or rejected suggestion shifts the weights for the next run.
Speaker info: - https://www.linkedin.com/in/nupursh/
---
Watch along with the corrected transcript, summary, timestamps and resources on this talk's official AIE page: https://ai.engineer/talks/EcqMYoIV57A-why-more-context-makes-your-agent-dumber-and-what-to-do-about-it
Join our upcoming AI Engineer conferences (see https://ai.engineer landing page):
- AIEi Shanghai, November 5–6 — the first for meeting top Chinese labs and engineers - AIE CODE in SF, November 10–12 — the top AI Coding conference returns - AIEi Sydney, December 7–8 — the first AIEi run alongside NeurIPS 2026 in Sydney
---
[Source](https://www.youtube.com/watch?v=EcqMYoIV57A)