AIOS Proresearch
AIOS Intelligence System · Research Overview

Part II · Context, Memory, Files, and Composition

Continuous Context Optimization and Deliberate Compression

Long work stays coherent by composing a fresh view from durable ground each time, not by growing one transcript until it must be summarized. Different uses get different levels of detail, with losses named and exact sources still reachable.

Continuous context optimizationDeliberate compressionEmergency compressionMeaningful absence

1. The central distinction

AIOS distinguishes:

The goal is to remove dependence on the first, make the second normal, and govern the third explicitly. Imported transcripts and legacy streams may still require emergency compression, but that compression remains a provisional projection with visible loss and a route back to source. It does not silently become a canonical source or artifact or acquire accepted standing.

Continuous recomposition is how a distributed intelligence system can remain coherent without one central prompt or memory object. Human purpose sets the bearing; local files and relationships preserve continuity; the present cognitive movement determines the active resolution; the model performs bounded judgment; and reintegration changes the durable ground for what follows.

2. The spiral, not the scratchpad

A conventional long-running agent often behaves like this:

prompt
  → output
    → observation
      → append to history
        → reread growing history
          → compress when context pressure becomes severe

AIOS instead aims for:

durable ground
  → compose current situation
    → perform one judgment
      → integrate useful semantic product and delta
        → refresh durable ground
          → compose the next situation from what now matters

Recomposition replaces transcript accumulation

AIOS renews context from integrated durable ground after each judgment instead of extending history until pressure forces an emergency summary.

flowchart LR subgraph T["Transcript accumulation"] T1["History"] --> T2["More history"] --> T3["Pressure"] --> T4["Emergency summary"] end subgraph A["AIOS continuous recomposition"] A1["Durable semantic ground"] --> A2["Purpose-shaped capsule"] A2 --> A3["Judgment and delta"] A3 --> A4["Integrated artifact and memory"] A4 --> A2 end
Continuous context optimization · canonical07-continuous-context-optimization-and-deliberate-compression--m01.mmd
Text equivalent

History → More history; More history → Pressure; Pressure → Emergency summary; Durable semantic ground → Purpose-shaped capsule; Purpose-shaped capsule → Judgment and delta; Judgment and delta → Integrated artifact and memory; Integrated artifact and memory → Purpose-shaped capsule.

The upper path is a tape whose only relief is reactive shortening. The lower path is a loop: a purpose-shaped capsule produces a judgment and delta, their useful consequences land in artifacts and memory, and the next capsule is composed from that changed ground.

The loop spirals because each pass returns to changed ground. It does not simply move forward along a tape.

3. What “always optimized” can responsibly mean

“Always optimized” should be interpreted as a design discipline, not an absolute guarantee.

It means:

It does not mean:

The claim should be tested as a comparative system property: does continuous recomposition produce better long-horizon work than reactive history management?

4. Use-shaped compression

One universal summary cannot serve all future judgments. AIOS instead defines different projections for different uses.

CompressionPreservesIntended use
Resumption accountCurrent state, last consequential change, decisions, open lines, next movementReturn after interruption
Decision accountAlternatives, evidence, criteria, rationale, dissent, authority, reopen conditionsReconsider or apply a decision
Delegation accountParent purpose, accepted ground, source grant, scope, limits, return needCommission independent work
Artifact accountPurpose, audience, architecture, contribution of parts, outstanding repairsCompose, edit, or review a document
Audit accountProvenance, authority, changes, sources, revisions, supersessionVerify or investigate
Promotion accountRecurring method, evidence, scope, counterexamples, future effectReview reusable knowledge
Navigation accountHigh-level objects, relations, status, and descent pathsOrient without opening everything

Each is a projection of the same durable situation, not a competing canonical account.

5. Compression integrity

Consequential compression should preserve:

It should also include two explicit controls.

Loss statement

What nuance, detail, examples, argument, or minority evidence did the compression omit?

Re-entry condition

When must the exact source or deeper layer be loaded again?

Example:

loss_statement:
  - exact interview wording
  - two weak counterexamples
  - full chronology of the decision discussion
reentry_when:
  - a claim is quoted publicly
  - the audience segmentation assumption is challenged
  - the decision is reopened

6. Multi-resolution context

Six levels of recoverable context

Judgments can move from one-line bearing to exact sources and full lineage, with lower-level evidence correcting the compressed views above.

flowchart TB L0["L0 — One-line bearing"] L1["L1 — Situation or resumption brief"] L2["L2 — Project / artifact / decision account"] L3["L3 — Movement map and selected evidence"] L4["L4 — Exact source or artifact prose"] L5["L5 — Full lineage and operation evidence"] L0 --> L1 --> L2 --> L3 --> L4 --> L5 L5 -. "supports and corrects" .-> L4 L4 -. "updates" .-> L3 L3 -. "updates" .-> L2
Deliberate compression · canonical07-continuous-context-optimization-and-deliberate-compression--m02.mmd
Text equivalent

L0 — One-line bearing → L1 — Situation or resumption brief; L1 — Situation or resumption brief → L2 — Project / artifact / decision account; L2 — Project / artifact / decision account → L3 — Movement map and selected evidence; L3 — Movement map and selected evidence → L4 — Exact source or artifact prose; L4 — Exact source or artifact prose → L5 — Full lineage and operation evidence.

The downward ladder adds resolution rather than authority. The dotted return paths make compression revisable: exact prose or lineage can correct a movement map, which can then update the project, artifact, or decision account used at higher levels.

The active level is chosen by the judgment:

Optimization is therefore partly a resolution-selection problem.

7. Context expansion and contraction

The context field should breathe with the work.

Contract when

Expand when

Depth, aperture, ground, condition, artifact scale, risk, and judgment form can all influence the expansion policy.

8. Relevance is temporal

Material can become stale without becoming false.

Foreground standing should decrease when:

Staleness should trigger review, a visible label, or omission from routine context. It should not silently rewrite meaning.

9. Attention ecology

Continuous optimization requires different attentional regions.

RegionFunctionInclusion behavior
ForegroundOne active judgment or tightly related setIncluded at required detail
Near backgroundDependencies, open decisions, likely next bearingsSelectively included or prepared
Durable backgroundAccepted ground and sources retained for later useRetrieved by relevance and standing
Parked fieldUnresolved material with re-entry conditionsOmitted until trigger bears
Superseded fieldLineage that no longer governsOmitted unless history or comparison matters
Released materialTemporary context intentionally not retained for routine recoveryRecovered only from source or archive if still available

Recency is one signal. Purpose, dependency, risk, contradiction, and open commitments usually matter more.

10. Parking is an optimization operation

A durable branch should record:

Parking prevents every unresolved thought from occupying the foreground while preserving an honest path back.

11. Purposeful forgetting

Forgetting is not indiscriminate deletion. It is governed removal from expected future attention.

Level 1 — Release from foreground

The material remains near and easy to compose but no longer competes with the active line.

Level 2 — Dormancy

Only a compact identity and re-entry condition remain in routine navigation.

Level 3 — Archival custody

Exact sources remain available, while temporary summaries, annotations, or process material are no longer maintained.

Level 4 — Deletion

Exact content is removed only under explicit person authority with known provenance and recovery consequences.

Contrary evidence, decision rationale, source custody, and the only lineage of accepted ground should not disappear merely to save context.

12. Predictive preparation without contamination

The system can prepare likely next-turn materials in an anticipatory runway:

The runway remains non-authoritative. Fresh input must validate object continuity, fit, currency, authority, and contraindications. If the person moves elsewhere, the preparation can be discarded without contaminating accepted ground.

This separates low-latency preparation from hidden decision-making.

13. Comparison with common strategies

StrategyStrengthFailure at long horizonAIOS response
Full transcriptComplete local process historyNoise, scale, recency bias, poor standingPreserve results and reconstruct situation
Rolling summaryCompact and simpleOne projection becomes universal; loss hiddenUse-shaped projections plus loss/re-entry
Generic retrievalBroad source accessSimilarity is not relevance, authority, or altitudePurpose-shaped selection and standing
Large memory profilePersistent personalizationCan overfit or harden stale assumptionsScoped, revisable, evidence-linked memory
Autonomous scratchpadSupports multi-step workHidden state, difficult audit, fragile restartDurable files, bounded seats, explicit returns
Manual briefingOften high qualityHigh user reconstruction costCompose from durable semantic records

14. Optimization metrics

Context optimization should be measured across more than token count.

Relevance

Fidelity

Continuity

Efficiency

Adaptivity

Outcome quality

15. Falsifiable predictions

The model predicts that, relative to transcript continuation and generic retrieval:

  1. long-horizon work will require fewer user restatements;
  2. decisions will retain more rationale and reopen conditions;
  3. contradictory evidence will be less likely to disappear during summarization;
  4. local edits will exhibit fewer unrelated changes;
  5. resumption after model or session change will be more accurate;
  6. context size can remain bounded without equivalent loss of project coherence;
  7. failures will be more diagnosable because context selection and source descent are inspectable.

These predictions can fail. For example, the overhead of maintaining semantic state may exceed its value for short or weakly structured work. The research program should identify that boundary.

16. Relation to the whole

Context composition defines what one bounded movement needs. Continuous optimization defines how that ground stays usable as the work grows. It depends on memory ecology to preserve exact sources, accepted results, temporal state, and open branches outside the active window. It also depends on reintegration: if a result is not given an honest standing and durable landing, the next context must reconstruct the work or inherit a misleading summary.

The chapters therefore describe one loop rather than three context techniques:

compose from durable ground
  → perform one bounded movement
    → review and reintegrate its result
      → compose again from the changed whole

The Context Composition research brief provides the nearest evidence on effective context, interference, memory policy, and system scaffolding. It does not validate continuous optimization as an integrated system.