You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b3ce2cf
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/architecture/rfcs/agent-loop-effect-interpreter-v0.md
+29-8Lines changed: 29 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
| Status | Accepted |
6
6
| Supersedes / closes | none |
7
7
| Date | 2026-08-08 |
8
-
| Last normative revision | 2026-10-01|
8
+
| Last normative revision | 2026-10-27|
9
9
| Author | LoopX maintainers |
10
10
| Scope | Public control-plane docs, packet contracts, refactor direction, test strategy |
11
11
@@ -464,8 +464,12 @@ The existing R5 CLI captures full decisions before projection, with a private di
464
464
465
465
#### Heartbeat and Turn Envelope convergence
466
466
467
-
Under existing M7.4 and roadmap S2/S3/S6/S8, converge the **execution facts**
468
-
used by heartbeat and Turn hosts, while keeping host effect ownership separate.
467
+
Under existing M7.4 and roadmap S2/S3/S6/S8, converge heartbeat and Turn
468
+
execution into **one governed work contract**, while keeping host effect
469
+
ownership explicit. The [controller/executor RFC](controller-executor-unified-contract-v0.md)
470
+
owns the complete schema/consumer migration and optional model-session split.
471
+
Its target replaces permanent quota/Turn views with one schema, full/delta
472
+
delivery and immutable recovery; this does not claim that cutover has shipped.
469
473
When an admitted Todo later waits on a timer, PR or capability, the typed
470
474
receipt owner preserves its original writeback and settlement route. Reentry
471
475
projects only that closeout, including for deferred work and after the wait
@@ -692,7 +696,7 @@ Continue in this order using the existing owners and checkpoints:
692
696
| Todo | Observable outcome and decisive acceptance |
693
697
|---|---|
694
698
| Reconcile execution/context requirements across heartbeat and TurnEnvelope | Same captured authoritative decision preserves actor/Goal/Todo, required full reads, claim/lease, action selection, replan/closure, conditional settlement and scheduler ownership. Inventory omitted/duplicated facts before deleting render branches. Include optional capabilities off, recall-only, ingest-only, stale binding and provider failure; private detail is accessed only through authorized references. |
695
-
| Adopt one typed projection in real host renderers| Heartbeat full/thin and Turn host consume the same execution facts and per-Turn capture/detail route. Keep host-specific notification and scheduler transport explicit. Real File/SQLite CLI plus packaged Codex App tests cover reentry, source loss, refusal before required reads, late results, backoff and exactly-once settlement; no second admission from a detail read. Retire the replaced projection only after its last caller moves. |
699
+
| Adopt one contract in real host entrypoints| Heartbeat full/thin and Turn host consume the same schema and per-Turn capture/detail route, with no permanent format-specific semantic views. Keep host-specific notification and scheduler transport explicit. Real File/SQLite CLI plus packaged Codex App tests cover reentry, source loss, refusal before required reads, late results, backoff and exactly-once settlement; no second admission from a detail read. Retire the replaced projection only after its last caller moves. |
696
700
| Qualify the context shape and migration default | Compare the same normal, replan, wait/recovery and optional-capability workloads against both current full and compact paths. Measure payload/model tokens, detail IO, latency, resource growth, omissions and decision/outcome quality. Keep data loss, duplicate effects, identity and settlement errors as hard constraints. Preserve supported saved prompts/receipts and reversible rollout; change budgets or defaults only with that evidence. |
697
701
698
702
**Context cost and projection convergence: next implementation slice**
@@ -712,13 +716,17 @@ The next slice stays within the existing three convergence acceptances above:
712
716
ordinary `quota should-run` input actually consumed by benchmark case solvers;
713
717
operator/control-plane and personal maintenance packets are secondary. The
714
718
shared projection delivers complete context on first use and exact changed
715
-
subtrees on supported warm turns. Solvers need not switch to TurnEnvelope.
719
+
subtrees on supported warm turns. Solvers retain their product entrypoint;
720
+
both old packet formats migrate to the single contract.
716
721
In-packet deduplication and cold-start reduction complement this work; a
717
722
succession of small cleanups must not substitute for qualifying the repeated
718
723
input path. A smaller stored capture or import cleanup proves no model saving.
719
-
2.**One projection owner, two transport consumers.** Extend the existing typed
720
-
interaction/work-context owner for full and delta context; quota and
721
-
TurnEnvelope consume it. Preserve original capture, required-source checks,
724
+
2.**One contract and one delivery mechanism across hosts.** Extend the existing
725
+
typed interaction/work-context owner for full and delta context. Replace
726
+
quota and TurnEnvelope output schemas with the unified schema; retain old
727
+
decoders only for identified migration readers and historical receipt replay.
728
+
Different host wrappers do not create different contract views. Preserve
729
+
original capture, required-source checks,
722
730
invocation, selection, settlement and detail routes. Python retains source IO;
723
731
hosts retain their effects and context-continuity observation. No independent
724
732
admission service, diff daemon or Python context-decision owner is needed.
@@ -763,6 +771,11 @@ App consumers, and their full fallback. A standalone diff helper is insufficient
763
771
| Turn adoption | Consume the same full/delta context owner while retaining Turn signatures and outer-executor effects. Host-only settlement execution remains distinct from a manual CLI agent's executable settlement obligations. |
764
772
| Choice of representation | Emit a delta only when it is smaller after binding/removal metadata. Otherwise emit full context. Do not truncate values or change source selection to meet a byte target. |
765
773
774
+
The surface-specific bindings below describe the existing delivery/migration
775
+
contract. They remain mandatory while those readers are active; C1–C9 of the
776
+
controller/executor proposal replaces both emitted formats. Historical captures
777
+
keep their original version and may never reuse a new-schema baseline.
778
+
766
779
**Source and change boundaries.** The shared `context_delivery_v1` presentation
767
780
covers whole quota packets, whole Turn envelopes and their common work context.
768
781
The surface is part of the existing Goal/Agent/session/epoch/capture binding, so
@@ -1742,6 +1755,14 @@ Example replacements:
1742
1755
1743
1756
## Semantic control and execution ownership
1744
1757
1758
+
The optional [controller/executor profile](controller-executor-unified-contract-v0.md)
1759
+
separates model responsibilities within these owners: the controller is the sole
1760
+
model-facing Core client; the executor exchanges natural-language work and
1761
+
artifacts under host-enforced scope. It is not the deterministic Turn Loop
1762
+
Controller. One Agent may bind those two roles without creating two competing
1763
+
work executors or a second authority. Single-session behavior remains available;
1764
+
role binding, result validation and total-cost qualification precede promotion.
1765
+
1745
1766
LoopX's semantic control plane preserves work meaning across Turns, Agents and
1746
1767
runtimes: intent, ownership, dependencies, authority, evidence and continuation.
1747
1768
Its execution responsibility covers the typed transactions and settlement
0 commit comments