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. What this changesThis PR saves native subagents’ admitted requester source through the existing command recovery claim. Example: A channel requester starts agent:main:subagent:reused-child, then the Gateway crashes.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR repairs a verified current-main recovery defect with a minimal change and no introduced findings. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherAgent command admission persists requester facts in the existing session claim; after restart, the subagent registry consumes those facts and checks current child, requester, and Gateway ownership before continuation. flowchart TD
A[Channel requester] --> B[Native child command]
B --> C[Existing session claim]
C --> D[Registry restart recovery]
D --> E[Current authority checks]
E --> F[Same child continuation]
Technical reviewBest possible solution: Land this existing-owner producer fix while keeping downstream settlement and pending-parent source recovery in their separately tracked work. Do we have a high-confidence way to reproduce the issue? Current main visibly skips the claim producer required by registry restoration, and supplied baseline Gateway logs and a failing admission regression demonstrate that exact failure; this read-only review executed no reproduction. Is this the best way to solve the issue? Removing the producer exclusion is the smallest complete repair: it reuses existing persistence, source validation, cleanup, and registry recovery while preserving the separate main-session exclusion. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 47ce38735155. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -4, Tests +12. Total +8 across 2 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReviewed October 23, 2026, 10:23 PM ET / October 24, 2026, 02:23 UTC (Revision 3). |
|
@clawsweeper re-review Head remains
Failed fixture assumptions, cancelled audit rows, profileless revocation scope, local plugin convergence warnings, and unrun real-channel/Codex acceptance remain explicit. Required CI is still red with the previously published inherited-failure evidence; no rerun/status override is claimed. #182043 remains unresolved. Please reassess the four proof/security/compatibility requests against the attached evidence. |
|
🦞👀 Re-review progress:
|
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…claw#182046) Persist the admitted requester recovery source for native child commands so registry restart recovery can restore the original channel requester. Main-session recovery still excludes delegated sessions, and existing source lifetime and terminal cleanup checks remain. Preserves Eric Cai’s implementation and regression. The native-key regression fails on main; all 17 targeted command/registry tests, core and affected-test typechecks, lint, formatting, and independent review pass. CI run 40053286039 retains two independently attributed inherited session-list metadata failures; landed under the authorized inherited-failure exception. Production net -4 lines; tests net +12. Fixes openclaw#182042. The parent completion-source issue openclaw#182043 remains separate. Co-authored-by: Eric Cai <[email protected]>
Closes #182042. Related: #182043, #182065.
What Problem This Solves
Native subagents started by a channel requester can lose their completion after a Gateway crash because command admission never saved their original requester source.
User Impact
Native children now retain the admitted requester facts needed by registry recovery. Recovery still checks the current child, requester incarnation, Gateway lifetime, and permissions before continuing. Existing runs with no saved source remain blocked; transcript text and delivery routes cannot recreate authority.
Why This Change Was Made
The exclusion at
agent-command.ts:304prevented native keys from reaching the existing claim producer.restoreChannelSubagentCompletionSourcealready consumes that private child claim and independently reauthorizes it. Removing the exclusion repairs that producer/consumer contract; main-session recovery still excludes delegated sessions.Eric Cai's implementation and regression are unchanged. The maintainer integration only merges main
d355f2fd148dd68486d863aba8b510adfa8005c2, preserving the original commit. Production: +3/-7 (net -4); tests: +16/-4 (net +12). No schema, configuration, or public API change; existing restart-recovery documentation already describes the intended behavior.#182043 remains separate. Its missing source is on the parent settlement turn. Native launch capture omits the existing
retainRequesteropt-in, batch authority compares operator source/scopes rather than channel principals, and announce dispatch omitsagentToolCaller. That is a capture/batch/settlement ownership question, not this child's claim producer. Selecting a requester for a mixed-principal batch is outside this fix. The contributor's combined crash reproduction also remains red for #182043. Cleanup settlement is separately owned by #182065. No unconditional resend or uncertain-send success is introduced here.Evidence
Maintainer verification on integration head
de0b7ffc0c98e9254add882052b879343d224b67:agent-command.tsfromd355f2fd148dproduced 1 failed / 5 passed. The native-key case retainedprevious-child-commandinstead ofnext-child-command; this was an assertion failure at real command admission/SQLite claim persistence, not a fixture setup failure.pnpm test src/agents/agent-command.recovery-source.test.ts src/agents/subagents/registry/subagent-detached-recovery.restart-integration.test.ts --maxWorkers=1passed 17/17 tests: 6 command regressions and 11 registry recovery cases. The native case proves main-recovery exclusion and terminal source cleanup; the registry suite covers restored channel sources, missing/mismatched sources, and requester reset. Per-file wall times were 59.85s and 164.15s on the loaded host, dominated by import/transform and existing worker-backed fixtures; cold worker preparation was separate. These tests exercise real admission, persistence and recovery owners with model/transport doubles.pnpm tsgo:coreand all 29 affected test type graphs passed. Targeted typed lint, two-file format check, andgit diff --checkpassed.security-fastpassed. The two failures are the existing replaced-session metadata and off-page controller/collector assertions insessions-list-persisted-worker.test.ts(job 120750780484); both also fail in original run 40046482472. The CI merge47f3db8778b989d14460223bdff369559178d391has main baseline0d49ef7bd1c6fa024d76e962995a0f37aa93c74eand this exact PR head as parents. Its diff from baseline is only this PR’s two files; the failure fixture, list/read/projection owners and registry are byte-identical. Those seeded list/describe tests never execute changed command admission. The classifier had no comparable scheduled-main job and reported unknown; inspected source and original-run failures establish them as inherited. The maintainer then ran only these two cases with production command code from maind355f2fd148d: both failed with the same assertions (2 failed, 1 unselected/skipped); the fixed module was restored and the worktree is clean. Landing uses the authorized inherited-failure exception; CI is not relabeled green.Audit context: the restart analysis covered 61 Gateway starts and recorded 985 interrupted subagent waits and 110 direct-announcement failures. Journal lines 254140–254141 and 254444 illustrate this recovery surface. Those counts are not an attribution of every event to this bug; the synthetic regression above establishes this defect. No live Gateway or Team state was touched.
The contributor's inspectable full-process, replacement-rejection and latest-stable upgrade evidence follows. Those runs retain their original SHAs and limitations; they are not represented as new maintainer executions.
Contributor runtime and upgrade evidence
Inspectable existing source-recovery behavior evidence
Scope and pinned inputs: the standalone source fix is
e13f9030214a1654d1eb55dc2ad89d9dac2e4f65, based on2fc557a9fb060befdb5443db5d3963fa2cd082bc. Combined integration commit0a38fe2ad20e5c1b60051ee42159dffcc24abef5contains that source fix plus the independent cleanup-settlement repair from #182065 (9aabdbf9fd73965afe18fdded712a93ae1289f6con its own branch). Standalone source recovery, standalone downstream settlement failure, and combined settlement success are reported separately below.This section contains actual archived driver/Gateway output and explicitly labeled selected audit fields. Newly executed final-effect and latest-stable upgrade evidence follows in the next section. No IPs, keys, phone numbers, non-public endpoints, or local usernames/checkout paths are published here. All retained IDs are synthetic fixtures.
Real entry path: the built
openclaw.mjs gateway run --port <isolated-loopback-port>runs on Node 26.12.1 / macOS arm64 under an OS sandbox, with a fresh isolated HOME, state, workspace, and TMPDIR. Non-loopback outbound traffic and user-home reads/writes are denied. Onlyrehearsal-channelis loaded.rehearsal.ingressqueues an inbound synthetic message; the channel lifecycle callsfinalizeInboundContext→recordInboundSession→dispatchReplyWithBufferedBlockDispatcher. A controllable loopback HTTPopenai-completionsmodel supplies responses to the real hostsessions_spawn,sessions_yield, andsessions_sendtools. The testsendTextimplementation records its outbound effect and returns a synthetic platform message ID.The driver invocation shape was
python3 reproduce.py --source <source-or-integration-checkout> --scenario normal|active --label <fixture-label> --port <isolated-loopback-port>. This is redacted invocation documentation, not invented shell stdout. The archived driver logs do not separately store historical shell exit status. Their Gateway process termination records are reported explicitly; audits reopened SQLite read-only after the processes stopped.MODEL 3logs a planned text response before the active-model hold barrier; repeated fixed text across a restarted physical run does not prove a duplicate business side effect.Original baseline: native private requester source absent
Before the crash on baseline
2fc557a9fb060befdb5443db5d3963fa2cd082bc, the captured child entry has no source (selected exact fields fromdatabases-before.json):{ "sessionKey": "agent:main:subagent:df6de26c-d1ed-402a-9543-20276121caba", "sessionId": "b6276a29-747b-4858-90f0-c4f124fc8f66", "lifecycleRevision": "ef79a73e-2f1b-4d1f-9273-563042702b40", "restartRecoveryRequesterSource": null, "restartRecoverySourceIngress": null, "restartRecoverySourceMessageChannel": null }Actual baseline Gateway log prefix; stack omitted to redact local checkout paths:
The independent final audit records no parent receipt and no successful input completion; recovery-source failure occurs before the later settlement scenario can run.
{ "label": "main-active-02", "sha": "2fc557a9fb060befdb5443db5d3963fa2cd082bc", "driverError": "same-child sessions_send recovery", "receipts": [], "inputCompletions": [], "allRegistryDeliverySettled": false }Standalone
e13f903: ordinary completion passesActual archived driver stdout excerpt:
Selected exact fields from the independent read-only SQLite audit (structured data, not raw Gateway stdout):
{ "label": "final-normal-01", "sha": "e13f9030214a1654d1eb55dc2ad89d9dac2e4f65", "driverError": null, "quickCheck": { "global": "ok", "agent": "ok" }, "registry": [ { "runId": "8774e451-e178-4354-b199-7d53a2060c98", "childSessionKey": "agent:main:subagent:30118b5f-587c-40ff-8aca-db8aea316f91", "generation": 1, "requesterSessionKey": "agent:main:synthetic:synthetic:direct:syn-owner-normal-77232c42", "execution": { "status": "terminal", "startedAt": 1792801662582, "lifecycleGeneration": "6bad0a52-22c4-49f5-a024-54858e26516d", "endedAt": 1792801663229, "outcome": { "status": "ok", "startedAt": 1792801662582, "endedAt": 1792801663229, "elapsedMs": 647 } }, "delivery": { "status": "delivered", "disposition": "delivered", "deliveredAt": 1792801663721, "announcedAt": 1792801663721 }, "wake": null } ], "deliveryQueue": [], "pendingInputs": [], "beforeTranscriptRows": null, "afterTranscriptRows": 27, "changedOrMissingBeforeTranscriptRows": [], "inputCompletions": [ { "session_key": "agent:main:synthetic:synthetic:direct:syn-owner-normal-77232c42", "session_id": "be50851b-e3c8-4dcc-9bbf-069773834f1c", "idempotency_key": "announce:requester-settle:main:agent:main:synthetic:synthetic:direct:syn-owner-normal-77232c42:8774e451-e178-4354-b199-7d53a2060c98:yield-1:user", "run_id": "announce:requester-settle:main:agent:main:synthetic:synthetic:direct:syn-owner-normal-77232c42:8774e451-e178-4354-b199-7d53a2060c98:yield-1", "request_hash": "317babe1b717c37aa3b90fef7eac5c1dffb73ddc6de67049e41a6e2191e4325a", "outcome_json": { "reason": "completed", "status": "ok", "stopReason": "stop", "livenessState": "working" }, "succeeded": 1, "completed_at": 1792801663719 } ], "receipts": [ { "time": 1792801663688, "type": "outbound", "to": "synthetic:SYN-OWNER-normal-77232c42", "accountId": "synthetic", "text": "PARENT_COMPLETION_normal_77232c42", "messageId": "SYN-OUT-a21c7a81-4536-401f-b677-5ab1908f866b" } ], "allRegistryDeliverySettled": true, "realChannelAcceptance": "NOT_RUN", "codexProviderAcceptance": "NOT_RUN" }Captured Gateway process record:
[ { "label": "before", "pid": 34025, "termination": "SIGTERM", "exit": 0 } ]Standalone
e13f903: source persists and same-child continuation passes; durable settlement still failsBefore process death, the same production admission path now writes the native child private claim. Selected exact persisted fields:
{ "sessionKey": "agent:main:subagent:8e302113-812e-46b0-8171-02bac79f4ee3", "sessionId": "a3caf3b0-4249-4eaa-9b96-c44d03f2cc0d", "lifecycleRevision": "450e05b9-d482-4340-89c5-2c7c09f96a55", "restartRecoveryRequesterSource": { "agentId": "main", "sessionKey": "agent:main:subagent:8e302113-812e-46b0-8171-02bac79f4ee3", "sessionId": "a3caf3b0-4249-4eaa-9b96-c44d03f2cc0d", "lifecycleRevision": "450e05b9-d482-4340-89c5-2c7c09f96a55", "sourceRunId": "681c07e3-b540-44a6-bd78-f64ea3edcced", "requesterOrigin": { "sessionKey": "agent:main:synthetic:synthetic:direct:syn-owner-active-4c2421b8", "messageProvider": "synthetic", "accountId": "synthetic", "chatType": "direct", "senderId": "SYN-OWNER-active-4c2421b8" } }, "restartRecoverySourceIngress": "channel", "restartRecoverySourceMessageChannel": "synthetic" }Actual archived driver stdout excerpt:
Exact selected host tool-event fields demonstrate the allowed continuation reaches the same child session:
{ "time": 1792801682707, "type": "after_tool_call", "toolName": "sessions_send", "params": { "sessionKey": "agent:main:subagent:8e302113-812e-46b0-8171-02bac79f4ee3", "message": "CHILD_CASE=active continue synthetic text-only work after old process death", "timeoutSeconds": 30 }, "requesterRunId": "announce:requester-settle:main:agent:main:synthetic:synthetic:direct:syn-owner-active-4c2421b8:681c07e3-b540-44a6-bd78-f64ea3edcced:yield-1", "result": { "runId": "55b4becb-df81-4048-8c54-5ca6a6f7653f", "sessionKey": "agent:main:subagent:8e302113-812e-46b0-8171-02bac79f4ee3", "status": "ok", "delivery": { "status": "skipped" }, "reply": "CHILD_RESULT_active_4c2421b8" } }Selected exact durable audit fields; this is not an overall restart pass:
{ "label": "final-active-01", "sha": "e13f9030214a1654d1eb55dc2ad89d9dac2e4f65", "driverError": "durable delivery/settlement failed", "quickCheck": { "global": "ok", "agent": "ok" }, "registry": [ { "runId": "681c07e3-b540-44a6-bd78-f64ea3edcced", "childSessionKey": "agent:main:subagent:8e302113-812e-46b0-8171-02bac79f4ee3", "generation": 1, "requesterSessionKey": "agent:main:synthetic:synthetic:direct:syn-owner-active-4c2421b8", "execution": { "status": "terminal", "startedAt": 1792801669509, "lifecycleGeneration": "dfc4e090-767e-46ad-8b4f-1de1fe11aa09", "endedAt": 1792801676398, "outcome": { "status": "error", "error": "Subagent execution was interrupted by a Gateway restart. Inspect retained session history and uncertain tool outcomes, then continue the child with a follow-up or assign replacement work.", "startedAt": 1792801669509, "endedAt": 1792801676398, "elapsedMs": 6889 }, "interruptionReason": "gateway-restart", "suppressSessionEffects": true }, "delivery": { "status": "pending", "disposition": "intentional_non_delivery", "lastError": "completion_handoff_pending" }, "wake": { "status": "dispatching", "attemptCount": 1, "batchRunIds": [ "681c07e3-b540-44a6-bd78-f64ea3edcced" ], "requesterYieldBatch": true, "yieldedFinalDeliverable": true, "rearmGeneration": 1 } }, { "runId": "55b4becb-df81-4048-8c54-5ca6a6f7653f", "childSessionKey": "agent:main:subagent:8e302113-812e-46b0-8171-02bac79f4ee3", "generation": 2, "requesterSessionKey": "agent:main:synthetic:synthetic:direct:syn-owner-active-4c2421b8", "requesterTurnRunId": "announce:requester-settle:main:agent:main:synthetic:synthetic:direct:syn-owner-active-4c2421b8:681c07e3-b540-44a6-bd78-f64ea3edcced:yield-1", "execution": { "status": "terminal", "startedAt": 1792801682512, "lifecycleGeneration": "9a8857ca-823c-42ec-8348-b7e8f00aabad", "endedAt": 1792801682655, "outcome": { "status": "ok", "startedAt": 1792801682512, "endedAt": 1792801682655, "elapsedMs": 143 } }, "delivery": { "status": "delivered", "announcedAt": 1792801682696 }, "wake": null } ], "deliveryQueue": [], "pendingInputs": [], "beforeTranscriptRows": 21, "afterTranscriptRows": 33, "changedOrMissingBeforeTranscriptRows": [], "inputCompletions": [ { "session_key": "agent:main:subagent:8e302113-812e-46b0-8171-02bac79f4ee3", "session_id": "a3caf3b0-4249-4eaa-9b96-c44d03f2cc0d", "idempotency_key": "55b4becb-df81-4048-8c54-5ca6a6f7653f:user", "run_id": "55b4becb-df81-4048-8c54-5ca6a6f7653f", "request_hash": "f8b7648370fd3bd8daab9a37a574ae85210c28be83d75368fc519df703a145e5", "outcome_json": { "reason": "completed", "status": "ok", "stopReason": "stop", "livenessState": "working" }, "succeeded": 1, "completed_at": 1792801682688 }, { "session_key": "agent:main:synthetic:synthetic:direct:syn-owner-active-4c2421b8", "session_id": "9b2f37d8-3ef0-4e23-96db-51721bdcc990", "idempotency_key": "announce:requester-settle:main:agent:main:synthetic:synthetic:direct:syn-owner-active-4c2421b8:681c07e3-b540-44a6-bd78-f64ea3edcced:yield-1:user", "run_id": "announce:requester-settle:main:agent:main:synthetic:synthetic:direct:syn-owner-active-4c2421b8:681c07e3-b540-44a6-bd78-f64ea3edcced:yield-1", "request_hash": "9c7b56e227573c767a264257d4851f8083fca51a773a7d9694f9990a5dd11425", "outcome_json": { "reason": "completed", "status": "ok", "stopReason": "stop", "livenessState": "working" }, "succeeded": 1, "completed_at": 1792801682889 } ], "receipts": [ { "time": 1792801682846, "type": "outbound", "to": "synthetic:SYN-OWNER-active-4c2421b8", "accountId": "synthetic", "text": "PARENT_COMPLETION_active_4c2421b8", "messageId": "SYN-OUT-962bbb76-5c6f-4924-b30a-e070c5956849" } ], "allRegistryDeliverySettled": false, "realChannelAcceptance": "NOT_RUN", "codexProviderAcceptance": "NOT_RUN" }Actual Gateway error excerpt:
The original interrupted run
681c07e3-b540-44a6-bd78-f64ea3edccedremainspending/dispatching, while the new physical run55b4becb-df81-4048-8c54-5ca6a6f7653fin the same child is delivered and exactly one parent completion exists. Thus this PR's requester-source repair reaches the intended continuation, but the separate cleanup-owner defect still blocks full settlement on standalonee13f903. No transient marker snapshot is invented from this run.Combined
0a38fe2: complete normal and active-restart settlementThe following previously executed full-process evidence combines both independent repairs. It demonstrates combined behavior, not standalone acceptance of either PR. Driver SHA-256 is
8264fac01c2a4559882d9e9c8cd5221257a9bfb133a2f6cef93667578cc14de6; both inputs recordsourcePatchSha256: null.Combined fixed normal run
Actual archived driver stdout excerpt:
Selected exact SQLite audit fields; normal has no pre-crash snapshot because it does not restart:
{ "label": "fn1", "sha": "0a38fe2ad20e5c1b60051ee42159dffcc24abef5", "processes": [ { "label": "before", "pid": 57781, "termination": "SIGTERM", "exit": 0 } ], "quickCheck": { "global": "ok", "agent": "ok" }, "registry": [ { "runId": "97ea3dec-e2fd-4b7e-8909-1276e5f6da57", "childSessionKey": "agent:main:subagent:98b79256-3676-4a73-848f-40c4c3260b15", "generation": 1, "requesterSessionKey": "agent:main:synthetic:synthetic:direct:syn-owner-normal-ab932683", "requesterTurnRunId": null, "execution": { "status": "terminal", "startedAt": 1792803267904, "lifecycleGeneration": "d2bba5c0-fd89-4449-b598-1654102e5966", "endedAt": 1792803268922, "outcome": { "status": "ok", "startedAt": 1792803267904, "endedAt": 1792803268922, "elapsedMs": 1018 } }, "delivery": { "status": "delivered", "disposition": "delivered", "deliveredAt": 1792803269416, "announcedAt": 1792803269416 }, "requesterSettleWake": null, "cleanupHandled": true, "cleanupCompletedAt": 1792803269057 } ], "deliveryQueueCount": 0, "pendingInputCount": 0, "inputCompletions": [ { "run_id": "announce:requester-settle:main:agent:main:synthetic:synthetic:direct:syn-owner-normal-ab932683:97ea3dec-e2fd-4b7e-8909-1276e5f6da57:yield-1", "succeeded": 1, "outcome": { "reason": "completed", "status": "ok", "stopReason": "stop", "livenessState": "working" } } ], "beforeTranscriptRows": null, "afterTranscriptRows": 27, "receipts": [ { "time": 1792803269385, "type": "outbound", "to": "synthetic:SYN-OWNER-normal-ab932683", "accountId": "synthetic", "text": "PARENT_COMPLETION_normal_ab932683", "messageId": "SYN-OUT-a4543ad6-ea59-4fcc-9ddc-ca2dcf6f65c2" } ], "allRegistryDeliverySettled": true }Combined fixed active crash/restart run
Actual archived driver stdout excerpt:
Actual post-restart Gateway log excerpt:
The driver held the child model response, then killed the entire pre-restart Gateway process group (
exit: -9). The new Gateway completed the native requester-settle wake and invokedsessions_sendinto the same child session. The resumed physical run is generation 2; the old generation remains an interrupted terminal error withsuppressSessionEffects: true. Normal final shutdown exited 0.MODEL 3above logs a planned synthetic response before the hold barrier; its repeated text is not evidence of a duplicated business action.Exact read-only SQLite audit output for the active run (whole audit object, not raw Gateway stdout):
{ "label": "fa1", "sha": "0a38fe2ad20e5c1b60051ee42159dffcc24abef5", "processes": [ { "label": "before", "pid": 57915, "termination": "forced-kill-process-group", "exit": -9 }, { "label": "after", "pid": 58177, "termination": "SIGTERM", "exit": 0 } ], "quickCheck": { "global": "ok", "agent": "ok" }, "registry": [ { "runId": "1a042739-45c8-4018-a8a7-373370047405", "childSessionKey": "agent:main:subagent:ee4113c7-d784-40a8-bf65-304e46e65c59", "generation": 1, "requesterSessionKey": "agent:main:synthetic:synthetic:direct:syn-owner-active-66c874be", "requesterTurnRunId": null, "execution": { "status": "terminal", "startedAt": 1792803271316, "lifecycleGeneration": "94796b0f-5a92-4d0e-b96d-d592f6ac6d97", "endedAt": 1792803279002, "outcome": { "status": "error", "error": "Subagent execution was interrupted by a Gateway restart. Inspect retained session history and uncertain tool outcomes, then continue the child with a follow-up or assign replacement work.", "startedAt": 1792803271316, "endedAt": 1792803279002, "elapsedMs": 7686 }, "interruptionReason": "gateway-restart", "suppressSessionEffects": true }, "delivery": { "status": "delivered", "disposition": "delivered", "deliveredAt": 1792803285576, "announcedAt": 1792803285576 }, "requesterSettleWake": null, "cleanupHandled": true, "cleanupCompletedAt": 1792803285354 }, { "runId": "49102e0e-e0c8-4a31-90ac-8019ff8a581d", "childSessionKey": "agent:main:subagent:ee4113c7-d784-40a8-bf65-304e46e65c59", "generation": 2, "requesterSessionKey": "agent:main:synthetic:synthetic:direct:syn-owner-active-66c874be", "requesterTurnRunId": "announce:requester-settle:main:agent:main:synthetic:synthetic:direct:syn-owner-active-66c874be:1a042739-45c8-4018-a8a7-373370047405:yield-1", "execution": { "status": "terminal", "startedAt": 1792803285158, "lifecycleGeneration": "df6b0d80-1087-4e45-91f6-c139f0752b56", "endedAt": 1792803285322, "outcome": { "status": "ok", "startedAt": 1792803285158, "endedAt": 1792803285322, "elapsedMs": 164 } }, "delivery": { "status": "delivered", "announcedAt": 1792803285387 }, "requesterSettleWake": null, "cleanupHandled": true, "cleanupCompletedAt": 1792803285392 } ], "deliveryQueueCount": 0, "pendingInputCount": 0, "sessions": [ { "sessionKey": "agent:main:subagent:ee4113c7-d784-40a8-bf65-304e46e65c59", "sessionId": "59006ac7-2861-4982-acbe-1910707de468", "pendingFinalDelivery": null, "terminalDeliveryEvidence": null }, { "sessionKey": "agent:main:synthetic:synthetic:direct:syn-owner-active-66c874be", "sessionId": "8ccbf21a-54b2-4990-bbf8-2342a62eae07", "pendingFinalDelivery": null, "terminalDeliveryEvidence": [ { "runId": "announce:requester-settle:main:agent:main:synthetic:synthetic:direct:syn-owner-active-66c874be:1a042739-45c8-4018-a8a7-373370047405:yield-1", "captured": true, "payloads": [ { "visible": true } ], "deliveryStatus": { "status": "sent", "resultCount": 1 }, "deliveryContext": { "channel": "synthetic", "to": "synthetic:SYN-OWNER-active-66c874be", "accountId": "synthetic" }, "durableFinalReceipt": { "intentId": "66cf1e3a-b815-4899-9cdb-77c5938bf12b", "deliveryId": "94c478d2-4a42-499d-a2aa-64157c491927", "platformMessageId": "SYN-OUT-66a4c4ef-d9cc-4d20-bd1c-6e58c726ef4a" } } ] } ], "inputCompletions": [ { "run_id": "49102e0e-e0c8-4a31-90ac-8019ff8a581d", "succeeded": 1, "outcome": { "reason": "completed", "status": "ok", "stopReason": "stop", "livenessState": "working" } }, { "run_id": "announce:requester-settle:main:agent:main:synthetic:synthetic:direct:syn-owner-active-66c874be:1a042739-45c8-4018-a8a7-373370047405:yield-1", "succeeded": 1, "outcome": { "reason": "completed", "status": "ok", "stopReason": "stop", "livenessState": "working" } } ], "beforeTranscriptRows": 21, "afterTranscriptRows": 33, "changedOrMissingBeforeTranscriptRows": [], "receipts": [ { "time": 1792803285532, "type": "outbound", "to": "synthetic:SYN-OWNER-active-66c874be", "accountId": "synthetic", "text": "PARENT_COMPLETION_active_66c874be", "messageId": "SYN-OUT-66a4c4ef-d9cc-4d20-bd1c-6e58c726ef4a" } ], "allRegistryDeliverySettled": true }The durable parent receipt's
platformMessageIdmatches the single raw test-transport event. Both original and continuation rows are delivered with no wake. The two input completions succeeded, the outbound queue and pending input table are empty, andpendingFinalDeliveryis absent for both sessions. The audit compares every captured column/byte of the 21 pre-crash transcript rows by(session_id, seq); all 21 are unchanged among 33 final rows. It does not assert that a new physical run or a second logical registration is forbidden.Audit execution:
python3 verify-existing-sqlite.pywas executed read-only against these retained stopped databases after inspecting the driver, transport, raw logs, and prior independent audits. It exited 0. It checks both SQLitequick_checkresults, original-vs-fixed settlement state, the single transport receipt, empty queue/input tables, absent pending-final state, and unchanged pre-crash transcript records. Its structured JSON above is a new audit result, not a reconstruction of historical stdout.The same combined evidence has now been accepted by #182065's completed re-review as inspectable shipped-entry proof for its own cleanup-settlement scope. That acceptance does not clear this PR's distinct requester/child final-effect or latest-stable compatibility requirements.
Existing producer regression output
The admission table was executed through
node scripts/run-vitest.mjs src/agents/agent-command.recovery-source.test.ts --maxWorkers=1. Actual archived baseline excerpt (new test with unchanged baseline production code):Actual archived candidate output:
These archived test logs do not independently encode a Git SHA header; their pinned baseline/candidate association is retained in the existing author evidence records. They are not promoted here into a new execution or an unrecorded exact-head rerun.
Limits of this existing-evidence section: real production state, real QQ/WeChat login or send/receive, live providers/Codex, and business-side-effect acceptance were not run. The active case permits same-child physical continuation and legitimate wake replay. The pending-parent case remains unresolved in #182043 even with both fixes. The fresh-state results and unit boundaries above are separate from the newly executed final-effect and latest-stable controls below.
Executed authority-chain and latest-stable proof — October 24, 2026
All new captures use the unchanged, already-built exact PR head or explicitly combined commit, fresh synthetic state, the real Gateway, the host synthetic-channel ingress, public
sessions.reset, and a controllable HTTP provider. The OS policy denies user-directory access and external network access. There is no production data or real channel/provider account. No product code, authority contract, database row, check status, or published history was changed for this proof.The native pre-provider barrier is the normal
before_model_resolveplugin hook. The existing host reasserts admission immediately after that awaited hook (src/agents/embedded-agent-runner/run/setup.ts:124), including abort, prepared source, and lifecycle authority (run-entry.ts:115-120). Reset preempts and joins old work before publishing a new incarnation; this proof does not swap an identity beneath a live turn.The blocks below are selected fields from a newly executed read-only auditor, not invented historical stdout.
node verify-new-proof.mjsexited 0, reading the archived SQLite/JSON captures, checking integrity, matching admitted claims and inputs, and comparing old transcript values. Raw driver and Gateway excerpts are separately labeled.Recovered requester replacement and profileless continuation revocation
Exact standalone head
e13f9030214a1654d1eb55dc2ad89d9dac2e4f65. Actual command:python3 security.py --source <e13-checkout> --scenario active --negative requester-reset --label nr3 --port <isolated-port>; driver exit 0.The initial native child was admitted with its private requester claim, then the task-owned Gateway was killed. After restart, the actual
announce:requester-settlerun reached the pre-provider hook. A public requester reset began, its lifecycle log confirmed the held owner was aborted, the hook was released, and reset successfully committed a new lifecycle revision. The durable input receipt records that exact recovered run as cancelled. Provider requests remained at the three made before the crash, no transport effect followed recovery, and another clean restart admitted no stale work.This channel source is profileless: its real revocation is requester incarnation/lifetime invalidation. It has no device/profile grant to revoke. No synthetic device revocation is claimed.
{ "label": "nr3", "sha": "e13f9030214a1654d1eb55dc2ad89d9dac2e4f65", "gatewayExits": [ { "label": "before", "exit": -9 }, { "label": "after", "exit": 0 }, { "label": "replacement-restart", "exit": 0 } ], "originalRunId": "759f044b-2a39-4f03-8b81-970871c2f857", "barrierRunId": "announce:requester-settle:main:agent:main:synthetic:synthetic:direct:syn-owner-active-66dbc258:759f044b-2a39-4f03-8b81-970871c2f857:yield-1", "retainedChildSource": [ { "agentId": "main", "sessionKey": "agent:main:subagent:7cc661da-6f16-4b3c-8559-f749586eaf73", "sessionId": "5617945e-9ee9-4765-8c0a-57add5d69580", "lifecycleRevision": "379cd746-7272-44a9-8f72-0edfe90405e3", "sourceRunId": "759f044b-2a39-4f03-8b81-970871c2f857", "requesterOrigin": { "sessionKey": "agent:main:synthetic:synthetic:direct:syn-owner-active-66dbc258", "messageProvider": "synthetic", "accountId": "synthetic", "chatType": "direct", "senderId": "SYN-OWNER-active-66dbc258" } } ], "resetPreemptedOldOwner": true, "oldRequesterRevision": null, "newRequesterRevision": "20e93549-c7c4-4af1-ba52-ae72fa91214c", "recoveredProviderRequests": 0, "recoveredTransportEvents": 0, "secondRestartRequests": 0, "durableCancellation": [ { "session_key": "agent:main:synthetic:synthetic:direct:syn-owner-active-66dbc258", "session_id": "0090afc8-7957-4c4f-9bc1-edf202027c03", "idempotency_key": "announce:requester-settle:main:agent:main:synthetic:synthetic:direct:syn-owner-active-66dbc258:759f044b-2a39-4f03-8b81-970871c2f857:yield-1:user", "run_id": "announce:requester-settle:main:agent:main:synthetic:synthetic:direct:syn-owner-active-66dbc258:759f044b-2a39-4f03-8b81-970871c2f857:yield-1", "request_hash": "51f40c5da16c05c0a3335db87bf7dceef03a1eec0145bd91d1a6e5ae384fac0d", "outcome_json": "{\"reason\":\"cancelled\",\"status\":\"error\",\"stopReason\":\"rpc\"}", "succeeded": 0, "completed_at": 1792806423918, "outcome": { "reason": "cancelled", "status": "error", "stopReason": "rpc" } } ], "activePendingInputs": 0, "outboundQueue": 0 }Raw Gateway log excerpts, redacted:
Same-child recovered physical execution rejected before provider I/O
Explicit combined commit
0a38fe2ad20e5c1b60051ee42159dffcc24abef5(this producer patch plus #182065); not a standalone full-settlement claim. Actual command:python3 recovered-child-boundary.py --source <combined-checkout> --scenario active --label rc2 --port <isolated-port>; driver exit 0.After an actual crash, the restored parent invoked the host
sessions_sendon the same child. A new physical run reached the native pre-provider hook with a real queued input and registry generation. The original private claim correctly remained with its unsettled predecessor; it was not rewritten for every physical run. Public reset preempted that new execution and committed the new child incarnation. The normal post-hook host assertion rejected the cancelled execution before its provider request. There was one child provider request before the crash and zero recovered-child provider requests. A still-authorized parent sent one explicit cancellation notice; it did not deliver the cancelled child's result. After settlement and another restart, no model request was added.An authorized parent cancellation notice is not a stale child effect. This control intentionally preserves that behavior instead of prohibiting all provider work, delivery, or legitimate wake replay.
{ "label": "rc2", "sha": "0a38fe2ad20e5c1b60051ee42159dffcc24abef5", "gatewayExits": [ { "label": "before", "exit": -9 }, { "label": "recovered", "exit": 0 }, { "label": "after", "exit": 0 } ], "originalRunId": "c9d7bc99-d494-4cd1-b49f-3f0e8a71c5c8", "recoveredPhysicalRunId": "1a433d95-c953-491b-b0ab-998afd7363c6", "childSessionKey": "agent:main:subagent:b6916904-53de-466b-92f5-8fd28d9186d5", "originalClaimUnchangedThroughRecovery": true, "retainedPrivateSource": { "agentId": "main", "sessionKey": "agent:main:subagent:b6916904-53de-466b-92f5-8fd28d9186d5", "sessionId": "5c9c5659-7efc-4d32-a375-73c09fe1d5a6", "lifecycleRevision": "33f51a96-f455-483d-bc94-45bd51ac3e6f", "sourceRunId": "c9d7bc99-d494-4cd1-b49f-3f0e8a71c5c8", "requesterOrigin": { "sessionKey": "agent:main:synthetic:synthetic:direct:syn-owner-active-0d827e8b", "messageProvider": "synthetic", "accountId": "synthetic", "chatType": "direct", "senderId": "SYN-OWNER-active-0d827e8b" } }, "admittedNewPhysicalInput": { "runId": "1a433d95-c953-491b-b0ab-998afd7363c6", "sessionId": "5c9c5659-7efc-4d32-a375-73c09fe1d5a6", "state": "queued", "lifecycleGeneration": "38e2a1a1-08aa-4b4e-a959-aa8c207b965f" }, "resetPreemptedOwner": true, "oldChildRevision": "33f51a96-f455-483d-bc94-45bd51ac3e6f", "newChildRevision": "753d76bc-98d1-43d4-84c3-ce33495ea37b", "originalChildProviderRequests": 1, "recoveredChildProviderRequests": 0, "authorizedParentCancellationNotices": 1, "secondRestartProviderRequests": 0, "registry": [ { "runId": "c9d7bc99-d494-4cd1-b49f-3f0e8a71c5c8", "execution": { "status": "terminal", "startedAt": 1792807169916, "lifecycleGeneration": "4e1dd5b1-b02a-4a9e-98c0-f6cb4500bd75", "endedAt": 1792807176452, "outcome": { "status": "error", "error": "Subagent execution was interrupted by a Gateway restart. Inspect retained session history and uncertain tool outcomes, then continue the child with a follow-up or assign replacement work.", "startedAt": 1792807169916, "endedAt": 1792807176452, "elapsedMs": 6536 }, "interruptionReason": "gateway-restart", "suppressSessionEffects": true }, "delivery": { "status": "delivered", "disposition": "delivered", "deliveredAt": 1792807184624, "announcedAt": 1792807184624 }, "wake": null } ], "sessionInputRows": 0, "cancelledInputRows": 0, "activePendingInputs": 0, "outboundQueue": 0, "notice": { "time": 1792807184572, "type": "outbound", "to": "synthetic:SYN-OWNER-active-0d827e8b", "accountId": "synthetic", "text": "EXPECTED_CHILD_CANCEL_NOTICE_0d827e8b", "messageId": "SYN-OUT-2a4612f1-b56f-4a6e-b6e4-cf2ef983ce45" } }Raw recovered-Gateway excerpts, redacted:
Actual captured host-tool result after reset:
{ "type": "after_tool_call", "time": 1792807184412, "runId": "announce:requester-settle:main:agent:main:synthetic:synthetic:direct:syn-owner-active-0d827e8b:c9d7bc99-d494-4cd1-b49f-3f0e8a71c5c8:yield-1", "sessionKey": "agent:main:subagent:b6916904-53de-466b-92f5-8fd28d9186d5", "result": { "content": [ { "type": "text", "text": "Inline child result no longer belongs to its requester turn." } ], "details": { "status": "error", "error": "Inline child result no longer belongs to its requester turn." } }, "error": "Inline child result no longer belongs to its requester turn." }Selected persisted input-completion rows after clean shutdown:
[ { "runId": "1a433d95-c953-491b-b0ab-998afd7363c6", "succeeded": 0, "outcome": { "reason": "cancelled", "status": "error", "error": "agent run aborted | OPENCLAW_DIRECT_ABORT", "stopReason": "rpc" } }, { "runId": "announce:requester-settle:main:agent:main:synthetic:synthetic:direct:syn-owner-active-0d827e8b:c9d7bc99-d494-4cd1-b49f-3f0e8a71c5c8:yield-1", "succeeded": 1, "outcome": { "reason": "completed", "status": "ok", "stopReason": "stop", "livenessState": "working" } } ]The separate initial-admission control retains one cancelled input audit row and zero active input rows; this recovered-child control has zero remaining input rows. Cancelled input rows are audit facts, not executable queued work; none was deleted by the proof to obtain a pass. The existing pending-input reader selects queued/interrupted work and exact current ownership. A separate initial-admission child-reset control also passed, but is not substituted for this crash/recovered-child control.
Latest stable package → exact standalone head: existing data preservation
GitHub's current latest stable was
v2026.10.6. A fresh official npm tarball was downloaded and its published SHA-512 integrity checked. The release's own bundled dependencies were retained; additional dependencies came read-only from the previously audited isolated release installation. No old state, credentials or installer was reused.Actual command:
python3 upgrade.py --stable <verified-2026.10.6-package> --source <e13-checkout> --label ug6 --port <isolated-port>; driver exit 0. The published package created a completed conversation and an additional live main turn with the actual legacy requester/recovery fields that stable writes. The old process was killed, synthetic state/config were backed up, and the candidate's documenteddoctor --fix --non-interactivewas actually executed before Gateway admission. Doctor exit 0. Skipping it was not treated as successful migration.The existing recovery fields were preserved through handoff and consumed by the candidate's normal recovery owner. The candidate delivered one
UPGRADE_COMPLETIONand then accepted a distinct new message ID in the same upgraded conversation, delivering onePOST_UPGRADE_HEALTHYresponse. An informational recovery-admission notice is a separate expected message, not a duplicate completion.All 26 old transcript rows retain every original column value, including the exact event JSON/compressed bytes; the final store has 36 rows. Doctor adds navigation projection columns. All original explicit configuration values and original list order survive. Configuration bytes are not identical: Doctor added the disclosed plugin metadata, wizard bookkeeping, message queue default and disabled optional-skill defaults. No original setting was silently discarded. This is published-package state plus candidate Doctor/binary activation proof, not a network updater, image deployment or all-plugin acceptance claim. The local test plugin's convergence warning is retained; actual channel loading and sends are independently evidenced.
Verified official package:
{ "version": "2026.10.6", "tarball": "https://registry.npmjs.org/openclaw/-/openclaw-2026.10.6.tgz", "integrity": "sha512-jSpQPa2Jw5rG0J2GC07j9+qHtVYIuoHjgccU88JeS+p7188sBCnvIJeuaiNPHj1zsWkuHcBv443QiEUh7qrxwA==", "sha256": "b13fc9f1221e185451573a435ff31bdeb8c5875f569e6f41008198708ca2359f", "dependencyRuntime": "Package-bundled dependencies retained; fallback to audited isolated release installation read-only. No original state, credentials or installer reused." }{ "label": "ug6", "sha": "e13f9030214a1654d1eb55dc2ad89d9dac2e4f65", "gatewayExits": [ { "label": "stable", "exit": -9 }, { "label": "candidate", "exit": 0 } ], "stableVersion": "2026.10.6", "stableRecoveryFields": [ { "sessionKey": "agent:main:synthetic:synthetic:direct:syn-owner-upgrade-798e528b", "claim": { "restartRecoveryDeliveryContext": { "channel": "synthetic", "to": "synthetic:SYN-OWNER-upgrade-798e528b", "accountId": "synthetic" }, "restartRecoveryDeliveryRunId": "SYN-IN-upgrade-798e528b", "restartRecoveryDeliverySourceRunId": "channel-user:v1:f4180aad015f5d29029eb7e1de91e9d5f4f7c9709785787df8f8550624e9efd3", "restartRecoveryRequesterAccountId": "synthetic", "restartRecoveryRequesterSenderId": "SYN-OWNER-upgrade-798e528b", "restartRecoverySourceIngress": "channel", "restartRecoverySourceReplyDeliveryMode": "automatic", "restartRecoveryRuns": [ { "runId": "39259d79-1438-4637-853a-f2f019af9f5c", "lifecycleGeneration": "a46850ae-11c3-441e-851f-cb8189f89db5" } ] } } ], "preLoadRecoveryFieldsUnchanged": true, "doctorExit": 0, "allPreexistingExplicitSettingsPreserved": true, "configurationBytesIdentical": false, "configRootChanges": { "plugins": { "before": { "allow": [ "rehearsal-channel" ], "load": { "paths": [ "<isolated-proof>/core/ug6/plugins/rehearsal-channel" ] }, "entries": { "rehearsal-channel": { "enabled": true, "hooks": { "allowConversationAccess": true } }, "memory-core": { "enabled": false } }, "slots": { "memory": "none" } }, "after": { "allow": [ "rehearsal-channel", "synthetic" ], "load": { "paths": [ "<isolated-proof>/core/ug6/plugins/rehearsal-channel" ] }, "entries": { "rehearsal-channel": { "enabled": true, "hooks": { "allowConversationAccess": true } }, "memory-core": { "enabled": false }, "synthetic": { "enabled": true } }, "slots": { "memory": "none" } } }, "messages": { "before": null, "after": { "queue": { "allowCollaborativeSteering": false } } }, "skills": { "before": null, "after": { "entries": { "coding-agent": { "enabled": false }, "openai-whisper-api": { "enabled": false }, "sherpa-onnx-tts": { "enabled": false }, "trello": { "enabled": false } } } }, "wizard": { "before": null, "after": { "lastRunAt": "2026-10-24T01:54:51.516Z", "lastRunVersion": "2026.10.6", "lastRunCommand": "doctor", "lastRunMode": "local" } } }, "beforeTranscriptRows": 26, "afterTranscriptRows": 36, "changedOrMissingOldTranscriptRows": [], "doctorAgentIntegrity": "ok", "recoveryReceipts": [ { "time": 1792806902465, "type": "outbound", "to": "synthetic:SYN-OWNER-upgrade-798e528b", "accountId": "synthetic", "text": "UPGRADE_COMPLETION_798e528b", "messageId": "SYN-OUT-4691d721-ed5d-4dba-9230-adf1d8743bc2" } ], "postUpgradeSameConversationReceipts": [ { "time": 1792806903465, "type": "ingress-reply", "caseId": "upgrade-798e528b", "payload": { "text": "POST_UPGRADE_HEALTHY_798e528b", "replyToTag": false, "replyToId": "SYN-POST-UPGRADE-798e528b", "audioAsVoice": false }, "info": { "kind": "final", "assistantMessageIndex": 1 }, "messageId": "SYN-REPLY-baf9e236-d5cb-4940-9708-a9dc1e6272a9" } ], "activePendingInputs": 0, "outboundQueue": 0 }Raw candidate Gateway recovery decision:
Scope, failed fixtures and review disposition
The inspected captures address the four author requests: attach actual runtime proof; demonstrate final-effect replacement/revocation refusal; preserve the original authority boundary; and show latest-stable data compatibility. The author does not grant a maintainer security approval or alter a bot label. Please reassess these results on unchanged head
e13f9030214a1654d1eb55dc2ad89d9dac2e4f65.Earlier fixture failures are retained and excluded: reading a claim from the wrong table; recently closed port reuse; stable startup/health format differences; omitting required Doctor; expecting stable to contain the newer private object; reusing an inbound message ID; expecting an audit row to remain in an active registry; using
NO_REPLYfor a result-required notice; requiring every physical run to replace predecessor custody; and conflating a valid parent notice with stale child I/O. None was repaired by changing product code or weakening its authority checks. The final expectations follow inspected production contracts and actual independent audits.Required CI remains FAILURE, with the classifier and independent inherited evidence recorded above. The pending-parent source/cohort question in #182043 is still unresolved, including the previously failed pre-outbound crash. No real channel, Codex/live-provider or business-side-effect acceptance, production operation, merge, or history rewrite is claimed.