Skip to the content.

Managed-context continuous usage semantics

Program: managed-context. Issue: #1578.

Continuous usage means a user can keep working through a long agent run without becoming the context-window manager. fak may re-plan the resident view, page cold spans back in, reset a model trace, or route through a warmer cache path; the user-facing promise is that the objective, budget, assumptions, and evidence survive those moves in a form the user can inspect.

This is not a promise that every byte stays resident forever. It is a promise that a hidden context change is either behaviorally neutral or visible as a typed decision with evidence.

The Contract

  1. The objective stays stable. The pinned objective is carried across replans, resets, and session migrations by identity and digest, not by a model-authored summary. If the carried objective no longer matches what the user stated, fak surfaces an objective reconciliation outcome instead of treating the rewrite as continuity.
  2. The full history remains recoverable. The resident view is a bounded working set over a lossless store. A span that leaves the current view is cold, not forgotten. If a later turn needs it, the page-in path produces a typed page-fault outcome rather than silently pretending the span was never needed.
  3. A reset carries witnessed evidence. A reset transaction records the old trace, new trace, carryover seed digest, budget rearm, contributors, and omitted-span digests with reasons. A user or operator can ask what survived, what did not, and why.
  4. Budgets do not reset accidentally. Token, turn, context, clarification-query, and wall-clock budgets move forward across a hidden reset. Resetting the context trace does not mint a fresh runway or erase a spent one.
  5. Assumptions are scored before use. A context plan may rely on an assumption only after the assumption’s source and confidence clear policy. Low-confidence, stale, inferred, or unknown assumptions turn into a query or refresh action before they can support an effectful step.
  6. Memory promotion is separate from context survival. A fact can stay useful in current context without becoming durable memory. Durable promotion requires its own evidence; an unclassified observation defaults to expiring, not persisting.
  7. Cache state is never authority. Provider prompt-cache warmth can lower cost and latency, but it never decides whether a fact may be omitted. A cold cache is a pricing event, not a continuity failure.
  8. Relay mode is pointer-or-nothing. A relay leg may carry forward durable pointers, not a transcript summary. A load-bearing fact is either externalized and queryable by the next leg, or it does not survive the rotation.

What Fak Surfaces

The continuous-usage surface is a small evidence bundle, not a transcript dump:

Surface What it proves Code anchor
Pinned objective The active goal survived unchanged, or drift was detected ctxplan.ObjectivePin
Resident view plan Which spans are resident, which are elided, and why ctxplan.PlanView
Page-fault outcome Whether a cold span was served back in or refused ctxplan.PageFaultOutcome
Reset transaction What the reset carried, omitted, and rearmed session.ResetTransaction
Budget envelope Which budget axis is near exhaustion or exhausted session.Budget
Time budget How wall-clock time carries across resets session.TimeBudget
Assumption report Which assumptions can be used, queried, or refreshed ctxplan.AssessAssumptions
Promotion record Why a fact did or did not cross into durable memory memq.PromotionRecord

The intended product shape is simple: a long run can show the current objective, remaining budget envelope, active resident view, unresolved assumptions, last reset transaction, and recent memory-promotion decisions without asking the user to read the whole prompt.

Relay Mode: No Compaction

Relay mode is the stricter continuous-usage contract planned by the perpetual-sessions spine. It is not enforcement yet; it is the product promise future relay rungs must satisfy.

This is stricter than ordinary hidden reset continuity. A reset may carry a deterministic seed built from approved contributors; a relay rotation carries only the baton and the ability to query durable evidence. Model-written recaps are not a third state.

When Fak Asks Instead Of Guessing

fak should ask the user, or surface an explicit host decision, when the expensive error is a silent wrong assumption:

The opposite cases stay automatic: replanning the resident view under budget, serving a recoverable cold span, carrying the pinned objective intact, rearming the same remaining budget after a reset, and preserving cache affinity when it is only a cost optimization.

What The User No Longer Manages

The user should not have to say “summarize our context,” “keep that in the prompt,” or “remember that the old reset had my real goal.” Those are managed-context responsibilities:

What remains user-controlled is the actual objective, explicit facts, budget limits, pins, layout preferences, and any approval to promote or delete durable memory.

Operator Readout

After a hidden reset or long-run handoff, the minimum honest readout is:

objective: preserved | established | drifted
budget: turns/tokens/context/queries/time remaining
resident_view: selected=<n> elided=<n> page_faults=<served/refused>
assumptions: use=<n> query=<n> refresh=<n>
reset: old_trace=<id> new_trace=<id> seed_digest=<sha256> omitted=<n>
memory: promoted=<n> refused_or_expired=<n> ambiguous=<n>
cache: warm | cold | unknown (cost only)

That readout is the user-facing contract in one screen. If it cannot be produced from witnessed records, the system should say not yet rather than claim continuity.

See Also