Sakhanda Wire
NVDA $153.73 -1.54% MSFT $506.30 -2.26% GOOGL $280.09 -1.28% META $619.28 -1.14% AMZN $256.62 -0.44%
← Back to the news

Four harness mechanisms help agents retain context on long tasks

Long-running AI agents can fail when repeated tool calls fill the context window and push the original objective out of recent attention. The article presents the harness layer, rather than the language model itself, as the main place for addressing context overflow, goal loss and weak state management.

The first mechanism is budgeting: Deep Agents moves tool responses larger than 20,000 tokens to the filesystem and replaces them with a path and a 10-line preview. At 85% of the model window, older file-edit calls can also become pointers. Compaction then summarizes the conversation, while systems such as Claude Code preserve recent files and project rules. OpenAI’s Responses API and the Claude Developer Platform provide compaction at the API level.

A mutable todo file or similar note keeps objectives recent between summaries, although LangChain evaluations found that enabling todos is not always beneficial. Persistent memory can support later sessions, but an ETH Zurich study found context files raised inference costs by 20% to 23% in two benchmarks. The article says these mechanisms should be tested with forced compaction and goal-recovery evaluations, rather than assumed to work.

Written by Sakhanda Wire AI from reporting by MarkTechPost. Facts, quotes and full context are in the original article below.

Originally published by MarkTechPost on

Read the original on MarkTechPost ↗

The reporting and the image belong to MarkTechPost and are credited and linked above; the text on this page is Sakhanda Wire's own summary.

← Back to the news

More stories

All the latest news