Recovering Evidence After Agent Context Changes
Shorter history, filtered tool output and extracted fields leave different records behind.
An agent can save working space by shortening what it reads. The useful question is whether later work can still recover the constraints and evidence that the shorter version leaves out.
LangChain's October 13 engineering account describes ScaleDown middleware around an agent's main model. Sydney Runkle, Srimanth Tangedipalli and Neal Patel separate three operations: summarizing older messages, compressing tool results for a question, and extracting structured fields from user messages. Those operations produce different kinds of working context.
Consider a hypothetical support agent asked to explain a refund policy, but not issue a refund. It retrieves a long policy page, gathers an order number and continues after its conversation grows. A shortened excerpt might answer the policy question while leaving out an exception. A copied order number can help identify the case without granting permission to change it.
Different context operations leave different records
The article's summary middleware replaces older messages while keeping recent ones. Its tool middleware lets the model specify a compression question, then filters the tool output before the model sees it. The resulting note tells the model how to request the full output again. Extraction instead writes fields into agent state. Missing values remain absent rather than becoming a complete account of the conversation.
These recovery paths deserve separate attention. Requesting a policy page again depends on that source remaining available and retaining the relevant version. A compression notice alone does not preserve the original bytes. Our earlier summary review note asks whether resumed work inherits invented instructions or hides unresolved problems. This design adds a question about the particular operation: which source can still challenge the transformed context?
The linked integration documentation also describes system-prompt compression. It warns that this can drop instructions and condense Deep Agents' own harness guidance. Removing a permission limit from context could change what an agent believes it may do.
Continuing after a context service fails
Failure behavior differs too. The described summary shortcut keeps the existing history when the service call fails, and tool compression returns the original result. The linked middleware source says failed extraction leaves a previous extraction in state. In the support example, a customer's corrected order number could therefore require checking whether the stored fields were refreshed. Continuing the run does not establish that every derived value is current.
WTK describes agents and teams through catalog packages compiled for target runtimes. We would want the selected runtime's evidence to identify which context operation ran, which original input it used and whether recovery or fallback occurred. Our runtime configuration note explains why a declared control needs evidence from the setup that actually runs. That supports people setting goals and reviewing exceptions while agents continue within approved limits.
We have not evaluated this integration in WTK. Under WTK's research method, a changed middleware version, source-retention policy or target configuration would require renewed review of what the continuation record can support.
Source: Sydney Runkle, Srimanth Tangedipalli and Neal Patel, Building Long-Running Agents with ScaleDown and Deep Agents, LangChain, October 13, 2026. Linked documentation and middleware source inspected October 14, 2026.
Have an approach, result, or counterexample?
You may be asking the same question, or may already have a useful answer. Share published research, an implementation, a test, or an idea that could support, narrow, or challenge this work. Distinguish what you tested from what remains a hypothesis.
Contribute to this research question →Working with an AI assistant?
Ask your assistant to compare your approach with this record, identify supporting sources and limitations, and draft a contribution for your review. Verify its citations and remove private information before submitting. Reading this page does not authorize an assistant to submit feedback or share your conversation.
Submissions go privately to human review. Public referencing requires your separate permission; nothing is published automatically.