← Latest papers
🤖 machine learning

Toward Reliable Context Compression for Long-Horizon Agents: An Empirical Study of Execution Instability

This paper investigates the execution instability caused by recurrent context compression in long-horizon agents and proposes TRACE, a verifier-guided framework that optimizes compression prompts through boundary-local evaluation to enhance task performance and reliability without updating model weights.

Original authors: Guanghui Min, Liang Wu, Mayank Darbari, Chen Chen, Liangjie Hong

Published 2026-08-10
📖 6 min read🧠 Deep dive

Original authors: Guanghui Min, Liang Wu, Mayank Darbari, Chen Chen, Liangjie Hong

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 you are talking to a super-smart robot assistant that is trying to solve a massive, multi-step puzzle. To do its job, the robot needs to remember everything that has happened so far: the clues it found, the moves it made, the mistakes it corrected, and the goals it set. In the world of artificial intelligence, this memory is called "context." But here's the catch: robots have a limited "brain size" (a context window). If the story gets too long, the robot starts to forget things or gets overwhelmed. To fix this, scientists use "compression," which is like asking the robot to write a short summary of its long adventure so it can fit the whole story into its brain again.

For a long time, people assumed that if you just kept the most important facts in that summary, the robot would be just as smart as if it had read the whole story. But this new study suggests that's not quite true. It turns out that summarizing a robot's journey is like trying to navigate a city using only a map of the landmarks you've already passed, without remembering exactly which street you just turned onto. The robot might know what it did, but it loses its sense of where it is right now, leading it to get confused, repeat steps, or give up entirely. This paper explores why that happens and tries to build a better way to write those summaries so the robot stays on track.


The Problem: When Summaries Make Robots Forget Their Place

The researchers, working with AI agents that interact with software applications, discovered a sneaky problem with how these robots handle long tasks. When a robot's memory gets too full, it usually throws away the oldest parts of the conversation to make room for new ones. Sometimes, instead of just deleting old text, it replaces the whole history with a neat, condensed summary.

The team found that while these summaries sound great on paper, they actually make the robot's behavior much more unstable. It's like reading a book where the author suddenly skips to the middle of a chapter and says, "And then, the hero was happy." You know the hero was happy, but you don't know why or what happened right before that moment. Because of this, the robot starts to lose its "local position." It might think it needs to do a task it already finished, or it might get stuck because it can't remember the specific state of the world it left behind.

In their experiments, they saw that when robots used these summaries, they started doing "regressive exploration." This is a fancy way of saying the robot would try to re-do things it had already done, or get blocked because it forgot a crucial detail. Even worse, the robot became unreliable. If you asked it to solve the same puzzle twice, it might succeed the first time but fail the second time, simply because the summary made it slightly confused about where it stood. The study showed that this wasn't just about losing facts; it was about losing the flow of the action.

The Solution: TRACE and the "Boundary" Test

To fix this, the researchers invented a new framework called TRACE. Think of TRACE as a strict editor who doesn't just check if a summary sounds good, but actually tests if the summary works in real life.

Here is how TRACE works, using a simple analogy: Imagine you are training a dog to fetch a ball.

  1. The Old Way: You might just look at the dog at the end of the day and say, "Good job if it got the ball." But what if the dog got lost halfway through? You wouldn't know.
  2. The TRACE Way: Every time you stop to summarize the dog's path, you pause the movie. You rewind to the exact spot where you stopped. Then, you run two parallel movies:
    • Movie A (The Control): The dog continues with the full, unedited memory of the path.
    • Movie B (The Test): The dog continues, but this time it only has the new summary you just wrote.

TRACE watches both movies. If the dog in Movie B starts running in circles, barking at a wall, or trying to fetch a ball that's already in the basket, TRACE knows the summary is bad. It measures exactly how much "extra work" or "stuck behavior" the summary caused.

Using this method, TRACE doesn't just guess what a good summary looks like. It uses a "verifier" to compare different versions of the summary and picks the one that keeps the robot moving forward without getting confused. It's like a coach who says, "Okay, this summary made the robot try to open a door that was already open. Let's rewrite the summary to say, 'Door is open,' instead of just 'We are in the hallway.'"

The Results: Smarter Robots, Fewer Mistakes

The team tested this new method on a benchmark called AppWorld, which is like a video game where the robot has to use different apps (like a phone, a music player, or a bank) to complete tasks. They compared their new TRACE method against other popular ways of compressing memory.

The results were promising. The robots using the TRACE-optimized summaries:

  • Solved more tasks: They succeeded more often than robots using standard summaries or just deleting old text.
  • Were more reliable: If you asked the robot to do the task twice, it was much more likely to succeed both times, rather than failing the second time due to confusion.
  • Stayed efficient: They didn't need to take extra steps to fix their own mistakes.

One of the coolest findings was that the "rules" for writing these summaries, which the TRACE system learned using one specific robot model, actually worked well when they were given to a different robot model. This suggests that the method is learning a universal truth about how to keep a robot's memory useful, rather than just memorizing one specific robot's quirks.

What This Means for the Future

The paper doesn't claim to have solved the problem of long-term memory for robots forever. In fact, the researchers are careful to say that while TRACE is better than what we have now, it still isn't perfect. There is still a gap between using a summary and using the full, original history. However, this study is a big step forward because it changes how we think about the problem.

Instead of just asking, "Does this summary keep the important facts?" we now know we should also ask, "Does this summary keep the robot's sense of where it is right now?" By focusing on the moment a summary is created and testing how it affects the very next step, the TRACE framework offers a new, more reliable way to help our AI assistants handle long, complex adventures without getting lost in their own stories. It's a reminder that for a robot, remembering what happened is important, but remembering where it is in the story is what really keeps it moving forward.

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 →