Repository navigation
Conversation
|
🦞👀 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: needs maintainer review before merge. Reviewed September 24, 2026, 11:57 PM ET / September 25, 2026, 03:57 UTC (Revision 23). ClawSweeper reviewWhat this changesThe branch carries a delegated requester’s memory identity through system-agent turns and embedded and Codex prompt preparation, while retaining separate inference and conversation identities. Merge readiness✅ Ready for maintainer review Current main still prepares system-agent memory under the synthetic execution identity. This PR has a distinct fix for the linked report, and the updated discussion supplies real delegated-turn proof and the test-cost evidence requested in the prior review. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway receives a delegated system-agent request and selects a verified inference route. The embedded runner prepares agent-scoped memory for the provider prompt, then returns the system-agent reply to the requesting conversation. flowchart LR
A[Delegated request] --> B[Gateway identity and route]
B --> C[System-agent turn]
B --> D[Requester memory owner]
C --> E[Embedded prompt preparation]
D --> E
E --> F[Provider prompt and reply]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +58, Tests +528. Total +586 across 17 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 the requester memory owner explicit at prompt preparation, retain the verified inference route and synthetic execution policy, and land the linked fix through normal review gates. Do we have a high-confidence way to reproduce the issue? Yes. The current-main preparation path still uses the synthetic session agent for this configuration; the PR documents a baseline delegated Telegram turn that omitted the requester supplement. This read-only review did not execute current main. Is this the best way to solve the issue? Yes. Passing a separate memory owner through the existing preparation paths repairs the reported behavior while preserving the established inference, session, and tool-policy identities. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 71cc18ae186d. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (22 earlier review cycles; latest 8 shown)
|
commented
Aug 22, 2026
|
@openclaw-mantis Prove this PR's fix through the real Telegram flow. The claim: with a non-legacy context engine enabled and the memory-wiki plugin active, a system-agent turn previously lost agent-scoped wiki/memory context and the gateway logged Suggested proof shape:
If the system-agent path cannot be reached through a Telegram turn with the mock provider, report exactly where it dead-ends instead of substituting a weaker probe. |
Mantis Telegram Desktop ProofSummary: Mantis captured native Telegram Desktop evidence but blocked the PR comparison because native Telegram exposes /openclaw rescue, not the hosted openclaw.chat system-agent turn needed to compare memoryPromptAgentId behavior.
Motion-trimmed clips: |
commented
Sep 5, 2026
|
Fixed the deterministic CI assertion failure in b362406ee7c: the CLI-loop expectation now includes the propagated memoryPromptAgentId. node scripts/run-vitest.mjs src/system-agent/chat-turn-router.operations.test.ts passes 22/22. The changed-files gate reached the plugin-boundary ratchet and stopped on five pre-existing compatibility records, unrelated to this test-only correction. @clawsweeper re-review |
b362406 to
04db87f
Compare
commented
Sep 5, 2026
|
Rebased and force-pushed
The PR body now contains the red/green evidence, production/test LOC, exact protocol proof, and the local Telegram proof remains structurally unavailable: native @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
6d5058a to
1541f8b
Compare
commented
Sep 5, 2026
|
Addressed both P1 findings in |
…8139) * fix(models): preserve scoped provider discovery outcomes * fix(models): preserve upstream catalog integration Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
… auth (openclaw#158020) * refactor(agents): deslop subagents, sessions, worktrees, commands and auth Reuse canonical normalization, result projection, and lifecycle owners. Remove dead private paths while preserving public and persisted contracts. Synchronize registry fixtures with runtime registration and publication. * test(agents): await registered subagent completion
Co-authored-by: Vincent Koc <[email protected]>
## What Problem This Solves Fixes: signing in to a provider briefly empties an already-open model picker and replaces its choices with “Loading models…” or “Checking models...”. ## User Impact Existing choices stay visible and usable in Control UI chat, New Session, and the terminal picker while provider discovery refreshes. Changes to model restrictions, operator roles, or catalog mode still retire the previous choices. This does not change how soon a newly connected provider's models are discovered. ## Why This Change Was Made Every config commit previously retired model choices, including the auth/provider config written during sign-in. The Gateway now compares selection policies before sending the existing retirement signal. The web and terminal catalog caches treat ordinary config notifications as refreshes; explicit selection-policy changes still clear them. The comparison reuses the model visibility and operator-policy preparation owners. No protocol, configuration, or persistence changes are required. ## Evidence Built baseline and candidate Gateways used isolated state and a task-owned provider whose HTTP model listing was held for eight seconds. The sign-in action was Settings → Connect provider → API key → Save, with chat and New Session pickers already open. - Baseline: the open chat picker lost its choices and displayed the blocking loading state; the captured transition began 309 ms after Save. - Candidate: neither web picker displayed “Loading models…”. The terminal PTY capture contained no “Checking models...” frame while sign-in and discovery ran. Existing choices remained visible, and discovered models appeared after publication. - The held-catalog web regression fails against the original invalidation behavior because its current model list becomes empty, and passes with the fix (four tests in that file; 3.52 s wall time). - Scoped lifecycle, terminal, and web suites: 65 tests passed; 34.50 s wall time. Permission-retirement assertions remain covered, including a real allowlist change after an auth-only config commit. - Review found older config-event expectations in chat, New Session, and command-palette tests. Those now expect retention; explicit policy-change and connection/identity retirement cases remain intact. All 110 tests in those three files passed (18.65 s wall time including the requested changed-lane dry run). - The existing operator-model-policy reload regression passed unchanged. The first CI run caught the obsolete UI expectations (UI shard: 230.38 s); they were corrected rather than rerun unchanged. - Catalog-mode coverage now verifies unrestricted merge-to-replace retirement while metadata is held. The added assertion failed before the comparison fix; all 65 lifecycle/web/terminal tests passed afterward (32.58 s). A built Gateway `config.patch` smoke observed `modelSelectionChanged: true` on that transition. - No real provider inference or paid API calls were made. This PR addresses retention of existing choices, not immediate publication of new provider rows. Before (blocking state; dark theme):  After (existing provider choices remain available; light theme):  Co-authored-by: Ayaan Zaidi <[email protected]>
…58157) Preserve the catalog publication behavior deadline by preparing the lazy Gateway module in suite setup. Restore the focused fixture change from ec66ba9 after it was removed to keep the cron performance PR scoped. Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: vincentkoc <[email protected]>
* fix(test): prepare catalog fixture modules before startup Preserve the catalog publication behavior deadline by preparing the lazy Gateway module in suite setup. Restore the focused fixture change from ec66ba9 after it was removed to keep the cron performance PR scoped. Co-authored-by: vincentkoc <[email protected]> * feat(desktop): isolate managed Linux application audio Co-authored-by: vincentkoc <[email protected]> --------- Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: vincentkoc <[email protected]>
…nclaw#158050) * refactor(gateway): split companion prompts and metadata fixtures * refactor(gateway): preserve companion updates in helper extraction * refactor(gateway): integrate upstream Doctor fixture repair * refactor(gateway): integrate catalog lifecycle fixture fix * test(gateway): retain metadata fixture extraction after upstream integration Co-authored-by: Peter Steinberger <[email protected]>
…#157722) * fix(test): prepare catalog fixture modules before startup Preserve the catalog publication behavior deadline by preparing the lazy Gateway module in suite setup. Restore the focused fixture change from ec66ba9 after it was removed to keep the cron performance PR scoped. Co-authored-by: vincentkoc <[email protected]> * feat(desktop): isolate managed Linux application audio Co-authored-by: vincentkoc <[email protected]> * feat(desktop): bind audio streaming to screen authorization Co-authored-by: vincentkoc <[email protected]> --------- Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: vincentkoc <[email protected]>
The retained-runtime entry loop already creates destination parents. Portable copyIn repeated the guarded ancestor-creation walk for every copied file, producing hundreds of thousands of handled existing-directory errors when OverlayFS required byte copies. Use the existing mkdir:false option after caller-owned parent preparation. Keep source and destination checks, create-only publication, modes, and file/directory syncs. Extend the OverlayFS regression with nested files and a linear filesystem-work bound. The measured dev copy reduced mkdir calls from 445338 to 39731 and materialization from 83.2s to 45.9s. The historical CI timeout was not reproduced; the redundant work itself is the verified defect.
commented
Sep 26, 2026
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
agentId, messageChannel, messageProvider, clientCaps and gatewayUiCommandTarget are already provided by the AgentRun* shared context types intersected into RunEmbeddedAgentParams; keep only the new memoryPromptAgentId.
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix: preserve requester-scoped memory in system-agent turns This is item 1/1 in the current shard. Shard 0/1. This temporary status tracks the active review worker. The completed review will appear in the durable ClawSweeper review comment. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
commented
Sep 27, 2026
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
commented
Oct 4, 2026
|
Closing due to inactivity. |




Closes #127774
What Problem This Solves
Fixes an issue where users asking the system agent about configured knowledge would lose the requesting agent’s scoped memory. The turn could continue with no wiki supplement after logging
Unknown memory-wiki agentId: openclaw.Why This Change Was Made
The host carries a separate memory owner through the existing embedded and native-harness prompt preparation paths. The verified requester owns memory; an undelegated turn uses its verified inference owner.
The real fallback proof also exposed a pre-existing generation handoff defect. Delegated turns now use the verified inference agent’s published generation, retaining its projected tool and parameter policy. Execution, transcript, conversation, authentication, and admission remain under their existing owners.
User Impact
The system agent receives the requester’s compiled knowledge even when another configured agent supplies inference. Invalidated knowledge is withheld on the next turn in the same conversation.
Evidence
Tested through ordinary Telegram Test Server DMs, the registered delegation tool, an isolated Gateway, a registered non-legacy inner context engine, real compiled SQLite publications, and a deterministic provider.
227e7ae26af4e4f3f8a256c4fa808c7b046f4c88. Candidate:9c94731939e.HQ_WIKI_127775, exclude the other configured owners’ claims, and return through the matching delegation result and Telegram.The initial user stimulus was:
The matched inner response was
SYS_TURN_127775; the selected test bot returnedTELEGRAM_DONE_127775. Complete private observations were independently reviewed. Public evidence omits test-account identities, credentials, and infrastructure details.Exact-head watcher evidence (76b51d1)
Test-cost evidence (a8a627d)
Measured one-worker wall time on the validated candidate with
node scripts/run-vitest.mjs <suite> --maxWorkers=1:extensions/codex/src/app-server/attempt-context.test.tsextensions/codex/src/app-server/run-attempt.context-engine.anchors.test.tsextensions/codex/src/app-server/run-attempt.context-engine.test.tssrc/agents/embedded-agent-runner/run/attempt.spawn-workspace.context-engine.test.tssrc/agents/embedded-agent-runner/run/attempt.spawn-workspace.tool-result-guard.test.tssrc/system-agent/agent-turn.low-level-rejection.test.tssrc/system-agent/agent-turn.test.tssrc/system-agent/chat-turn-router.approval.test.tsAvailable exact-head CI run 36081556192 completed successfully. Its run-level wall time was 2,924s (01:20:11Z–02:08:55Z); the changed Node shards ran from approximately 01:24:28Z to 01:38:46Z, with the longest changed shard taking 857s. The local one-worker focused suite measurements above total 154.75s.