Skip to content

fix: preserve work and queued inputs across gateway updates - #139663

Merged
steipete merged 5 commits into
mainfrom
codex/team-update-recovery
Sep 6, 2026
Merged

steipete merged 5 commits into
mainfrom
codex/team-update-recovery

Conversation

@steipete

@steipete steipete commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Gateway updates could strand accepted follow-ups, leave interrupted child tasks without a parent reply, or resume native agents without their saved attachments. Open Control UI tabs could remain disconnected after one failed readiness check. Shutdown during native startup could also turn resumable work into a false failure and leave an error banner after a later reply succeeded.

Why This Change Was Made

Recovery now follows the existing execution, input-custody, and completion owners. Main turns use their admitted execution deadline instead of a separate failed-start watchdog. Recovered children use the current Gateway instance and preserve the parent's completion batch; yielded parents wait for that batch. Retired observers and execution handles cannot act for a replacement.

The browser retains text and attachment bytes until transcript consumption, then reconciles durable receipts on reconnect. Matching interrupted inputs receive fresh admission under the same authenticated sender and physical session. One-shot recovery works with ownership-bound inbound dedupe claims, including in-process restarts that retain the cache; old commit/release handles cannot disturb the replacement receipt.

Native steering and ACP persist canonical input before execution can have effects. Codex restores saved documents and images through an optional host capability that shares ordinary media preparation and enforces aggregate context and transport limits. Gateway shutdown carries its typed restart-cancellation reason before withdrawing capabilities, preserving user-abort and timeout precedence in chat and direct-agent terminal handling.

Automatic and manual browser reload recovery share bounded readiness checks. Private attachment copies survive same-attempt reconnect parking without overwriting edits or newer attempts. Reply grouping requires matching source identities. The refactor removes the recovery abort RPC, duplicate file-extraction policy, caption-based duplicate detection, obsolete helper exports, and unnecessary one-use wrappers.

Production changes are +1,206 net lines; tests/support are +3,980. Growth implements input re-admission, instance-bound recovery, and native media restoration. No configuration option, SQLite schema, retention policy, dependency, or protocol version is added. CHANGELOG.md remains release-owned.

User Impact

Eligible interrupted work resumes, each browser outbox preserves its input order, attachments remain usable, and parents receive their final follow-up after recovered children settle. Explicit cancellation and genuine execution timeouts remain terminal. Unknown submissions stay visibly unconfirmed until reconciled or explicitly retried; inputs with missing browser bytes or older non-resumable custody still require resend.

This is the maintainer-requested controlled-interruption contract. Update the owning Codex plugin artifact together with the Gateway: an intentionally pinned old plugin does not acquire native attachment recovery from a core-only update, and a newer plugin on an older host explicitly refuses unsupported restoration.

Downgrading to v2026.9.2 preserves newer receipts but rejects their same-ID retries before execution. Re-upgrade restores eligible unchanged-input recovery under fresh admission. Consumed collector receipts remain consumed and excluded from pending counts. Do not delete receipts or change IDs to bypass a downgrade conflict. This contract is documented and accepted in the maintainer discussion; downgrade verification combines stable-source inspection and store tests, not an old-binary execution claim.

Evidence

The integrated build passed, including declarations, SDK exports, 90 plugins, Control UI, and metadata. The final runtime/UI build verified all 146 changed-source hashes and its build metadata. Independent reviews found no actionable P0–P2 issues. Full hosted CI on ed35d985930d passed, including Windows.

Focused validation includes 708 UI owner tests, 209 reload/helper/authentication tests, 103 native steering/client/routing checks, 146 ACP unit/Gateway tests, 38 pending-input store tests, 35 restart integrations, and 193 main-recovery cases. Browser attachment, messaging, and active-turn recovery suites passed 12/12, 19/19, and 7/7. Main integration additionally passed 145 native/transport tests, 120 media tests, 67 dedupe/pending/queue tests, and the affected type/lint gates. The final cancellation repair passed 94 host/terminal/work-scope tests and 74 Gateway connection/close/lifetime cases. Relevant regressions failed before their repairs; final-count, byte-identity, and no-auto-replay assertions were retained.

Real live scenario Observed outcome
Main, child, yielded parent, FIFO, saturated capacity One final per task; saturated main admission waits of 10.7–50.0 seconds used one recovery attempt each; parent final delivered; no pending input.
Saved document and captionless image Native input retained the bytes and produced each hidden verification value once; image digits were absent from text input.
Accepted pending attachment across warm restart Same process, new boot ID; interrupted receipt, same-ID replay with identical bytes, one canonical input/final, pending0. Final reconnect measured 8.027 seconds; original task resumed; no chat errors or error banners.
Actual old-process/new-build replacement Same browser loaded the new document; original work, queued Blob, and restored unsent draft Blob completed once. Cold local reconnect measured 43.0 seconds.
Consumed old-version collector receipts Cached success after update, unchanged transcript, no execution.
Readiness timeout First real HEAD timed out around three seconds, next probe succeeded, one reload, retained draft/Blob delivered once.
Copied-tab attachment fault One outgoing frame deliberately dropped; server confirmed no custody before retry. A native duplicated tab adopted a new private reference with identical bytes while FileReader was held; one explicit retry produced user1/final1/pending0. No fabricated RPC responses or database rows.

Inspected evidence: recovery and native media, code replacement and readiness timeout, final main/parent, steering, and copied-tab proof, and startup-cancellation before/after on the final head.

These are isolated real Gateway/provider runs. ACP live evidence proves source-before-effects ordering, not automatic ACP-client resume. Timings are local observations, not a production downtime guarantee. Test Gateways exited cleanly and task credentials were removed. No production Gateway was changed.

@clawsweeper

clawsweeper Bot commented Sep 6, 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.

@steipete
steipete marked this pull request as ready for review September 6, 2026 03:10
@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 extensions: codex plugin: file-transfer size: XL maintainer Maintainer-authored PR labels Sep 6, 2026
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Live recovery evidence from an isolated real Gateway and Control UI with synthetic data. The recording covers an interrupted main turn, retained FIFO follow-ups, a recovered child and yielded parent, and saturated recovery capacity. Each final appeared once and pending input returned to zero.

The screenshots show a document before submission, its answer after restart using the retained attachment, and a captionless image recovered after restart. Actual native-input inspection confirmed the document contents and image bytes reached the model.

Document before submission

Document recovered after restart

Captionless image recovered after restart

attachment-2995886852.webm

@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. 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. labels Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 6, 2026, 3:05 AM ET / 07:05 UTC.

ClawSweeper review

What this changes

Preserves interrupted agent work, queued browser messages, and saved attachments across Gateway updates, while improving browser reconnection recovery.

Merge readiness

⛔ Blocked before merge - 3 items remain

This PR remains useful: current main still requires explicit resend of interrupted browser inputs. No actionable introduced defect was found in the inspected recovery paths. The discussion already accepts the documented compatibility contract; the previous review’s downgrade note does not establish a new approval blocker.

Priority: P1
Reviewed head: 7ef2baea3ec425ff3aa76def67fc3f571ed688b2

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A coherent repair with strong production observations, focused refusal coverage, and no identified blocking defect.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): Captured production observations connect the changed Gateway, outbox, native steering, and child-recovery owners to isolated real Gateway/provider runs with retained attachment bytes, single finals, and zero pending input. The latest dedupe adaptation has focused source/regression evidence; media could not be independently opened in this runner.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): Captured production observations connect the changed Gateway, outbox, native steering, and child-recovery owners to isolated real Gateway/provider runs with retained attachment bytes, single finals, and zero pending input. The latest dedupe adaptation has focused source/regression evidence; media could not be independently opened in this runner.
Evidence reviewed 11 items Current main still lacks automatic input recovery: Current-main restart documentation explicitly requires resend for unconsumed accepted input, and its inbound dedupe owner has no recovered-input reclaim path.
Pinned introduction boundary: Inspected the complete local merge-base-to-head path list and introduced production hunks rather than attributing endpoint drift to this PR. The host independently verifies the test merge’s base and head parents. The original head’s raw parent is 4eee7ff.
Fresh request identity and one-shot recovery: Request fingerprints include the admitted physical session, authenticated sender identity, submitted fields, and administrator scope. Reclaim requires the exact current recovered source, unchanged queued bytes, no consumption, and an unused owner-bound claim; in-flight dedupe claims cannot be displaced.
Findings None None.
Security None None.

How this fits together

Gateway recovery reconnects durable session and input records with newly admitted execution after a restart. The Control UI retains submission bytes until consumption, while agent and child-task owners resume work and deliver replies.

flowchart TD
  A[Browser outbox] --> B[Durable pending input]
  C[Gateway restart] --> D[Recovery reconciliation]
  B --> D
  D --> E[Fresh admission]
  E --> F[Agent and child execution]
  G[Saved attachments] --> F
  F --> H[Transcript consumption and replies]
  H --> A
Loading

Before merge

  • Resolve merge risk (P1) - Downgrading to v2026.9.2 intentionally leaves newer retained receipts unable to retry until re-upgrade; validation establishes stable-source and store behavior, not an old-binary downgrade run.
  • Resolve merge risk (P1) - A core-only update with an intentionally pinned older Codex plugin will not restore saved native attachments; a newer plugin on an older host explicitly refuses attachment restoration.
  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
Agent review details

Security

None.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Production and test growth production +1,203 net; tests/support +3,905 net The measured growth has a stated purpose: input re-admission, Gateway-bound recovery, and native attachment restoration.
Plugin capability 1 optional host capability added Saved attachment preparation adds a documented plugin contract with explicit older-host behavior.

Stored data model

Persistent data-model change detected: serialized state: extensions/codex/src/app-server/run-attempt-active-turn.ts, serialized state: ui/src/test-helpers/control-ui-e2e.ts, unknown-data-model-change: extensions/codex/src/app-server/run-attempt-active-turn.ts, unknown-data-model-change: ui/src/test-helpers/control-ui-e2e.ts, unknown-truncated-pull-files. Migration or upgrade compatibility proof is recorded; maintainers should verify it before merge.

Merge-risk options

Maintainer options:

  1. Retain the documented compatibility contract (recommended)
    Carry forward the already accepted downgrade refusal and coordinated plugin deployment requirements without reopening the same product decision.

Technical review

Best possible solution:

Keep recovery with the existing admission, transcript, and child-completion owners, preserving the accepted downgrade contract and coordinated Gateway/Codex-plugin deployment.

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

Yes: current-main source still treats a completed inbound dedupe receipt as final even when its pending input is interrupted; the new regression follows that exact restart sequence. This review inspected the path without executing it.

Is this the best way to solve the issue?

Yes: the patch repairs existing custody and lifecycle owners, rechecks current authority, and shares attachment preparation instead of introducing parallel persistence or execution paths.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against f2ba79354177.

Labels

Label justifications:

  • P1: Gateway updates can interrupt active work and strand accepted follow-ups or parent replies in established workflows.
  • merge-risk: 🚨 compatibility: New receipt identities and native media restoration carry explicit downgrade and Gateway/plugin version-pairing consequences.
  • 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 (live_output): Captured production observations connect the changed Gateway, outbox, native steering, and child-recovery owners to isolated real Gateway/provider runs with retained attachment bytes, single finals, and zero pending input. The latest dedupe adaptation has focused source/regression evidence; media could not be independently opened in this runner.
  • proof: sufficient: Contributor real behavior proof is sufficient. Captured production observations connect the changed Gateway, outbox, native steering, and child-recovery owners to isolated real Gateway/provider runs with retained attachment bytes, single finals, and zero pending input. The latest dedupe adaptation has focused source/regression evidence; media could not be independently opened in this runner.

Evidence

What I checked:

  • Current main still lacks automatic input recovery: Current-main restart documentation explicitly requires resend for unconsumed accepted input, and its inbound dedupe owner has no recovered-input reclaim path. Public docs: docs/gateway/restart-recovery.md. (docs/gateway/restart-recovery.md:25, f2ba79354177)
  • Pinned introduction boundary: Inspected the complete local merge-base-to-head path list and introduced production hunks rather than attributing endpoint drift to this PR. The host independently verifies the test merge’s base and head parents. The original head’s raw parent is 4eee7ff. (7ef2baea3ec4)
  • Fresh request identity and one-shot recovery: Request fingerprints include the admitted physical session, authenticated sender identity, submitted fields, and administrator scope. Reclaim requires the exact current recovered source, unchanged queued bytes, no consumption, and an unused owner-bound claim; in-flight dedupe claims cannot be displaced. (src/config/sessions/session-accessor.sqlite-pending-inputs.ts:203, 7ef2baea3ec4)
  • Recovery regression and refusal coverage: Read the new dispatch regression and controls for initial, in-flight, expired-cache, consumed, wrong-session, wrong-input, and revoked owners. Gateway admission tests additionally reject changed senders, changed payloads, cancellation, and same-generation recovery. These tests were inspected, not executed. (src/auto-reply/reply/dispatch-from-config.pending-restart.test.ts:18, 7ef2baea3ec4)
  • Downgrade contract checked against stable source: v2026.9.2 compares its unprefixed message hash before consumed-receipt handling, so newer request-bound hashes reject without executing. The added store cases cover retained interrupted and consumed collector receipts plus re-upgrade. This supports the stated source/store contract, not an old-binary downgrade claim. (src/config/sessions/session-accessor.pending-inputs.ts:175, 3928bad9badf)
  • Accepted compatibility discussion: The supplied maintainer discussion explicitly accepts recovery through existing custody owners, documents refusal of newer receipts during downgrade, and requires coordinated Gateway/Codex-plugin deployment: fix: preserve work and queued inputs across gateway updates #139663 (comment) . The prior completed review contains no findings or published rank-up moves. Public docs: docs/gateway/restart-recovery.md. (docs/gateway/restart-recovery.md:62, 7ef2baea3ec4)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Jason (Json): 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-06T03:18:35.579Z sha caf4eef :: blocked before merge. :: none
  • reviewed 2026-09-06T05:04:31.036Z sha 68b127254afc1b8bda3744643acef3ad344412d2 :: blocked before merge. :: none
  • reviewed 2026-09-06T05:21:02.705Z sha ba8d5b8b084b359b3d984c33fc42c46ffb0682e3 :: blocked before merge. :: none
  • reviewed 2026-09-06T05:51:48.956Z sha 469235466b98e7f32278bcad12548d7b788ba868 :: blocked before merge. :: none
  • reviewed 2026-09-06T06:07:21.020Z sha 9621e29547ff420b76fdb4d901a628f78a162726 :: blocked before merge. :: none
  • reviewed 2026-09-06T06:35:06.698Z sha 9621e29547ff420b76fdb4d901a628f78a162726 :: blocked before merge. :: none
  • reviewed 2026-09-06T06:53:33.281Z sha 9621e29547ff420b76fdb4d901a628f78a162726 :: blocked before merge. :: none

@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

The corrected real code-swap and readiness-timeout tests passed with package symlink targets verified before each process starts and no module-resolution or startup-migration warnings.

The old Gateway was replaced by the new build; the same browser reloaded automatically, retained the unsent draft and attachment, and completed the original turn, queued attachment, and draft attachment once each. Two genuine consumed receipts from the old collector returned cached success after update, with unchanged transcript contents and no execution.

Disconnect to the new Control UI connection measured 43.0 seconds in this cold local run. This is continuity evidence, not a production latency guarantee. The second recording stalls the first real readiness HEAD: it times out at 2,995 ms, the next probe succeeds, exactly one reload occurs, and the retained attachment completes once. All data shown is synthetic.

Running turn with queued and unsent attachments before update

Recovered work and retained draft after update

attachment-1340612630.webm
attachment-444405080.webm

@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

The compatibility contract is now explicit in the PR body and restart-recovery documentation. This implements the accepted maintainer recovery scope using the existing custody owner: no new configuration keys, tables, columns, indexes, retention policy, or protocol version.

A v2026.9.2 downgrade refuses same-ID retries against retained newer request-bound receipts before execution and leaves them intact. Re-upgrade restores matching unconsumed input through fresh admission when the session/input is unchanged; consumed collector receipts remain nonexecuting and excluded from pending counts. Individually consumed inputs already use transcript idempotency. Both retained-receipt cases pass in the 38-test store suite; the stable-tag hash comparison was inspected directly. This is source-contract plus store proof, not a claim that an old binary was run for the downgrade.

Matching Gateway/Codex-plugin deployment is documented. A pinned older plugin lacks the repair; a newer plugin on an older host reports unavailable saved-media restoration explicitly.

Corrected real old-build/new-process replacement and readiness-timeout proof is complete and attached above. It verified package symlink targets, clean startup, retained drafts/Blob bytes, one final per task, and old consumed receipts returning cached success without new execution. The cold local disconnect-to-UI interval was 43.0 seconds, not a production guarantee.

CI findings were repaired and rechecked: import ownership, test routing, native pre-serialization authority, keyless transcript identity, update-owned reload retries, distinct reply grouping, and reconnect copy adoption. Final exact-head CI is running.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Additional browser proof for the reconnect attachment-copy race (real Control UI, mocked Gateway, synthetic data): before the fix, a private Blob copy was allocated but the reconnect state transition prevented adoption, leaving the attachment absent from the message. After the fix, the same attempt adopts its private copy while remaining unconfirmed; one explicit Retry consumes the canonical input and clears the warning.

The test gates native FileReader completion until reconnect has parked the row, then verifies exact old/new Blob bytes, independent tab ownership, zero automatic sends, and deletion only after confirmed consumption. The final screenshot shows consumed input, not a completed model response; real-provider completion proof is in the earlier recordings.

Before: attachment copy is not adopted

After: private attachment copy survives reconnect

After explicit Retry: input consumed and warning cleared

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 6, 2026
@steipete
steipete force-pushed the codex/team-update-recovery branch 2 times, most recently from 4692354 to 9621e29 Compare September 6, 2026 06:00
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Final integration proof used the rebuilt candidate on base 270a650c79f1, frozen patch SHA-256 76a1da775e1f62f7610d8f6006173495e1d929e5f44bb636ccb9a42df8e7ade6 (140 verified source paths). The later 9621e29547ff rebase changes only SDK documentation context and drops a fixture correction already present on main; the task's runtime repairs are unchanged. The complete hosted CI run on 9621e29547ff passed, and native preparation accepted that evidence.

The final real Gateway main/child/yielded-parent restart passed: the main used one recovery attempt, the parent used no separate main recovery attempt, the recovered child completed successfully and delivered its result, and the parent wake cleared. Each visible final appeared once and no input remained pending. The attached captures show synthetic work before restart and both completed replies afterward.

The final native steering restart also passed on Codex CLI 0.153.4. The canonical steering input existed before native consumption; the old rollout had not received it, while the replacement rollout did. The retained commentary prefix remained before the steering row. Final history contains exactly one canonical steering message, one matching final reply, and zero pending inputs.

The final attachment-copy fault test passed through the real Gateway and provider. Exactly one outgoing synthetic chat.send frame was dropped. Before retry, direct server reads twice confirmed no receipt, pending row, or canonical user message. A browser-native duplicated tab held its real FileReader while reconnect parked the row; releasing it adopted a different private payload key and tab identity with identical 77-byte contents and unchanged submission identity/attempt. One explicit Retry forwarded one real request and produced one canonical user message, one model final, and zero pending inputs. No RPC response or database row was fabricated. Localhost reload correctly retains its Web Lock identity; native tab duplication exercises the private-copy transition.

The latest ClawSweeper review reports no actionable code or security findings. Its compatibility items retain the documented maintainer contract: upgrade Gateway and Codex plugin together; a downgrade preserves newer receipts but refuses their retries, and unchanged inputs can recover after re-upgrade. No new configuration option, SQLite schema, retention policy, or protocol version was introduced. Stable-source/store proof is not an old-binary downgrade claim.

final-main-before

final-main-completed

final-parent-completed

final-native-steer-completed

final-copy-unconfirmed

final-copy-completed

@steipete
steipete force-pushed the codex/team-update-recovery branch from 9621e29 to 7ef2bae Compare September 6, 2026 06:57
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

The final warm-restart proof on ed35d985930d passed through the real Gateway, Control UI, and Codex runtime. The Gateway retained PID 8956 across restart while its boot ID changed; the RPC client reconnected in 8.027 seconds. A positively accepted, unconsumed attachment became interrupted and was re-admitted with the same request ID and identical wire bytes. Its canonical user row and final reply each appeared once, with zero pending input.

This rerun also requires zero chat-error events and zero visible error banners, and both passed. The original interrupted task resumed and reported its outcome before the attachment reply. The earlier run on 7ef2baea3ec4 had delivered the attachment but falsely failed the original startup and left a red host-capability error; its screenshot is the before image below.

The repair records the existing typed restart reason on the exact Gateway work lifetime before capability withdrawal. Harness capabilities preserve that captured reason when their existing authority guard rejects. Shared terminal handling recognizes it even before the caller signal aborts, while prior user cancellation and timeouts retain precedence. Authority checks remain intact; there is no UI error suppression. Existing single-flight cleanup wrappers were simplified, leaving a net three-line production increase for this repair.

Both defects reproduced in focused regressions before the fix. Validation passed 94 host/terminal/work-scope tests, 74 Gateway connection/close/lifetime cases, affected test-type graphs, typed lint, and independent P0–P2 review. The current-head runtime/UI build passed, with all 146 changed-source hashes and build metadata verified. The attached before/after screenshots were inspected and contain only synthetic test data. Full hosted CI on this final head remains the merge gate.

host-close-before

host-close-after

@steipete
steipete merged commit 1594ebf into main Sep 6, 2026
202 checks passed
@steipete
steipete deleted the codex/team-update-recovery branch September 6, 2026 07:51
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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

* fix: preserve work and queued inputs across gateway updates

* fix: close recovery ownership and UI reconciliation gaps

* test: preserve pre-consumption reconnect fixture ordering

* fix: preserve restart recovery with owned dedupe claims

* fix: preserve restart cancellation during harness startup
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 extensions: codex gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. plugin: file-transfer 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