factfactfactanchorfactfactnewappend-only

Context from Tape

A unified fact model for long-running, multi-team work.
It also extends to observability, eval, and training.
Practiced in bub.build, view source

Explore
01

The Minimal Model

Four core primitives

TapeEntriesAnchorsIndexderivedViewExecutionnew entries
Tape
Chronological sequence of facts
Entry
An immutable fact record
Anchor
Logical checkpoint for state reconstruction
View
Task-oriented assembled context window
Invariants
01

History is append-only, never overwritten

02

Derivatives never replace original facts

03

Context is constructed, not inherited wholesale

02

Append

The sole operation that mutates facts — writing to the tape’s tail

WorkerTapeappend(entry_101)append(entry_102)append(correction_103)corrects 101; keeps 101[... 101, 102, 103]time
01

Order is trackable via monotonic IDs

02

Old facts cannot be modified in-place

03

Corrections are made by appending, not deleting

03

Anchor

A reconstruction marker, not a deletion point

e1e2A1discoverye4A2implemente6e7preservedrebuild from here
01

Full history preserved before the anchor

02

Rebuild from anchor, skip full scans

03

Anchors can carry structured state payloads

04

Handoff

A constrained phase transition

DiscoveryhandoffImplementhandoffVerifystate: { phase: "implement", summary: "Discovery complete." source_ids: [128, 130, 131], owner: "agent" }
01

Write a new anchor

02

Attach minimum inherited state

03

Shift execution origin past the new anchor

State Contract Example
{ phase: "implement",
  summary: "Discovery complete.",
  next_steps: ["Run migration", "Integration tests"],
  source_ids: [128, 130, 131],
  owner: "agent" }
05

Session Modeling

Defining the boundaries of context selection

A

Single Session

Entries share one timeline

Session Aturn 1turn 2turn 3turn 4...entries share one timeline
B

Multi-turn

Assembled from latest anchor

T1T2T3T4T5T6anchornot in default viewassembled on demand
C

Multi-session

Independent timelines; cross-session is opt-in

Session Atape A timelineSession Btape B timelineisolated by defaultexplicit cross-query(actively chosen)
D

Topic Threading

Each topic binds an anchor; repeats trigger recall

T1T2T3T1*anchor recallTopic View (T1)Topic View (T2)human and agent collaborate via organized anchors
06

Context Strategies

Three mechanism combos for compact, summary, and fork-merge

Compact

problemContext exceeds the window limit

e1e2e3e4e5e6e7e8...preserved, not in viewdefault read sethandoff + anchor + selective view

key:compact ≠ delete history; shrink default read set

Summary

problemNeed a high-level overview for the next phase

e128e130e132anchor.state"Discovery is complete."source_entry_ids: [128, 130, 131]nextraw entries (jump back)

key:Summaries cite sources; hints only

Fork / Merge

problemNeed parallel exploration with controlled convergence

Main TapeFork Tapefork(at id=120)120append121122123merge(new entries only)append delta only, no rewrite

key:Merge appends deltas only; no mainline rewrites

07

Memory

Complex memory assembled from anchor graphs

TapeAnchor GraphMemory Viewe101e102e103A1A2A3A4Viewassembledanchorsassemble
Why Complex
01

Anchors can form non-linear graphs, not a single timeline

02

Memory views assemble from multiple nodes, guided by policy

03

Graph structure requires explicit lineage and provenance

08

Teams

Teams coordinate via shared tapes and cross-tape views.

A

Shared Tape

Multiple agents append the same tape; entries keep their origin

Shared TapeAgent AAgent BAgent CA:201B:202C:203A:204append-only timeline

Append-only; ownership remains traceable

B

Cross-Tape View

Teams read each other's tapes via views to coordinate

Team ATeam BTape ATape BA1A2A3B1B2B3View from Tape BView from Tape Aviews assemble cross-tape context

Views are assembled; tapes remain isolated

09

Appendix

Three extensions: observability, eval, and training.

A

Observability

Tape can retain sessions, tool calls, and events for a replayable web timeline.

SessionTapeWeb UIanchormsgtooleventappend-only tracefilterssessiontooleventTimelineturn / tool / eventReplayinspect exact pathUsagetoken + anchor stats

The UI is a derived view; raw facts remain in the append-only tape.

refbub
B

Eval

Slice by anchor, replay history, inspect decisions, then write scores and labels back as derived facts.

Tape SliceHuman ReviewDerived Factsanchor A12tool / event / msganchor A13bounded by anchorshistory replaydecision checknotesappendscorelabelrationaleReplayhistory stays visibleCheckdecisions stay inspectableRecalllabels stay linked

Show the path and decisions to people first, then append derived annotations.

refPhoenix
C

Training / RL

Tape works with frameworks such as AReaL: slice by anchor, attach rewards, and export trajectories.

Agent RuntimeTapeRL Trainersession/starttool + event traceassistant turnsexportepisoderewardprovenanceProxy InputOpenAI-compatible runtimeAsync Updatetrain after enough episodesNext Sessionserve newer weightsepisode refresh / weight refresh

The training layer should consume tape exports, not replace tape as the raw record.

refopenclaw example
10

Conclusion

Placing context problems back into this model yields a stable research framework

01Define Factstape / append02Phase Boundariesanchor / handoff03Assembly Strategycompact / summary / fork-merge04Advanced Collaborationmemory / teams05Appendixobserve / eval / traina stable research framework