Repository navigation
fix: active memory recalls stale history in large sessions - #149180
fuller-stack-dev merged 17 commits into
Conversation
Rebuild the request-boundary fix against current main while preserving Codex projection behavior and existing timeout semantics.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 16, 2026, 2:19 AM ET / 06:19 UTC (Revision 13). ClawSweeper reviewWhat this changesThe PR ties Active Memory recall to the admitted request across Codex prompt rebuilds and runtime refreshes, documents the optional hook fields, and adds request-boundary and Goal persistence regressions. Merge readiness⛔ Blocked before merge - 2 items remain The repair remains necessary, and the integrated patch has no actionable correctness findings. The previous merge conflict is resolved, and retained runtime evidence supports the changed behavior. Priority: P2 Review scores
Verification
How this fits togetherActive Memory enriches an agent's prompt with relevant memories before the agent replies. The Codex adapter prepares conversation history and supplies the current request separately so historical text does not drive recall. flowchart TD
A[Admitted user request] --> B[Transcript recorder]
C[Conversation history] --> D[Codex prompt preparation]
B --> D
D --> E[Prompt hook]
E --> F[Active Memory intent and request reuse]
F --> G[Memory context or intentional skip]
G --> H[Agent reply]
Decision needed
Why: The matching PR body retains this hold; a clean source review cannot grant the supervising maintainer's release. Before merge
Agent review detailsSecurityNone. PR surfaceSource +53, Tests +451, Docs +12. Total +516 across 13 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep request identity with the transcript recorder and carry it through the existing hook while preserving legacy producers, configured recall modes, and authorization scopes. Do we have a high-confidence way to reproduce the issue? Yes: current main feeds reconstructed prompts into recall intent and query construction, and the discussion records a failing producer-to-hook challenge. This review inspected that path without executing it. Is this the best way to solve the issue? Yes: explicit recorder-owned request data repairs the producer/consumer boundary without parsing user-controlled envelope markers or introducing a truncation policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7b47d7a65a17. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (12 earlier review cycles; latest 8 shown)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Taking over the request-boundary repair and its validation. I will preserve the existing contributor commit and credit Sergio Cadavid (@sercada, #147193) and @lordratner for this follow-up. I independently reproduced the defect before reading this diff, on canonical
The follow-up challenge passes actual Codex producer events to the registered Active Memory hook. It also reproduces unwanted recall during runtime refresh and for empty/image-only input. I am comparing those cases against this exact PR head, including deterministic trigger lookup reuse, before making the narrow corrections. The These are controlled producer/hook boundary tests, not a claim of authenticated model execution. Exact-head green and runtime integration evidence will follow. |
Keep one recorder-owned input representation through prompt rebuilds, preserve no-recorder behavior, and separate deterministic recall reuse by admission identity. Handle lazy recorder resolution and message-less host refresh continuations without expanding plugin parameters.
|
Appended the reviewed correction at The registered producer/consumer challenge now passes runtime refresh, lazy/no-recorder input, empty/image-only admission, normal-to-refresh mixed-media reuse, and independent equal-text identity. All 18 boundary assertions and 302 scoped regressions pass; focused test types and changed-file lint pass. Autoreview has no P0–P2 findings. Inspected synthetic red/green observations and the artifact manifest are linked in the Evidence section. These use controlled native transport/helper results and do not measure real model/search speed. Combined Gateway proof and required exact-head CI remain pending. The independently reproduced legitimate queue contention stays in #99105. |
Reuse the existing reply callback when clearing its target and normalize the packing fixture resolver input before selecting its synthetic config.
|
Resolution of the two items in ClawSweeper Revision 11, reviewed at exact head
Selected synthetic observations, copied from the linked artifact JSON: {
"baseSource": "1349c4c5420c1f0853f83ad6e0a35ab9db6b8791",
"base": [
{
"clause": "registered-producer-challenge",
"scenario": "refresh",
"helperStarts": 1,
"lookupStarts": 2
},
{
"clause": "trigger-independent-admission",
"searches": 1
}
],
"correctedTree": "8afe736383297f302a5072141b4eb91ae6395133",
"corrected": [
{
"clause": "registered-producer-challenge",
"scenario": "refresh",
"helperStarts": 0,
"lookupStarts": 1
},
{
"clause": "trigger-independent-admission",
"searches": 2
},
{
"clause": "normal-to-refresh-recall",
"helperStarts": 1,
"searches": 1
}
]
}The review reports no actionable patch correctness or security finding. The two readiness concerns are adjudicated as above; required exact-head CI and native preparation remain mandatory. |
Adopt the canonical resolver mock from PR openclaw#149726 while retaining all packing assertions.
|
Merged via squash.
|
…149180) * fix(active-memory): keep recall scoped to admitted request Rebuild the request-boundary fix against current main while preserving Codex projection behavior and existing timeout semantics. * fix(active-memory): retain admitted requests through runtime refresh Keep one recorder-owned input representation through prompt rebuilds, preserve no-recorder behavior, and separate deterministic recall reuse by admission identity. Handle lazy recorder resolution and message-less host refresh continuations without expanding plugin parameters. * test: preserve refresh assertions during integration * fix(sessions): reuse the selected Goal entry for identity snapshots * fix(ci): repair reply callback and planner fixture contracts Reuse the existing reply callback when clearing its target and normalize the packing fixture resolver input before selecting its synthetic config. * test(ci): align extension packing fixture with canonical repair Adopt the canonical resolver mock from PR openclaw#149726 while retaining all packing assertions. * test: retain canonical Goal and UI CI repairs --------- Co-authored-by: Sergio <[email protected]> Co-authored-by: Jason (Json) <[email protected]>
Closes #88077
What Problem This Solves
Active Memory can treat reconstructed history as the current request, starting stale or repeated recalls when Codex rebuilds a large conversation or refreshes its runtime.
This retains two Goal regressions for a canonical CI blocker: an edit reread the selected session row and exceeded the existing three-read ceiling after final-row certification was added. Canonical now supplies the Goal and UI production corrections and the planner fixture repair. Their original corrections and proof remain in the append-only history.
User Impact
Recall follows the admitted user request through prompt rebuilds. Independent requests remain distinct even when their text matches. Empty or image-only admissions do not borrow a historical request.
Why This Change Was Made
Codex carries one recorder-owned text representation and admission ID through normal preparation and refresh. Active Memory uses those facts for intent, query construction, and both model and deterministic request reuse. Legacy producers retain their existing prompt behavior; no-recorder Codex input keeps its plain text without inventing an admission ID. Authorization and project scopes remain part of reuse.
The canonical Goal correction reuses the selected entry already validated in the same write reservation. It retains sibling identity reads, current-authority checks, final-row certification and receipt behavior; the read ceiling is unchanged.
This retains Sergio (@sercada)'s original contribution, including precursor #147193, and Seth Ratner (@lordratner)'s PR work. Corrections and canonical updates are appended to the existing history. The separate queue capacity repair #99105 is merged as
03b0a5b8ab9fefde4863e17e6b40bfdbe6ebfafeand is incorporated here.Evidence
Merged through the ordinary native squash workflow as
5d7f6690c5a64b680388a3bfa03d58937d5138e7, with sole parent199039e7d5ff4d5bcdcc7b8ccd700a55e861b41cand verified treec94cd1201c5c44802dbded889ecfbbb410d706ab. Exact prepared-head CI and required gate passed before the maintainer released the merge. The original 13-path patch replays unchanged onto the actual parent to produce the landed tree. All 12 input blobs remain exact; the Goal test combines the two unchanged added regressions with later canonical assertions. The changed full-index hash reflects that canonical composition. The valid GitHub-signed commit retains lordratner as author and Sergio and Jason as coauthors. Native completion receipt.The first native admission stopped before any intent or merge request when its PR/main observations changed. After process and lock reconciliation, the authorized resumed admission made one squash request and completed with exit 0. Local preparation branches and worktree were removed. The contributor's fork branch remains at the prepared head because native deletion was permission-denied; its native outcome retains pending remote cleanup. No deletion retry or additional merge was attempted.
Prepared head:
ef759eaa380ade7f04353ab463a4cd31f680154a, signed server merge with ordered parents701309b98ee38bca77078262df8ff01e5228213band canonical9b73eb1e90be09ebb888f6b854670b5bc407f311. The signed alignment child701309b9extends priord86b34fcand adopts only the exact canonical Goal and UI whole blobs. Prepared tree isbfe358b5a45edc3d039f405500d5fcb103d7b02a, with 13 changed paths: the original 12 input paths and the Goal regression test, all unchanged fromd86b34fc. Goal/UI production and the planner fixture now match canonical and are absent from the authored delta. Root verified canonical932846b5production with the retained Goal tests, 14/14 total including the two added regressions, and full type-aware UI lint with the unchanged 700-line limit. The matching adoption received scoped-clean P0-P2 review. Both input and reply refresh assertions survive, and memory production bytes remain those reviewed/proved at8633baaaa11d35063b545837e34168659bd14594. Canonical #149661 zero-hit synchronization and contributor ancestry remain intact. Historical proofs keep their original revision labels.Canonical red observations, original PR challenge, and corrected green observations. Artifact manifest. Signed artifact links expire September 22; retained source evidence can be republished.
All 18 boundary assertions and 302 scoped regressions pass. A genuine mixed-media admission with different normal/refresh transport prompts performs one helper and one search. Independent equal-text admission IDs perform two searches; empty/image-only cases perform neither helpers nor lookups.
Focused test types and changed-file lint pass. Autoreview reports no P0–P2 findings. Reviewed memory production bytes remain unchanged. Later test changes are the mechanical assertion relocation and canonical zero-hit synchronization described above. Original capture revisions and limits remain attached to their proof.
Combined real Gateway and Control UI proof: the independent source-blind validator passes all four contract clauses. A genuine recall starts one helper; later arithmetic starts none despite recall history. Helper timeout preserves the peer and both requests complete. The comment includes a reduced raw excerpt, reports, manifest and inspected browser recording for combined tree
9e94735e3724d33d801c4cc4c32f3e68251400e1, containing reviewed input head8633baaaa11d35063b545837e34168659bd14594, whose memory production bytes are preserved in the current head; both independently reviewed refresh assertions remain present.The focused producer/hook evidence and combined Gateway/browser proof use controlled native protocol and provider fixtures. They do not measure live authentication, model quality or memory-search speed. The later canonical bounded SQLite reader is not validated at its cutoff/error boundaries by these historical captures, and they do not measure fresh startup latency. Source/caller/dependency impact was assessed before this append-only refresh.
Canonical lint repair #149423, fixture repair #149558, CI packing repair #149652 and planner fixture repair #149726 are incorporated, along with canonical Goal/UI adoption. The prepared-head CI for
ef759eaacompleted SUCCESS, including required gate104688781521. Authorized nativeprepare-run 149180completed on this unchanged head using the hosted gate; source push was skipped. Historical CI35059118811 for9c727724completed SUCCESS, with required gate104679161733 directly verified at 2026-09-16T05:39:01Z. Preparation and the released squash merge are complete. Source/caller impact was assessed through the actual parent199039e7. Later canonical Goal bookkeeping retains same-generation authority and final-row certification; thinking-profile reuse and optional transcript-list preparation preserve the retained fixture inputs. The loader resolver returns the same capability context, and the iMessage and worker-desktop changes are outside the exercised fixture paths. The unchanged authored patch produces the verified landed tree. The retained combined fixture uses fresh isolated state, text-only chat requests and the codex/active-memory/memory-core allowlist. It has no attachments, cron jobs, warm-image allocations or voice calls; the changed cron matcher remains unallocated, and standalone Crabbox Doctor retains its empty-state read/projection. The later subagent-list change retains whole-snapshot validation before selected-row materialization. The browser fixture does not operate the model picker or assert its pending label; its composer/send and partial-history assertions are unchanged. This assessment does not add runtime or timing proof. The fixtures' memory and browser history reads reach the moved transcript readers; inspected acquisition, transactions, reconciliation, SQL, fences and byte/event bounds retain behavior. The earlier Swift-only settlement and later systemd clock-step fixture changes are outside those fixture executions. No new clock-jump, schema-21 latency, large-store, progress-card layout or live search-speed claim is made.Current
ef759eaalarge9 job104684404031 passed all six refresh cases and the UI child's 368 files / 6445 tests without teardown errors. Raw SHA256c7c9ea253d204df8693676a0fdd97cbd58dd52392904bccb700cf518ae7bac8dis retained. No teardown fix or obsolete-head rerun was used. This clears the current-head failure concern without proving the historical cause.Historical
d86b34fcCI35060888073 failed large9 job104680997106 after 368 UI files and 6445 tests passed, with nine environment-teardown import errors fromapp-host-refresh-control-ui. Aggregate was not observed in the retained record. Root found nine relevant source/fixture/config/dependency objects identical across9c727724,d86b34fc,29ed7e3band5f3ca5a8. The preceding matching job passed, and focused unmodified canonical5f3ca5a8passed its original 6/6 cases in 3.87 seconds. Connect-triggered unjoined imports are a hypothesis, not an observed cause or deterministic reproduction. Root cancelled the prospective same-head rerun when the Goal conflict appeared; no obsolete-head rerun was dispatched. Raw SHA25621b9359c49a3f866e40558c028fae00e406856d17f86a7da9bffb881bd384aaeremains retained. Canonical adoption resolves that source conflict without claiming to repair the teardown failure.Historical
21a6fae2CI35057935428 completed with aggregate FAILURE. Its three underlying failures were lint job104672128474 at max-lines 702 against 700 and small30 job104672133740 in two planner fixture cases, plus the large22 job described below. The exact corrections below address those two failures. Large22 job104672130807 separately observedmaxGatewayGapMs=594.853601against the unchanged strict 500 assertion. Functional deletion/archive/reclamation/unrelated-row assertions passed, but the measurement covers warmup and the entiresessions.deleteRPC without phase, CPU/GC or host-scheduling attribution. The historical phase and root cause remain unknown; no timeout or product patch was selected. The same test later passed on exact historical9c727724, as recorded below, without erasing the failed historical sample. The prior yield large29, small14 and Goal large10 passed on 21a6. Root confirmed the terminal aggregate failure; the corrections do not erase that result.Historical
ab9e1eecCI35056011215 completed with aggregate104670094220 FAILURE at 2026-09-16T04:52:55Z. Its only failed underlying job, large10 job104666458483, observed foursession_nodesSELECTs against the unchanged ceiling of three in the literal-objective Goal edit case. The separate correction and proof below address that canonical blocker; they do not erase the failed run.Historical
f7e32cCI35050507736 failed preflight job104649632049 with 121 Node matrix jobs against limit120, before test execution; aggregate104649825154 also failed. The landed packing repair supports the refresh but does not erase those results. The prior fixture repair retains lifecycle-specific yield assertions, teardown holder reporting and idempotent dependency setup.Historical
f99e0fd9CI completed with a failed aggregate. Its failures were duplicate-fixtureEEXISTandsessions.send-yield-resume.test.tsresidual-root assertions reporting 2 and 1. Those counts do not establish a drain transition, and the holder/phase remains unknown. Earlierb8b97d23failures are also retained. The landed canonical fixture repairs support this refresh but do not erase either failed gate. Related #149506 was handled by its existing owner; no attribution of the historical roots or cherry-pick is claimed.Per-admission run-local reuse remains separate from the established successful-result query cache. Sequential same-authority/project cache hits are allowed; concurrent admissions and authority/project boundaries remain distinct. The queue validator's literal clause 5 failure and existing-contract adjudication remain recorded in #99105.
Current completed review and preparation
ClawSweeper Revision 13 completed for exact
ef759eaa, reviewed 2026-09-16T06:19:46.914Z, with Findings None and Security None. It recognizes the resolved integration conflict. Its two original Before merge items remain unchecked:The supervising maintainer subsequently released preparation and the exact-head ordinary squash merge; both are complete. This records the maintainer's resolution of the supervisor hold without claiming that ClawSweeper removed either original checkbox. The full report is retained. Historical Revision 12 reviewed
d86b34fcat 2026-09-16T05:56:38.550Z and reported the then-real integration conflict and hold. Verified signed canonical adoption resolves that integration concern; the original report remains retained alongside Revision 11 and its separate evidence adjudication below.Historical completed review and maintainer adjudication
ClawSweeper Revision 11 completed for exact
9c727724in run35059679228 with Findings None and Security None. Its original Before merge items remain unchecked and read:The maintainer's separate resolution accepts both evidence risks. Freshly downloaded canonical/corrected observation JSON matches the retained hashes, and the comment includes exact selected synthetic observations. Goal and CI-correction bundles were also downloaded and hash-verified. The review host's R2 restriction and missing ffprobe remain part of its record; independently inspected evidence supports the stated scope without a new video, live-authentication or search-speed claim.
On historical
9c727724, large22 job104675743271 passed the samesessions.delete keeps the Gateway responsive while reclaiming a large sessiontest in 3177 ms total test duration. The original 500 ms heartbeat assertion is unchanged. Raw SHA256 isca433eb50f27715b5e3cbfb8b18bc8d439f6bef949841412c531b4f4db8a286f. The maintainer accepted that result for the historical evidence concern while preserving the historical gap's unknown phase and cause. This is the maintainer's adjudication; ClawSweeper itself has not removed either checkbox. No code, threshold or review guard changed.Separate Goal persistence proof
The historical frozen two-file correction has SHA256
3d51e90c94ecff214459214dae24607f28586355ed154e9f4f02bdd50e89ca1cand remains preserved in priord86b34fchistory. Currentef759eaaadopts equivalent canonical Goal production and retains its regression test blob. Root's separate canonical932846b5verification passes 14/14 total cases, including the two added regressions; the original proof below keeps its original source labels. Unmodified canonicalbafa7c56reproduces four reads. The corrected fixture on base5279f27aperforms three, including final-row certification, and passes 43/43 regressions. The independent source-blind API validation passes 6/6 clauses across 28 fresh-process invocations. Targeted lint, core/selected test types and scoped P0–P2 autoreview pass. All published files and the artifact manifest were downloaded and hash-verified.Canonical red · Corrected regression log · Counted SQL and certification · Source-blind API report · Raw API results · Proof revisions and limits · Artifact manifest.
This is synthetic persistence API and counted-SQL proof. It does not establish Gateway/model behavior or end-to-end latency. Scope includes exact case-sensitive sibling isolation, current-authority replacement refusal, receipt replay and required certification. The Goal evidence is separate from the historical memory and combined Gateway/browser captures.
Separate CI correction proof
The historical two-file correction has SHA256
a6fa9d08e309ae33f1dbe54f23043160fc9c8267ce6dee96d9cff79f7b38dd1b, reviewed and proved on canonical56179b3f. Canonical now supplies both UI production and the #149726 planner correction as exact whole blobs, so neither remains in the authored delta. These original logs retain their historical revision labels. Root separately verified canonical932846b5full type-aware UI lint at the unchanged 700-line limit. Its clear-reply callback preserves the same synchronous target assignment and redraw. The original authored chat renderer correction reused its existing reply-target callback when clearing the target. The unchanged max 700 check fails at 702 before the correction and passes at 699 after it; full-file type-aware lint and UI tsgo pass. The planner mock accepts both extension roots and full file paths. Both original failing cases pass, as does the full 160-test suite and full-file lint. Tail 48/49, the 240-second cap, descriptor identity and total-cost assertions remain unchanged. Both scoped reviews report no P0-P2 findings.UI red · UI green · UI lint · UI types · Planner red · Planner green · Planner160 tests · Planner lint · Proof revisions · Artifact manifest.
All nine public proof files plus the manifest were downloaded and hash-verified. These are focused canonical red/green checks. They do not replace exact-head CI, establish the cause of the historical large22 gap or add a new browser/timing claim.