Skip to content

fix(agents): recover interrupted children without stale failures - #159492

Merged
steipete merged 8 commits into
mainfrom
codex/parent-led-subagent-recovery
Sep 27, 2026
Merged

steipete merged 8 commits into
mainfrom
codex/parent-led-subagent-recovery

Conversation

@steipete

@steipete steipete commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes persistent red child-task warnings after a Gateway restart and gives the resumed parent an explicit list of unfinished work to reconcile.

User Impact

The parent checks retained results and prefers continuing the same child when its work is still needed. Normal restart interruptions show a neutral pause indicator. Genuine execution failures and exhausted parent-wake delivery remain actionable; an old delivery failure cannot mark newer work as failed.

The recovery roster belongs to the current parent. Children from another store, replaced session, earlier reset, unknown ownership, or a superseded generation cannot become actionable recovery instructions. Existing recently completed execution metadata remains diagnostic history.

Why This Change Was Made

Restart settlement discarded its typed interruption reason and projected an incomplete execution as an ordinary session failure. Preserve that existing reason through the lifecycle owner and compact reads, carry interrupted status through the Gateway/UI contract, and share bounded reconciliation guidance between main-session recovery and child-batch wakeups.

Reset preserves a session ID and rotates its lifecycle revision. Native, ACP, and visible spawns now capture both together before awaited launch. The registry selects latest child generations before matching requester agent, canonical physical store, session ID, and lifecycle revision. This uses optional metadata in the existing run payload; no database/protocol version bump, migration, new scheduler, or command replay is required. Existing retry and authority owners remain in control.

Saved batch wakes apply the same exact ownership matcher to their actionable roster and capture the parent identity before awaiting findings. Final dispatch revalidates that immutable identity, including the existing followup path. Ordinary completion history, frozen cohort identity, atomic settlement, and public/private delivery contracts are preserved. The added child-session field and “parent recovery required” directive were removed from ordinary findings; only the lifecycle-checked roster supplies recovery addresses and instructions.

On upgrade, saved records with a retained typed restart-recovery owner are reconciled on startup. Ambiguous historical failures without that evidence remain failed; error text is not a safe discriminator. Only matching captured ownership enters the actionable roster. Saved history remains available for inspection.

Evidence

Published-updater compatibility passed: Package Acceptance run 36331276511 used trusted Tooling SHA 220a6d0c71aef054f25c4a95afae93040c157d6b, candidate runtime SHA f46615c2f2783ceaa8ba0c2397cef9305bff2720, and the canonical [email protected] / taskflow-restoration cell. The published updater installed the candidate tarball (package version 2026.9.6), verified its build identity, migrated the seeded task/flow records and child links, and passed SDK/page reads plus persistence checks across two candidate Gateway starts. The lane passed in 266 seconds. Evidence artifact docker-e2e-published-upgrade-survivor contains the phase receipts and exact source-commit assertions. This is the actual published 2026.9.4 driver, not a claimed 2026.9.6-driver run; interruption-specific historical cases are separately covered by the closed/reopened SQLite tests. Later PR edits add tests only; main integrations preserve the recovery patch and include the already-landed fixture repair.

Maintainer acceptance of the additive status and typed historical-record behavior is recorded. Final CI run 36334750472 passed on reviewed head 84f5524596e5fbbeb4054a982048434a3372729f. Merged as 3d62d4e2a5e112bb0a558fa4ff1dca723074be1e.

Real Gateway → HTTP model-provider boundary: the extended startup-recovery test uses an isolated Gateway and local Responses provider, invokes public sessions.reset, then records the actual recovery prompt received by the provider. With only session-ID matching, the old child incorrectly remains actionable after reset. With lifecycle matching, the trace is:

{"proof":"restart-parent-provider-boundary","originalChildDelivered":true,"resetPreservedSessionId":true,"resetChangedLifecycle":true,"currentChildDelivered":true,"oldChildDeliveredAfterReset":false,"historicalMetadataRetained":true}

The assertion inspects the actionable recovery prompt separately from the documented Recently Completed Subagents diagnostic history. The existing fixture also verifies queued browser-turn cancellation and exactly-once execution. No live operator Gateway was modified.

Saved-batch Gateway → actual HTTP model provider: the same real Gateway/provider fixture now persists/reloads an owned saved batch, observes its actionable roster at HTTP, re-arms it, confirms public reset revokes the live wake without another provider request, and explicitly restores older fixture history. The restored row reaches HTTP as ordinary findings with no actionable child roster or recovery directive:

{"proof":"saved-batch-provider-boundary","currentChildActionable":true,"liveWakeRevokedByReset":true,"olderFixtureHistoryRestored":true,"staleChildActionable":false,"ordinaryResultRetained":true,"diagnosticHistoryRetained":true}

The two final batch requests reach the actual local HTTP Responses server; they do not use a mocked agent command. Existing Gateway/provider fixtures and atomic completion are reused, with no additional Gateway boot, timer, or polling loop. The extended command passed in 62.49 s wall (test body 20.558 s).

Saved-batch Gateway admission → final agent-command boundary: four cases persist/reload the original frozen cohort, then verify current, stale, mixed, and legacy rows. Stale and unknown rows retain their ordinary result text but cannot add actionable continuation instructions; current children in mixed cohorts remain present. All 84 focused tests passed across the Gateway replay and announce ownership/dispatch/results suites. The previous implementation fails the stale/legacy actionable-roster assertions. A further full-message regression fails on the redundant recovery directive and passes after ordinary findings become diagnostic-only.

The actual public sessions.reset path already revokes its existing saved wakes: killSubagentRunTree defaults suppressCompletedWakes to enabled. The new regression verifies no agent dispatch for that current-reset path, then explicitly restores an older saved row to test the added roster contract. This distinguishes current reset behavior from deliberately seeded retained history; it does not claim current reset leaves an unrevoked wake. No per-member settlement API or new delivery policy was added.

Additional proof: main recovery suite 220 passed before the final boundary extension; final replacement/reset parent cases passed. Parent-settle results 3 passed; restart integration 14 passed; compact SQLite reads 28 passed; lifecycle guards 6 passed; Gateway projection 29 passed; registry-read siblings 21 passed; Sessions view 47 passed; spawn requester-incarnation coverage passed across all three producers and SQLite reload. Six historical upgrade/ownership cases passed after persisting released-format rows, closing both SQLite owners, clearing the registry, and reopening at startup. The row codec and normalizer are unchanged from released commit eb377ac; this is a persisted synthetic-state test, not an old-binary deployment.

The UI E2E shows interruption clearing red attention and a later real failure restoring it. Inspected synthetic screenshots are below. After integrating main’s wake/UI refactors, the Gateway replay, spawn-incarnation, and parent restart suites passed (38 tests); progress-card unit tests passed (53), the sidebar E2E passed, and core/UI types passed. All selected typecheck, lint, formatting, schema, and import gates completed; Swift/Kotlin protocol and i18n checks need no generated changes. Independent Codex review of the full candidate found no actionable P0 findings; the final batch correction also passed an independent P0/P1 review.

After integration, CI run 36331082383 stopped on the Windows registered media-tool test: its pre-existing 68-byte PNG had invalid IDAT CRC and zlib Adler32 checksums. Strict zlib and the actual shared Rastermill decoder both reproduced the exact “incorrect data check” failure. An independent canonical-fixture substitution verified the decoder fix locally. Main then landed the same root-cause repair in #159771; this branch retains that landed valid 67-byte PNG exactly and drops its duplicate edit. Strict CRC/zlib validation passes for the landed bytes. All registered image/PDF/image-generation assertions are unchanged. This is a test-input correction, with no product-code change. The Windows route passed in final CI.

CI run 36322522543 passed on the preceding corrected head. A later run, 36314996491, timed out in the unchanged Gmail hot-reload SecretRef fixture. Its original local shard selection passed (51 files/886 tests; two CI-only files excluded by local policy), and focused cases passed on Node 26 and 24.21. The Linux/Node 24.19 timeout remains unexplained; no timeout, assertion, or retry was weakened, and passing replays are not claimed as a fix. Final-head CI passed.

Measured test cost

Commands use pnpm test <file> --maxWorkers=1; UI E2E uses its dedicated wrapper. Existing fixtures are reused. Cold compiler/worker preparation contributes materially to wall time.

Test file / selection Command wall Added work
main-session-restart-recovery.test.ts, full suite 289.62 s Original roster case 0.790 s; current replacement/reset boundary cases also verified
subagent-announce.requester-settle-results.test.ts 11.12 s Added scenario 0.003 s
subagent-parent-recovery.restart-integration.test.ts 107.07 s Assertions in existing restart cases
subagent-registry.store.sqlite.test.ts 29.02 s Assertions in existing compact-read case
subagent-orphan-recovery.restart-integration.test.ts, six upgrade cases 41.73 s Actual SQLite close/reopen in existing ownership fixture
session-utils.subagent.test.ts 335.48 s cold Two ownership cases total 1.83 s; extracted harness preserves one fixture
session-message-events.test.ts, recovered event 45.70 s Existing exactly-once case, expected status updated
server.startup-recovery-webchat.test.ts 62.49 s Existing real Gateway fixture covers main recovery and saved-batch current/reset/restored-history requests through HTTP
server.subagent-settle-replay.harness.test.ts Gateway shard 44.47 s; combined five-file focused command 72.49 s Four new cases total 0.413 s; existing Gateway reused
subagent-spawn.requester-incarnation.test.ts 25.11 s Existing native/ACP/visible capture table extended with lifecycle revision
sidebar-restart-recovery.e2e.test.ts 19.28 s including Vite Scenario 1.610 s

The long existing suites cover real recovery/storage/worker composition. The real Gateway test is needed because session reset preserves its ID; a session-ID-only mock missed that boundary. No new Gateway fixture, polling loop, worker pin, or timer increase was added. On passing CI run 36310109829 the relevant compact-large-19 job took 388 s and UI E2E jobs took 246–436 s.

Before: restart interruption appears as a red child failure

After: restart interruption has a neutral pause indicator

Preserve typed restart interruptions, identify unfinished children in parent recovery input, and prefer retained-session continuation after checking uncertain effects. Keep genuine execution failures and exact-owner recovery delivery exhaustion visible. Cover restart persistence, parent dispatch, projection ownership, and the rendered sidebar.
@clawsweeper

clawsweeper Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling size: XL labels Sep 27, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 27, 2026
@clawsweeper

clawsweeper Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 27, 2026, 12:58 PM ET / 16:58 UTC (Revision 8).

ClawSweeper review

What this changes

The branch preserves typed child-run restart interruptions, gives the recovering parent a scoped list of unfinished children, and shows interruptions with a neutral status in the Gateway and Control UI.

Merge readiness

✅ Ready for maintainer review

Current main still shows restart interruptions as child failures and does not provide a lifecycle-scoped recovery roster. This PR addresses that remaining behavior, with positive provider-boundary and upgrade evidence. The discussion expressly accepts the additive status and historical-record semantics.

Priority: P1
Reviewed head: 84f5524596e5fbbeb4054a982048434a3372729f

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch has focused ownership checks and unusually strong boundary and visual evidence, with no concrete remaining correctness finding.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The changed recovery owners are exercised through an isolated Gateway and local HTTP model provider: current child addresses reach the parent prompt, while pre-reset and restored stale addresses do not. Inspected before/after UI screenshots show the status change. Existing-state compatibility is supported by SQLite reopen cases, an unchanged v2026.9.6 row codec, and a successful published-updater candidate run; this host could verify the run and job results but could not open its detailed Actions artifact.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The changed recovery owners are exercised through an isolated Gateway and local HTTP model provider: current child addresses reach the parent prompt, while pre-reset and restored stale addresses do not. Inspected before/after UI screenshots show the status change. Existing-state compatibility is supported by SQLite reopen cases, an unchanged v2026.9.6 row codec, and a successful published-updater candidate run; this host could verify the run and job results but could not open its detailed Actions artifact.
Evidence reviewed 11 items Current main still has the reported behavior: Current main converts a stored interrupted session status to failed; its restart message does not include a child recovery roster.
PR-owned recovery selection: The introduced restart path selects child runs using requester agent, physical store, session ID, and lifecycle revision before adding a roster to the parent turn.
Saved-batch authority: The saved-batch path filters actionable recovery rows by the captured parent identity and checks the current session again before delivery.
Findings None None.
Security None None.

How this fits together

OpenClaw stores parent sessions and child runs in SQLite. After a Gateway restart, recovery reads those records to resume the parent; the Gateway also projects child status to clients such as the Control UI.

flowchart LR
  A[Saved parent session] --> C[Gateway restart recovery]
  B[Saved child runs] --> C
  C --> D{Current parent ownership?}
  D -->|Yes| E[Child recovery roster]
  D -->|No| F[Diagnostic history only]
  E --> G[Parent model turn]
  B --> H[Gateway session status]
  H --> I[Control UI indicator]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +255, Tests +901, Docs +29. Total +1185 across 48 files.

View PR surface stats
Area Files Added Removed Net
Source 31 384 129 +255
Tests 16 1132 231 +901
Docs 1 33 4 +29
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 48 1549 364 +1185

Review metrics

Metric Value Why it matters
Net code growth production +255 lines, tests +901 lines The production growth spans the shared recovery and status contract; the PR body explains the boundary coverage and reports test costs.

Technical review

Best possible solution:

Use one lifecycle-checked recovery roster to guide the parent while retaining diagnostic history and distinguishing ordinary interruptions from genuine execution or delivery failures.

Do we have a high-confidence way to reproduce the issue?

Yes. Current-main source maps interrupted status to failed and omits the child roster from restart dispatch; the PR records the resulting recovery scenario at an HTTP provider boundary. This reviewer did not execute the code.

Is this the best way to solve the issue?

Yes. The patch uses the existing registry, recovery, Gateway projection, and UI owners, with parent lifecycle checks at the actionable roster and delivery boundaries.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against e2aa96231351.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The changed recovery owners are exercised through an isolated Gateway and local HTTP model provider: current child addresses reach the parent prompt, while pre-reset and restored stale addresses do not. Inspected before/after UI screenshots show the status change. Existing-state compatibility is supported by SQLite reopen cases, an unchanged v2026.9.6 row codec, and a successful published-updater candidate run; this host could verify the run and job results but could not open its detailed Actions artifact.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The changed recovery owners are exercised through an isolated Gateway and local HTTP model provider: current child addresses reach the parent prompt, while pre-reset and restored stale addresses do not. Inspected before/after UI screenshots show the status change. Existing-state compatibility is supported by SQLite reopen cases, an unchanged v2026.9.6 row codec, and a successful published-updater candidate run; this host could verify the run and job results but could not open its detailed Actions artifact.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P1: Restart recovery is an active agent workflow, and current main can leave interrupted child work looking failed.
  • merge-risk: 🚨 compatibility: The PR adds a public session status and an optional stored lifecycle field; the discussion accepts the semantics, and upgrade evidence covers the existing row format.
  • merge-risk: 🚨 session-state: Recovery now selects actionable child history by parent lifecycle, so a wrong selection would associate work with the wrong parent; boundary tests cover reset and stale records.
  • merge-risk: 🚨 security-boundary: The roster can direct a parent toward a child session; provider-boundary proof shows a reset parent does not receive the old child's actionable address.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The changed recovery owners are exercised through an isolated Gateway and local HTTP model provider: current child addresses reach the parent prompt, while pre-reset and restored stale addresses do not. Inspected before/after UI screenshots show the status change. Existing-state compatibility is supported by SQLite reopen cases, an unchanged v2026.9.6 row codec, and a successful published-updater candidate run; this host could verify the run and job results but could not open its detailed Actions artifact.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed recovery owners are exercised through an isolated Gateway and local HTTP model provider: current child addresses reach the parent prompt, while pre-reset and restored stale addresses do not. Inspected before/after UI screenshots show the status change. Existing-state compatibility is supported by SQLite reopen cases, an unchanged v2026.9.6 row codec, and a successful published-updater candidate run; this host could verify the run and job results but could not open its detailed Actions artifact.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Ayaan Zaidi: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vladimirkrdzic: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (7 earlier review cycles)
  • reviewed 2026-09-27T06:57:12.918Z sha e7a0c51 :: blocked before merge. :: [P2] Scope the child roster to the recovering requester store | [P2] Define upgrade handling for previously settled interruptions
  • reviewed 2026-09-27T07:37:25.995Z sha e7a0c51 :: needs real behavior proof before merge. :: [P1] Bind the child roster to the recovering requester store | [P2] Handle interruptions already settled by older builds
  • reviewed 2026-09-27T09:47:28.403Z sha 264ed00 :: needs real behavior proof before merge. :: [P1] Exclude children from a previous parent session incarnation
  • reviewed 2026-09-27T11:21:33.645Z sha 8bb442e :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-27T13:38:23.917Z sha 6526053 :: needs real behavior proof before merge. :: [P1] Bind settled-batch rosters to the original parent lifecycle
  • reviewed 2026-09-27T15:30:30.000Z sha 1a58778 :: needs real behavior proof before merge. :: [P1] Keep stale child identities out of recovery findings
  • reviewed 2026-09-27T15:59:37.018Z sha f46615c :: needs real behavior proof before merge. :: none

@steipete
steipete marked this pull request as ready for review September 27, 2026 07:03
@clawsweeper clawsweeper Bot added merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 27, 2026
Resolve physical session storage through its async owner before selecting retained child runs. Cover retired and unknown stores, upgrade reconciliation with typed restart ownership, and unchanged ambiguous history. Align the existing websocket and startup assertions with interrupted session status.
@clawsweeper clawsweeper Bot added the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Sep 27, 2026
Require the captured requester session identity after selecting the latest child generations. Preserve unscoped run-history queries and prove reset-parent exclusion at dispatch. Strengthen upgrade coverage by reopening SQLite records with and without retained restart ownership.
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Sep 27, 2026
Capture the requester lifecycle revision in every spawn path and use it for actionable restart rosters. Prove the real Gateway reset boundary at an HTTP model provider: reset keeps the session ID, current work is delivered, and pre-reset work is excluded while diagnostic history remains available.
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. and removed proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Sep 27, 2026
Integrate current main while preserving its wake and progress-card refactors. Keep actionable child identities exclusively in the requester-lifecycle-checked recovery roster; retain ordinary completion history and atomic batch settlement.
@steipete

Copy link
Copy Markdown
Contributor Author

Maintainer decision: I accept the additive interrupted sessions status and the handling of saved records that carry typed restart-recovery evidence. This is the requested behavior: an ordinary Gateway restart should resume the parent and present interrupted child work neutrally while the parent reconciles it.

The incomplete execution outcome remains recorded. Genuine execution failures, exhausted delivery failures, and ambiguous historical failures without typed restart evidence remain failures. Recovery does not blindly replay child commands. Existing completion history and atomic batch settlement remain intact; only the captured-parent-lifecycle roster supplies new child recovery instructions and addresses.

The PR includes client/protocol/UI checks, persisted-row SQLite reopen proof, and real Gateway/provider coverage. The remaining hosted CI and published-updater checks must complete before landing. This acceptance covers the public status and historical-record semantics; it does not authorize a deployment or restart of a live Gateway.

Reuse the real Gateway and Responses fixture for current, reset-revoked, and restored-history saved batches. Replace the corrupt Windows media-tool PNG with the canonical valid image fixture while preserving all assertions.
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 27, 2026
@steipete
steipete merged commit 3d62d4e into main Sep 27, 2026
240 checks passed
@steipete
steipete deleted the codex/parent-led-subagent-recovery branch September 27, 2026 17:09
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash auto-merge.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 28, 2026
…nclaw#159492)

* fix(agents): recover interrupted children without stale failures

Preserve typed restart interruptions, identify unfinished children in parent recovery input, and prefer retained-session continuation after checking uncertain effects. Keep genuine execution failures and exact-owner recovery delivery exhaustion visible. Cover restart persistence, parent dispatch, projection ownership, and the rendered sidebar.

* fix(agents): bind restart child recovery to its requester store

Resolve physical session storage through its async owner before selecting retained child runs. Cover retired and unknown stores, upgrade reconciliation with typed restart ownership, and unchanged ambiguous history. Align the existing websocket and startup assertions with interrupted session status.

* fix(agents): fence restart recovery to the parent session incarnation

Require the captured requester session identity after selecting the latest child generations. Preserve unscoped run-history queries and prove reset-parent exclusion at dispatch. Strengthen upgrade coverage by reopening SQLite records with and without retained restart ownership.

* fix(agents): retain parent lifecycle ownership through child recovery

Capture the requester lifecycle revision in every spawn path and use it for actionable restart rosters. Prove the real Gateway reset boundary at an HTTP model provider: reset keeps the session ID, current work is delivered, and pre-reset work is excluded while diagnostic history remains available.

* fix(agents): scope settled recovery guidance to parent lifecycle

* test: verify saved batch recovery at the HTTP provider boundary

Reuse the real Gateway and Responses fixture for current, reset-revoked, and restored-history saved batches. Replace the corrupt Windows media-tool PNG with the canonical valid image fixture while preserving all assertions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant