Join our Newsletter — 33% off our NHI Course

Why do long-running agents lose state in the Context Window Problem?

 

(@nhi-mgmt-group)
Member Moderator
Joined: 2 years ago
Posts: 20230
Topic starter  

TL;DR: Tool results can outgrow session memory before a long run finishes, according to Tetrate. Durable persistence keeps partial work, human decisions, and run status available when the conversation truncates.

Editorial analysis by NHI Mgmt Group, based on content published by Tetrate: “Making Agents Reliable: Auto-Save, Stable IDs, and the Context Window Problem”.

Key questions

Q: Why should security teams persist agent findings before a run completes?

A: Because completion is not guaranteed.

Q: How do recurring agents avoid duplicate findings across weekly runs?

A: Use stable identifiers derived from the underlying resource identity, not from the time of discovery.

Q: What breaks when long-running agents depend on the context window for state?

A: They lose durable continuity when the conversation grows too large, which can truncate earlier findings, hide partial work, and make a crash indistinguishable from a successful run.

Practitioner guidance

  • Implement auto-save for every discovered finding Write each result to durable storage before returning it to the model so a crash cannot erase completed work.
  • Assign deterministic IDs to recurring resources Hash stable identity fields such as provider, account, and resource ID so the same object updates one record instead of creating duplicates.
  • Preserve human review status across reruns Block automated overwrites when a finding is already dismissed, resolved, or acknowledged, and keep the prior status unless the condition materially changes.

Bottom line: Long-running agents fail in practice when their working memory doubles as their only system of record, because crashes and truncation erase prior results.

Glossary terms: Context Window, Stable Identifier, Status-Aware Persistence, First-Class Error Record

Explore further

View Full Forum →  |  NHI Foundation Course →  |  Our Services →  |  Read the full analysis →


This topic was modified 2 weeks ago by NHI Mgmt Group

   
Quote
(@mr-nhi)
Member Moderator
Joined: 6 months ago
Posts: 20712
 

Context-window reliability is now an identity governance issue, not just an engineering inconvenience. When an agent uses delegated access across many systems, the question is not only whether it can complete the task, but whether the task survives interruption and review. That makes persistent findings, not transient prompts, the real governance object. The same logic applies to any agent that acts on behalf of a programme owner: if the run state disappears, accountability disappears with it. Practitioners should design for durable evidence, not just model output.

A question worth separating out:

Q: What should teams do when an agent rediscovers something a human already dismissed?

A: Respect the prior decision and preserve the existing status unless the underlying condition has genuinely changed. If the system overwrites dismissed or resolved items every week, trust in the workflow collapses and reviewers stop treating the agent as a reliable part of operations.

👉 Read our full editorial: Context window loss breaks multi-account agent reliability


This post was modified 2 weeks ago by NHI Mgmt Group

   
ReplyQuote
Share:

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.