Skip to content

ClosedWindowProcessor

reference
1 min readUpdated

Kind: Class

Source: atloria-monorepo/libs/agent-core/src/context/history-processors.ts

Deduplicates file views — keeps only the most recent read of each file. Older reads of the same file are replaced with a pointer.

Inspired by SWE-agent's ClosedWindowProcessor pattern.

Targets tools that read files: read_file, glob_search, grep_search. Identifies the file path from tool input, and for duplicate paths, replaces older outputs with "[Outdated — re-read in a later turn]".

Implements: HistoryProcessor

Methods

MethodSignatureReturns
processprocess(items: AgentInputItem[])AgentInputItem[]

Properties

PropertyType
nameany

Where it refuses work

  • ClosedWindowProcessor stops the work with an early return when indicesToElide.size === 0.
  • ClosedWindowProcessor stops the work with an early return when !indicesToElide.has(i).
  • ClosedWindowProcessor stops the work with an early return when parsed.path.
  • ClosedWindowProcessor stops the work with an early return when parsed.pattern.
  • ClosedWindowProcessor stops the work with an early return when pathMatch.

When something fails

  • ClosedWindowProcessor handles failure in 1 place: it turns it into a return value in all 1.

Was this page helpful?

Download as PDF