← Latest papers
🤖 machine learning

CORVUS: Context Optimization and Reduction Via Underlying Synchronization for LLM Coding Agents

CORVUS introduces a novel trajectory architecture for LLM coding agents that decouples file-read actions from their observations by maintaining a synchronized registry of current file contents, thereby eliminating stale snapshots and redundant re-reads to significantly reduce token usage and reasoning cycles while maintaining performance.

Original authors: Mingwei Zheng, David OBrien, Siwei Cui, Pardis Pashakhanloo, Rajdeep Mukherjee, Myeongsoo Kim, Sachit Kuhar

Published 2026-07-28
📖 7 min read🧠 Deep dive

Original authors: Mingwei Zheng, David OBrien, Siwei Cui, Pardis Pashakhanloo, Rajdeep Mukherjee, Myeongsoo Kim, Sachit Kuhar

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine a world where you have a super-smart robot assistant that can write computer code, fix bugs, and build entire software programs just by talking to you. This isn't science fiction; it's the reality of "LLM coding agents." These are artificial intelligence models that act like junior developers: they think about a problem, look at files, make changes, and check their work. But here's the catch: these robots have a very short-term memory problem. To remember what they've done, they keep a running diary of every single thought, action, and result. The more complex the job, the longer this diary gets. Eventually, the diary becomes so massive that the robot gets confused, forgets the most important details, and starts making silly mistakes because it's trying to read a 500-page book just to remember what it did five minutes ago. This phenomenon, where too much information makes the AI dumber, is called "context rot."

Enter CORVUS, a clever new system designed to fix this memory mess. Instead of letting the robot's diary grow uncontrollably with old, outdated notes, CORVUS acts like a magical, living library. It realizes that code changes all the time. If the robot reads a file, then edits it, then reads it again, the old note in the diary is useless junk. CORVUS stops the robot from writing down the file's content every single time. Instead, it keeps a "synced list" of the files the robot needs. Before the robot makes a new decision, CORVUS quietly checks the actual computer files, grabs the very latest version, and hands it to the robot. This way, the robot always has the freshest, cleanest information without a diary bloated with duplicate, stale pages. The result? The robot works faster, costs less to run, and makes fewer mistakes, all while keeping its memory light and focused.

The Problem: The "Stale Snapshot" Trap

To understand why CORVUS is a big deal, we first need to look at how these coding agents usually work. Imagine you are trying to fix a leaky faucet, but you are doing it while wearing a blindfold, and you can only see the room through a series of photos you took earlier.

In the traditional method, every time the agent (our robot) looks at a file, it takes a "snapshot" of that file and pastes it into its history log. If the file changes later—because the robot edited it, or because a human developer came in and tweaked it—that old snapshot in the log stays exactly the same. It becomes stale.

The paper's authors found that this creates two major headaches:

  1. Duplicate Reads: Because the old snapshot is buried deep in a long history, the robot often forgets it already looked at the file. It reads the file again, takes another snapshot, and pastes it in. This is like reading the same page of a book five times because you lost your place. In their tests, they found that 26% of the time, the robot was re-reading files it had already seen.
  2. Stale-Context Errors: Even worse, the robot might try to edit a file based on an old snapshot. Imagine the robot sees a line of code that says "Line 10: Turn on the light," but in the real world, that line was deleted five minutes ago. The robot tries to edit "Line 10," fails, gets confused, and has to spend extra time and energy figuring out what went wrong.

The old way of fixing this was "reactive." It's like waiting until your backpack is so full of rocks that you can't lift it, and then trying to throw some rocks out. The paper argues this is too late. The real solution is to stop putting the rocks in the backpack in the first place.

The Solution: The "Living Sync"

The authors propose CORVUS (Context Optimization and Reduction Via Underlying Synchronization). Think of CORVUS not as a diary, but as a live feed.

Instead of pasting the content of a file into the history log, CORVUS uses a special tool called sync_file. When the robot says, "I need to look at speech_recognition.py," CORVUS doesn't copy the text into the log. Instead, it puts a tiny, lightweight note in the log that says: "Sync: speech_recognition.py."

Behind the scenes, CORVUS maintains a Synced File Set. This is a special list of files the robot is currently working on. Before the robot makes any new decision (every single reasoning cycle), CORVUS performs a quick "Context Sync." It goes to the actual computer, grabs the current, latest version of every file on that list, and injects it into the robot's prompt.

This changes everything:

  • No Duplicates: The robot never sees two versions of the same file. It only sees the one, current version.
  • No Stale Data: If a file changes, the next time the robot thinks, it gets the new version automatically. It never tries to edit code that doesn't exist anymore.
  • Lighter Weight: The history log stays small because it only contains the robot's thoughts and actions, not massive blocks of file text.

What They Found: Faster, Cheaper, Smarter

The researchers tested CORVUS on two tough coding challenges: SWE-POLYBENCH_VERIFIED (which includes Java, JavaScript, and TypeScript tasks) and SWE-BENCH PRO (which features complex, enterprise-level problems). They ran these tests on four different powerful AI models, including CLAUDE SONNET 4 and QWEN3-CODER-480B.

The results were impressive, showing that keeping the context fresh makes the AI significantly more efficient:

  • Less Wasted Reading: CORVUS cut down on duplicate file reads by 22% to 86%. The robot stopped wasting time re-reading files it already knew.
  • Fewer Steps: Because the robot wasn't getting confused by old data, it finished tasks faster. The number of reasoning cycles (steps) dropped by 15% to 37%. For example, on one model, the steps went from an average of 45.03 down to 28.22.
  • Shorter Prompts: The final "prompt" (the message sent to the AI to finish the job) was 15% to 32% shorter.
  • Money Saved: Since AI costs money based on how much text it processes, these savings added up. On some tasks, the cost dropped by up to 50.28%. For instance, a task that cost $5.27 dropped to $2.62.
  • Speed: The whole process finished up to 40% faster in terms of total time.

Crucially, the paper notes that the robot didn't get dumber by having less text to read. The success rate (how often it fixed the bug correctly) remained comparable to the old method, and in some cases, even improved slightly.

The Big Picture

The authors also checked if CORVUS works with other methods that try to clean up messy histories. They found that CORVUS and these "reactive" cleanup tools are best friends. CORVUS stops the mess from happening at the source (upstream), while the other tools clean up whatever remains (downstream). When used together, they saved even more tokens and money.

In short, CORVUS suggests that for AI coding agents to be truly efficient, they shouldn't just be good at remembering the past; they need to be good at staying connected to the present. By decoupling the action of "reading a file" from the "content of the file," and instead keeping a live sync with the codebase, we can build agents that are faster, cheaper, and less prone to the confusion of "context rot." The paper doesn't claim this solves every problem in AI, but it does show that a simple structural change—swapping a static diary for a live feed—can make a huge difference in how well these digital assistants work.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →