Operations
Long-Running Agents Accumulate Context Debt
Intermediate results, repeated instructions, tool payloads, and stale state can crowd out the evidence an agent needs to complete extended work.
An illustrative reporting agent prepares a monthly operating review. It queries finance, CRM, support, and the data warehouse; compares this month with prior periods; investigates material changes; drafts explanations; collects owner comments; and revises the report over several days.
By the third revision, its context contains raw query results, discarded hypotheses, repeated instructions, old owner comments, and the current draft. The most important correction—a finance owner rejecting the original revenue explanation—competes with everything that came before it.
Long-running agents accumulate context debt when temporary execution material becomes permanent reasoning input.
The context window is a working surface, not the system of record
Keeping every intermediate result in the model context feels safe because nothing is lost. In practice, relevance declines as the run grows. Large tool outputs consume tokens. Old instructions conflict with new decisions. Repeated summaries introduce small distortions.
The workflow needs several storage roles:
Working context contains the current objective, relevant evidence, constraints, and immediate state.
Durable task state records completed steps, owners, approvals, deadlines, and unresolved exceptions.
Evidence storage retains raw source results and stable references for audit or reinspection.
Deliverable state contains the current report and its reviewed changes.
Moving material out of the prompt does not mean deleting it. It means storing it where the runtime can retrieve it deliberately.
Compaction should preserve decisions, not merely shorten text
A generic conversation summary may retain the topic while losing the fact that matters operationally: who rejected an explanation, which source replaced it, and whether the correction applies to one metric or the entire report.
A useful compaction record is structured:
- current goal and deadline;
- completed checkpoints;
- accepted and rejected findings;
- authoritative source references;
- owner decisions and timestamps;
- open questions;
- permitted next actions; and
- links to raw evidence.
The agent can reload full records when a later step requires them. The compact state remains small because it represents decisions, not every token that produced them.
Any long-running workflow needs explicit answers to three questions: what remains in model context, what moves to external state, and what evidence can be recovered later. Compaction, subtask isolation, and progressively loaded instructions are mechanisms for enforcing those choices, not substitutes for them.
Subtasks need isolation and a shared contract
The reporting workflow can separate finance variance analysis, sales pipeline changes, and support-volume analysis. Each subtask receives only the systems, definitions, and period relevant to its work.
Isolation reduces interference, but it creates an integration problem. The results need a shared schema: metric identifier, period, value, comparison, explanation, confidence, source references, and unresolved issues.
Without that contract, the coordinating agent receives three polished narratives that use different definitions and cannot be reconciled reliably.
Kyvera addresses the context side of this problem by keeping knowledge ready for the role, task, decision, and workflow as the business changes. Fabria addresses the tools and workflow path. Long-running execution needs both: selected knowledge and controlled state transitions.
Context debt has an operating cost
External state introduces storage, retention, and access-control decisions. Compaction can omit a detail that later becomes important. Subtask isolation increases orchestration complexity. Reloading evidence can add latency.
The operating team should measure those tradeoffs rather than assume that a larger context window solves them. Useful signals include context size by stage, repeated retrieval, compaction corrections, resume failures, evidence reloads, and cost per accepted report.
Some work should pause rather than compact. If reviewers fundamentally change the report’s objective, starting a new version with an explicit handoff may be safer than asking the agent to reinterpret a long history.
Finish with a record another run can trust
The final report should retain its source period, definitions, reviewer decisions, evidence references, and unresolved caveats. Next month’s agent can use that accepted artifact as a comparison without inheriting the full execution debris that created it.
Context debt appears when the system confuses memory with accumulation. Long-running agents need a maintained working set and a durable operating record—not an endlessly growing prompt.