Skip to content

feat(code-mode): send current replies without an extra turn - #119057

Closed
vincentkoc wants to merge 17 commits into
fix/code-mode-slack-transport-stack-20260908from
fix/code-mode-semantic-observation-stack-20260804
Closed

vincentkoc wants to merge 17 commits into
fix/code-mode-slack-transport-stack-20260908from
fix/code-mode-semantic-observation-stack-20260804

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 4, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Enables one host-authorized reply to the current conversation from an OpenClaw Code Mode cell without an extra model turn, while preventing retained or substituted tools from borrowing later authority.

Why This Change Was Made

The host owns the exact private tool instance, source invocation, writer lifetime, and cancellation. Same-cell terminal delivery is available only to a runtime advertising per-result terminal handling. Acknowledged or ambiguous delivery suppresses duplicate ordinary final delivery.

Permission refresh shares one atomic admission at the private completion record while rebuilding tool instances. Reservation precedes awaited preparation. Producer-recorded non-dispatch permits a retry only after preparation settles before adapter handoff; post-handoff ambiguity retains the one-shot fence. Original errors and late acknowledgements retain their meaning.

The follow-up composes real outer-loop completion with delivery and persistence. It addresses prepared custom activity whose captured parent was not passed to append, and outer-completion leaf drift after a legitimate delivery mirror. Shared repairs live in PR1; this layer supplies real-loop regression coverage and integration wiring. A newer user, writer, or lifecycle must not be adopted by the old invocation.

User Impact

The model receives explicit OpenClaw Code Mode framing, positive JavaScript/TypeScript guidance, and deterministic one-cell composition. Observation is reserved for genuine ambiguity or authority conflicts. Retained tools cannot reuse closed or replacement authority.

Stack And Scope

All five PRs remain draft. Frozen integration base: fe1c715de7eccc5ce1ec9f7de6b2eb64c6248ad1, observed on September 11, 2026. This exact target is fixed for the proof; it is not a claim to track later moving main.

Layer Current Frozen-Main Candidate Head
PR1 2ad458b0cbfdcd4c327d11ceb5169464b53b7f54
PR2 6db9a7156affee1c9ee182bcf41d61e93f40d195
PR3 a64afa8675245ff71ab3d954fecb625ae9b5ec56
Slack 7e7df513bddb6ee15f342e3fe1cd4cb94afe9d6b
PR4 708809cdc2cdbb09c1184ce74838fbf283b71419

Base branch: fix/code-mode-slack-transport-stack-20260908; candidate layer base: 7e7df513bddb6ee15f342e3fe1cd4cb94afe9d6b. Final composed candidate tree: ad32f67773244e30f12d07d8d634d1584a17630f. The stack has 43 signed commits and spans 359 changed paths against frozen main fe1c715de7eccc5ce1ec9f7de6b2eb64c6248ad1. The inherited full-runtime wake repair and completion-order regression are placed in PR3; downstream layers are replayed in their existing ownership order. All 41 prior author/message/date records and reviewed replay patches are preserved after the test insertion. Reviewed main-composition adaptations are described below. Temporary diagnostic-helper commits are excluded. Focused exact-tree proof is recorded below; this is not full-stack, type, release or moving-main qualification.

PR1 owns shared repairs, fixture/setup/lint and filesystem-race corrections, and stack-local npm/Workshop prerequisites; these prerequisites are not already supplied by main. PR3 owns R's released-ownership fixture; Slack owns B's Enterprise physical-transport tests.

Frozen main already contains the canonical native locale repair from PR 143928, commit 89a1abd12ff92d78e0a5d2cf22641968dce828ea. The duplicate stack commit was omitted only after ancestry and all 44 generated postimages matched; canonical contributor credit remains in main.

This layer owns A, real foreign-session construction rejection with zero effects and unchanged state; C, native HTTP upload allow/revoke/lost-completion cases; and real embedded outer-loop tests for persisted activity, permission refresh, once-only mutation/reply, and next-turn isolation. The shared helper uses the bundled plugin public surface, without a new boundary allowlist or production export.

TaskFlow, streaming, and loader/models-set diagnostics remain separate from causal fixes. Self-yield passed 2/2 on 64fa; the OTel caller-context fixture repair still needs new-head execution. The predispatch diagnostic captures bounded request digests and one best-effort history summary only after the unchanged two-request assertion fails, then rethrows the original failure. No request filter, assertion, deadline, or production behavior is relaxed; the extra request's cause remains unclassified.

createToolSurface and commitProviderTranscriptPrefix stay independent. Requester-yield filtering precedes final wrapping; plugin namesakes and public inventory cannot supply private terminal authority. The per-instance one-shot latch remains intentional.

Evidence

Full Runtime Wake Retirement And Frozen-Main Integration (2026-09-11)

Release note: full runtime close/restart now retires stale heartbeat wake work with its discarded runtime payloads. Ordinary handler replacement still preserves pending work. The repair adds lifecycle fencing, terminal waiter settlement and cancellation checks before resumed preparation, session mutation, typing and dispatch; it adds no empty-wake skip, timeout, retry or public API.

The inherited owner mismatch was reproduced on signed 59d7b211646336d042e4a5275cdcdf1d54278f00: both deterministic close/restart cases failed at the intended stale successor-call assertion (before run). On diagnostic-backed 5789c87d38da11dac66c907ec350f5b19e52bbc0, all 24 lifecycle cases and the unchanged allowed/cancelled/retained Gateway prefix passed (repair run); retained notice and durable-state assertions were reached. That diagnostic tree recorded 2/0/0 physical POSTs with complete bounded correlation and cleanup. Those physical-count facts apply only to that diagnostic tree.

The diagnostics-free composed tree 615c58eb2676faa936ef121fed674be0c3b59e88 separately passed the same 24 lifecycle cases and original Gateway prefix (clean run). All selected cases ran with zero automatic retries; the canonical E2E private-QA build and all test/report exits passed. This proof does not transfer to the later rebase.

The frozen-main integration run on 6b9bb1514c196d217af2d718d9778575b4beda7a executed all 207 selected cases with zero automatic retries: 206 passed and one main-added subscription assertion failed because it still expected one argument. Infra 34/34, agent support 68/68, reply lifecycle 33/33, packaging 16/16 and the original Gateway prefix 3/3 passed; embedded tests were 52/53. The SDK gate measured 4457 public exports/153 entrypoints with zero forbidden subpaths, and the canonical E2E build passed (integration run). The nonzero outcome is retained.

The test-only correction on 708809cdc2cdbb09c1184ce74838fbf283b71419 keeps the original media-trust matcher, explicitly requires the absent second completion-owner argument, and adds one-call and Set-reference assertions. The affected file then passed 29/29 with zero automatic retries on the corrected SHA (focused follow-up). Test, native-report and process exits were zero; its owned lease stopped. All other source bytes match the integration tree; their evidence remains bound to 6b9bb1514c196d217af2d718d9778575b4beda7a, not described as a second 207-case run.

The final stack is rebased onto frozen main fe1c715de7eccc5ce1ec9f7de6b2eb64c6248ad1. Reviewed composition preserves both Windows test-list additions, combines the SDK surface at 4457 exports/153 entrypoints, retains main's migration recovery/refusal and lane-controller behavior, and ports the stack's activity/observer fencing into main's pure task publication owner. Completion performs explicit managed-cancellation reconciliation before deferred observers. A new direct completion regression checks committed task/subagent/flow visibility, exact observer count and reopened durable generation. Both cancellation tests and both subscription capability sets remain.

The wake repair contributes net +95 production lines and +410 test lines, justified by full-lifecycle ownership. Its clean PR3 placement and downstream replay exclude all temporary diagnostic-helper commits. The final 43-commit signed stack preserves the prior 41 author/message/date records and reviewed replay patches, with two additional test-only integration commits. Gateway helper bytes match the prior public source.

This is focused correctness and frozen-main integration proof, not a new 48-case run, frontier comparison, Beta recommendation, supported-release/upgrade proof, typecheck or moving-main guarantee. The original 47/48 failure and subsequent diagnostic failures below remain historical evidence; the exact historical event46-to-wake31 lineage was never established. Exact-head CI/type/lint, remaining owner/upgrade review gates and landing approval remain outstanding.

Admission Trace; Original Failure Preserved (2026-09-11)

The native diagnostic run used unpublished source 6fb2b529ae05e9e68712782878f60b11a78d9a08, tree d56fdd6aee6025edb35b06899acbf74873db5f78, and exact-tree carrier 9f63430ec7fbf8eadf459cab268db1b48ea31005. Two planned invocations ran once each, with zero automatic test retries: isolated retained 1/1 passed, then the original allowed/cancelled/retained prefix 2/3 passed. Prefix physical POSTs were 2/0/1, three total. The original 47/48 result and its retained failure are not replaced by the isolated pass.

The failing POST uniquely joins a background-task heartbeat requester and precedes the held recovery dispatch by 4,595 ms. Its requester claim was validated, but originating task authority remains unproven: the earlier cancelled-task event cannot be uniquely joined to the wake, whose pending and selected event lists were empty. Admission capture correctly remains incomplete despite no capture drops and completed cleanup. The original zero-call assertion remains red; later durable-state assertions were not reached. This does not establish a stale held-recovery dispatch or a legitimate originating-task request.

Source review separately establishes a full-close lifecycle mismatch: Gateway close stops the heartbeat runner, then drains global lifecycle state. System-event queues are cleared, but pending wake state survives. These eight relevant production files are byte-identical to frozen base 8d7c8caba1d1bbdc06dff641d4b71fcd7b318261; this is neither latest-main nor shipped-behavior proof. The repair owner is full runtime drain, preserving intentional handler-replacement retention, not an empty-wake consumer guard. No repair is published here.

12 review moves remain, not 12 proven bugs; overlapping Before-merge owner/upgrade risks remain unresolved or only partially evidenced. Earlier dated evidence below remains historical. No Beta, performance, or current-main qualification is claimed. Next evidence is a deterministic full-close/wake-owner lifecycle regression, then the original prefix after an approved owner fix, not another broad or model campaign.

Focused Verification; Unresolved Failure (2026-09-10)

  • The published composed stack at 076c0f6da337bec075322e5c85b6b0de9cc4008b / tree 270fa87b134f9cbc1bfbbef36a0a47e7e4d0a319 executed all 48 selected mock/loopback cases: 47 passed, 1 failed, 0 selected skips, zero framework retries; the wrapper's no-output retry was also disabled. QA cleanup 11/11, session mutation 22/22, observer cases 6/6, Gateway ownership 4/5, transport rejection recovery 1/1, and Slack Enterprise 3/3. The original retained-owner zero-POST assertion remains red; its later durable assertions were not reached. Initial execution and nine-case continuation are separate attempts, not one successful run.
  • Unpublished, test-only diagnostics are not part of these PR heads. At b84bb7b28d7843b4bf81daab5e240e92b098de11, retained alone passed 1/1. At e46789e3ebfce51300f5b7676b079d4549adced0 / tree f5abfd72151421e86a1ec081cde9281e916bbfee, the paired diagnostic passed retained-alone 1/1, then passed only 2/3 in the original allowed, cancelled, retained order. Separate invocations, reports and exits are preserved; no failed-case retry or assertion weakening occurred.
  • Unique trusted model-start/physical-POST correlation attributes the failing request to a requester run, not the held recovery run. It precedes the held dispatch by 4,566 ms. Requester producer and authority remain unresolved; repeated fixture session identity does not prove carry-over. No production repair, legitimate-traffic exemption, or green reclassification is claimed. Next required fact: a pre-start canonical producer admission joining run/generation to provenance, source owner/revision and admission/idempotency identity, covering announcement Gateway and heartbeat inbound dispatch. No further experiment is authorized by this update.
  • The original consumer/dependency startup error, multi-config reporter error, retained-capsule transport failure, and portal metadata timeout warnings remain recorded. All owned leases are stopped. ShellBench was untouched. These results provide partial focused proof only; all 12 rank-up proof/owner requirements remain pending. This stack is not requalified against current main; compatibility remains unknown. No type-test or matched frontier benchmark result is added. Frontier Beta remains NO-GO, with efficacy INCONCLUSIVE: no accuracy, underlying-call, token, or latency improvement is established.

Frozen-Main Integration; Historical Source Review

  • The semantic integration retains main's metadata-only task observers without losing the stack's atomic registration, cache-before-observer publication, full backing/generation checks, or successor activity ownership. It also retains main's removed pending-message state, one-deadline process cleanup, QA Lab workspace dependency, and assertion-ratchet reductions. SDK limits compose the existing increments exactly; canonical runtime count collection remains unrun.
  • The additional registry follow-up is three test files, +29/-0; production delta zero, at PR3, inherited by Slack and PR4. Four non-vacuous no-detail checks run outside caught observer callbacks and retain expected event counts/order plus durable backing/generation assertions. The earlier PR1 +13/-0 state-owner fixture repair remains inherited by all five layers.
  • Fresh native review completed on tree 270fa87b134f9cbc1bfbbef36a0a47e7e4d0a319: three passes, no P0-P2 findings, minimum confidence 0.64. It covered the 13-path integration delta with complete supplied owner/caller context, not all 352 stack paths. The first pass explicitly limited its conclusion to its first evidence batch; all three helper passes subsequently completed. Actual report/status bytes and exact-source Git receipts are retained. Independent registry, subscription, and identity audits also passed. This is source review, not runtime qualification.
  • Codex contracts were personally inspected at commit 414782450952a196bbb64b1605a458c2531c47b6: task replacement, exact active-owner cleanup, and cancellation, lines 320, 784, and 825; model follow-up and retry accounting, lines 305 and 1204. This is dependency-source evidence, not a new live-model trace.
  • Published-head CI 34511914820 and CI 34511914495, attempt 1, were skipped on 8fc45edc048aa7ac67d2237fd5a857408d37ce87; relevant shard/Gateway jobs executed zero steps, and no separate E2E run matched that complete head response. These are not passes. At integration publication, no runtime tests, type tests, or matched benchmark had run on the new candidate heads; the focused results above are subsequent evidence.
  • At integration publication, one focused 48-case mock/loopback Testbox proposal, including remote dependency/build preparation, awaited explicit execution approval; its approved execution is recorded above. It adds six observer cases to the earlier 42-case proposal. It does not replace supported-host, owner-acceptance, authenticated Enterprise, retained-history-cost, or supported-frontier benchmark gates. ShellBench remains untouched.

Earlier c2d7 Integration; Historical

  • The integration preserves main's explicit session-cleanup ordering, selected-model source marker, Copilot input-provenance hook assertions, Gateway send-test consolidation, and shrink-only assertion baseline changes.
  • The additional repair is one test file, +13/-0; production delta zero, inserted at PR1 and inherited by all five layers. Seven fixture scopes establish the temporary state owner before the first database open; three direct database opens reuse that environment and assert the retained owner. No production behavior, schema, deadline, or mutation assertion was changed by this repair.
  • Native integration review was reported clean in four passes with no P0-P2 findings, confidence 0.87, for the five-file integration diff on exact final tree 439d46bc20d1d85a3bf4e2acec787425c7e3157b. Its temporary report files are now unavailable; current report-byte verification is not claimed. Retained Git freeze/assembly receipts and independent exact-source verification remain available. This was not a holistic review of all 352 paths or runtime qualification.
  • No runtime tests, type tests, or matched benchmark ran on those earlier candidate heads. The then-proposed 42-case Testbox scope was unrun; the current 48-case proposal above supersedes it without granting execution approval. ShellBench remained untouched.

Earlier Follow-up; Historical Source Review

  • Earlier follow-up against the prior 64fa candidate: three test files, +391/-53; production delta zero. It remains in the stack, but its review and earlier CI/E2E results are historical, not execution proof for these heads.
  • The earlier test-only follow-up repairs OTel caller context and R5 successor visibility, terminal settlement, and Vitest it.for context. Failure-only R5 and predispatch diagnostics retain the existing request filters, exact assertions, and deadlines. The retained-successor POST origin and unexpected third HTTP request remain UNCLASSIFIED; diagnostics are not causal fixes.
  • Results on terminal 64fa593ec6e8cc0e329f9c3d3b85ed27e81609be: P4 21/21 passed; Gateway 1,915 passed, 8 failed, 20 skipped; UI 1,995 passed; self-yield 2/2 passed. These do not qualify the new head. At that historical head, inherited static defects, including Control UI locale parity, were separate from unresolved execution causes; not every failure was classified as baseline.
  • A/C use the real host, session store, Slack SDK/public barrel, and native upload guard. The native cases inspect exact bytes, bearer separation, completion payloads, post-settlement effects after revocation during held preparation, and one-shot behavior after a lost completion.
  • Transport proof: the three C core-host cases are included in P4's 21/21 passes on historical 64fa593ec6e8cc0e329f9c3d3b85ed27e81609be; new-head execution remains pending. The three Enterprise B cases remain unexecuted and outside the approved manual CI/non-live Repo E2E inventory. A focused Testbox route awaits user approval; the broader Plugin Prerelease route remains out of scope.
  • Real outer-loop cases persist the outer call, delivery mirror, nested activity, and result; reject old activity after the same manager accepts a new user; and continue ordinary work after permission refresh without replaying the earlier mutation or reply.
  • The optional preparedTurnParentId SDK draft is accepted only for the scoped repair. It is not a released-host capability claim or a landing/upgrade acceptance waiver.
  • Earlier scoped native source review: reported PASS, zero findings, confidence 0.5, across the two-file R5/predispatch diff in three context partitions. The separate OTel caller fix also passed scoped source review. These historical reviews are not holistic stack review, current artifact verification, runtime proof, or type qualification; execution remains pending.

Historical Evidence Only

CI 34483907441 and Repo E2E 34483936399 ended red on 64fa593ec6e8cc0e329f9c3d3b85ed27e81609be: CI 184 passed, 8 failed, 2 skipped in 40m40s (seven causal failures plus the aggregate); E2E 11 passed, 3 failed, 14 skipped in 39m46s. Neither run includes the later OTel/R5 repairs, predispatch diagnostic, or this frozen-main integration.

The earlier four-pass native review with zero P0-P2 findings covered only the 16-path test/support delta from synthetic comparison b309dcd308affe0ffb0957e9c04de27a9c5336b2 to 64fa593ec6e8cc0e329f9c3d3b85ed27e81609be, not the full stack or runtime behavior.

CI 34474484717 and Repo E2E 34474485553 ended red on prior top head b990edc4994244ab5ef3b31e6cbae0bac0456e70. These terminal results are historical; they do not qualify the new candidate. The concrete assertion, lint, and type defects identified there are corrected in the reviewed test follow-up, with runtime confirmation pending.

CI 34467941804 and Repo E2E 34467949392, attempt 1, ended red on prior top head 7bffb8c7136879b9252523695f3e043d6fc08c7d. The streaming timeout's cause remains unclassified; diagnostics do not turn it into a fixed result.

Earlier CI 34456574286 and Repo E2E 34456581884 cover 152b124a53e525ed610070279f80d37738b9094c. Its acknowledged/lost-response persisted-session passes used a mock provider. They remain historical boundary evidence, not candidate-head qualification. The earlier models-set first-case timeout likewise has no claimed root-cause repair.

Remaining Gates

The pre-update ClawSweeper review binds prior published head 076c0f6da337bec075322e5c85b6b0de9cc4008b. The review retains 2 requests for this layer: ordinary delivery on fresh/upgraded supported hosts plus conditional-capability SDK/security acceptance; composed-candidate qualification and classification of the acknowledged execution failures. Across the prior review set this is 12 requests (2/2/3/3/2), retained for explicit disposition, not 12 proven bugs. The full-runtime repair and focused proof advance PR3's retained-successor coverage and part of PR4's composed-failure classification; they do not silently close any request. All five Gateway outcomes, supported fresh/released/custom-runtime or rollback coverage, cost measurements and applicable SDK/security/storage/release owner decisions remain incomplete or only partially evidenced. A new exact-head ClawSweeper review is required for each changed layer; the prior-head reviews do not qualify the rebased SHAs. The earlier 11-request snapshot and 13-disposition record remain historical. Exact-head CI/type/lint and landing approval remain separate gates.

Historical Rank-Up Dispositions

The earlier 13-disposition record is retained below for context; it is not the current request count or a completion claim.

The earlier retained review was previously recorded against 64fa593ec6e8cc0e329f9c3d3b85ed27e81609be, not this candidate. Its three earlier rank-up moves are preserved below. The later old-head review discharged two evidence moves using unchanged-path historical 21/21 evidence; that did not provide runtime qualification for these new heads:

  1. Final-effect authority evidence: A/C and real outer-loop cases address allowed delivery, wrong-session rejection, held preparation, writer changes, permission refresh, and once-only completion in source. Attach new-head execution receipts before claiming qualification.
  2. Supported-host/plugin compatibility: ordinary delivery on fresh and upgraded supported hosts and SDK/security-owner acceptance remain open. A host fixture advertising per-result completion is not a released Codex capability guarantee.
  3. Publish sanitized exact-head terminal evidence after execution. Earlier receipts and static approval do not complete this move or waive the final-transport security item.

Release-R, storage/security/SDK-owner acceptance, real Enterprise Grid compatibility, supported-host upgrade policy, and PR3's unmeasured representative retained-history cost remain explicit stack gates. Release-qualified support is not proven.

Frontier efficacy: INCONCLUSIVE. Frontier Beta: NO-GO. Historical direct accuracy was 7/30 versus Code Mode 6/30; visible calls fell 44.4%, but total calls rose 29.9%, prompt tokens 11.6%, agent time 6.8%, and wall latency 3.3%. Beta still requires accuracy non-regression, fewer effective turns/tokens, no total-work or end-to-end latency regression, and matched auditable supported-frontier traces. No such improvement is claimed here.

Local-model preservation and LM Studio preservation remain separate, non-Beta follow-ups. No fresh Punchcard attestation or merge recommendation is claimed.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation agents Agent runtime and tooling size: XS labels Aug 4, 2026
@openclaw-barnacle openclaw-barnacle Bot added the maintainer Maintainer-authored PR label Aug 4, 2026
@vincentkoc vincentkoc self-assigned this Aug 4, 2026
@vincentkoc
vincentkoc force-pushed the fix/code-mode-concurrency-stack-20260804 branch from d6eac27 to c5f6f19 Compare August 4, 2026 02:11
@vincentkoc
vincentkoc force-pushed the fix/code-mode-semantic-observation-stack-20260804 branch from 33f10ff to e0a1c4c Compare August 4, 2026 02:20
@vincentkoc
vincentkoc force-pushed the fix/code-mode-concurrency-stack-20260804 branch from c5f6f19 to 17a866b Compare August 4, 2026 02:28
@vincentkoc
vincentkoc force-pushed the fix/code-mode-semantic-observation-stack-20260804 branch from e0a1c4c to 8a51ce7 Compare August 4, 2026 02:28
@clawsweeper

clawsweeper Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 2, 2026, 6:20 PM ET / 22:20 UTC (Revision 60).

ClawSweeper review

What this changes

Adds a host-authorized Code Mode reply tool, prevents duplicate final replies after delivery, and updates harness adapters, transport handling, tests, and diagnostics.

Merge readiness

⛔ Blocked before merge - 6 items remain

Keep open: this maintainer-authored PR adds distinct behavior absent from current main. Focused boundary proof is useful, but supported-host compatibility and the earlier qualification concerns remain unresolved.

Priority: P2
Reviewed head: 708809cdc2cdbb09c1184ce74838fbf283b71419
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful boundary proof supports the implementation, while unresolved released-host compatibility limits merge confidence.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (linked_artifact): The recorded scoped proof exercises the real host/session owners and native HTTP upload path for allowed delivery, writer revocation during preparation, and lost completion, with observed request bytes and once-only effects. Preserve that boundary proof separately from incomplete composed-candidate and supported-host qualification; receipts are process-local, and this layer changes no stored-data format.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The recorded scoped proof exercises the real host/session owners and native HTTP upload path for allowed delivery, writer revocation during preparation, and lost completion, with observed request bytes and once-only effects. Preserve that boundary proof separately from incomplete composed-candidate and supported-host qualification; receipts are process-local, and this layer changes no stored-data format.
Evidence reviewed 11 items Pinned review scope: Reviewed the introduced delta from 7e7df51 to 708809c. The live PR still has that head and stacked base, remains draft, and is assigned to vincentkoc. MEMBER association and the maintainer label prevent automated closure.
Ordinary delivery compatibility boundary: The new delivery constructor returns undefined without captured authority. Plugin construction obtains that authority from private construction or the admitted host scope; embedded construction supplies it only with a writer-backed target. Existing SDK callers outside those paths can therefore lose context.delivery.
Released ordinary delivery contract: The v2026.9.7 source exposes ordinary plugin delivery using the message-action capability, route, configuration, and registry without requiring the new private host-scope carrier. Current main retains that ordinary-delivery implementation. Neither inspected source establishes the new send_current_reply capability.
Findings None None.
Security None None.

How this fits together

OpenClaw Code Mode lets an agent compose enabled tools in a JavaScript or TypeScript cell. This change connects that execution to current-conversation delivery and carries private delivery receipts into reply finalization.

flowchart TD
  A[Agent Code Mode cell] --> B[Host-created reply tool]
  B --> C[Check invocation and writer authority]
  C --> D[Channel transport]
  D --> E[Private delivery receipt]
  E --> F[Reply finalization]
  F --> G[Suppress duplicate reply]
Loading

Decision needed

Question Recommendation
Should ordinary plugin delivery require the new admitted host scope immediately, or retain a versioned transition for supported SDK callers? Preserve a versioned transition: Retain supported ordinary delivery through a documented host contract while limiting terminal replies to explicitly capable adapters.

Why: The patch narrows a released delivery contract, and the body expressly leaves SDK/security acceptance and supported-host qualification open.

Before merge

  • Resolve merge risk (P1) - Existing plugins constructing tools outside the admitted host scope, and embedded callers without writer-backed construction, can lose ordinary delivery; the supported compatibility window needs SDK/security-owner acceptance and fresh-install/upgrade proof.
  • Resolve merge risk (P1) - The frozen composed candidate remains only partially qualified: streaming, model-selection, and predispatch failures need explicit disposition, and newer upstream stack work does not qualify this unchanged downstream head.
  • Complete next step (P2) - Record SDK/security-owner acceptance, qualify ordinary delivery on fresh and upgraded supported hosts, and disposition the remaining composed-candidate execution failures.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof 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 versus regression support production +2,017/-778; tests/support +10,400/-1,544 No-rename accounting separates production growth for private admission and completion fencing from its substantial regression and diagnostic support.

Stored data model

Persistent data-model change detected: unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Qualify supported delivery paths (recommended)
    Record the accepted SDK contract and demonstrate ordinary delivery on fresh and upgraded supported hosts before landing.
  2. Hold the composed candidate
    Keep this layer draft until upstream changes are composed and the remaining execution failures receive evidence-backed dispositions.

Technical review

Best possible solution:

Keep terminal reply authority private while preserving a documented, versioned ordinary-delivery contract for supported plugins and hosts.

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

Not applicable to the new capability. The supplied production-boundary scenarios exercise delivery and revocation, but this read-only review did not reproduce supported-host upgrade behavior.

Is this the best way to solve the issue?

Unclear: reusing shared message dispatch and private receipts is appropriate, but narrowing ordinary plugin delivery needs an accepted compatibility contract.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded agent-delivery capability with meaningful compatibility work, without an established urgent current-user regression.
  • merge-risk: 🚨 compatibility: Ordinary plugin delivery gains a required private authority carrier that existing supported SDK callers may not provide.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The recorded scoped proof exercises the real host/session owners and native HTTP upload path for allowed delivery, writer revocation during preparation, and lost completion, with observed request bytes and once-only effects. Preserve that boundary proof separately from incomplete composed-candidate and supported-host qualification; receipts are process-local, and this layer changes no stored-data format.
  • proof: sufficient: Contributor real behavior proof is sufficient. The recorded scoped proof exercises the real host/session owners and native HTTP upload path for allowed delivery, writer revocation during preparation, and lost completion, with observed request bytes and once-only effects. Preserve that boundary proof separately from incomplete composed-candidate and supported-host qualification; receipts are process-local, and this layer changes no stored-data format.

Evidence

What I checked:

  • Pinned review scope: Reviewed the introduced delta from 7e7df51 to 708809c. The live PR still has that head and stacked base, remains draft, and is assigned to vincentkoc. MEMBER association and the maintainer label prevent automated closure. (708809cdc2cd)
  • Ordinary delivery compatibility boundary: The new delivery constructor returns undefined without captured authority. Plugin construction obtains that authority from private construction or the admitted host scope; embedded construction supplies it only with a writer-backed target. Existing SDK callers outside those paths can therefore lose context.delivery. (src/agents/current-turn-delivery.ts:110, 708809cdc2cd)
  • Released ordinary delivery contract: The v2026.9.7 source exposes ordinary plugin delivery using the message-action capability, route, configuration, and registry without requiring the new private host-scope carrier. Current main retains that ordinary-delivery implementation. Neither inspected source establishes the new send_current_reply capability. (src/agents/openclaw-plugin-tools.ts:73, c074824a27c9)
  • Terminal capability is conditional: Terminal reply construction requires writer authority, enabled Code Mode, and an adapter declaration of per-result terminal handling. Ordinary delivery is deliberately separate. The SDK documentation describes the older-host construction-plus-binding path, but the PR body explicitly leaves supported-host qualification and SDK/security acceptance open. (src/agents/harness/host-tool-surface.ts:90, 708809cdc2cd)
  • Final-effect authority coverage: The production delivery owner rechecks source invocation, writer, registry, and turn capability after awaited preparation and at synchronous adapter handoff. The inspected host integration cases cover foreign-session rejection, host closure, admission replacement, writer/lifecycle replacement, native HTTP upload bytes, and lost-completion one-shot behavior. (src/agents/harness/host-capability.current-turn-delivery.integration.test.ts:193, 708809cdc2cd)
  • Complete captured proof context: Read the full GitHub body and verified SHA-256 6ce7f7d6e2cf5ce84b739b314d93dc223db86c00bfcd3dca63741040a8319802, matching the supplied snapshot. It records native transport and real-loop proof, 206/207 frozen-integration results at 6b9bb15, and a separate 29/29 corrected-head follow-up. It explicitly preserves historical failures and leaves fresh/upgraded-host compatibility, owner acceptance, streaming, model-selection, and predispatch qualification unresolved. Linked workflow envelopes are cancelled carrier runs, not evidence of an aggregate green CI result. (708809cdc2cd)

Likely related people:

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

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Demonstrate ordinary delivery on supported fresh and upgraded hosts and record SDK/security-owner acceptance of the conditional capability.
  • Disposition the remaining streaming, model-selection, and predispatch failures against the composed candidate.

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 (59 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-10T13:46:09.810Z sha 64fa593 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-10T15:04:38.180Z sha 16ef0b5 :: blocked before merge. :: none
  • reviewed 2026-09-10T18:11:17.174Z sha 8fc45edc048aa7ac67d2237fd5a857408d37ce87 :: blocked before merge. :: none
  • reviewed 2026-09-10T18:44:36.085Z sha 076c0f6 :: blocked before merge. :: none
  • reviewed 2026-09-10T21:25:34.796Z sha 076c0f6 :: blocked before merge. :: none
  • reviewed 2026-09-11T09:12:55.070Z sha 076c0f6 :: blocked before merge. :: none
  • reviewed 2026-09-11T12:02:37.263Z sha 708809c :: blocked before merge. :: none
  • reviewed 2026-09-11T12:45:59.464Z sha 708809c :: blocked before merge. :: none

@vincentkoc
vincentkoc force-pushed the fix/code-mode-concurrency-stack-20260804 branch from 17a866b to ea3c5d8 Compare August 4, 2026 03:00
@vincentkoc
vincentkoc force-pushed the fix/code-mode-semantic-observation-stack-20260804 branch from 8a51ce7 to 8ad36db Compare August 4, 2026 03:01
@clawsweeper clawsweeper Bot added 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. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Aug 4, 2026
@vincentkoc
vincentkoc force-pushed the fix/code-mode-concurrency-stack-20260804 branch from ea3c5d8 to 9a44488 Compare August 4, 2026 13:19
@vincentkoc
vincentkoc force-pushed the fix/code-mode-semantic-observation-stack-20260804 branch from 8ad36db to 5912113 Compare August 4, 2026 13:19
@vincentkoc vincentkoc changed the title fix(code-mode): require observation before semantic mutations fix(code-mode): observe ambiguous targets before mutation Aug 4, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 4, 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 repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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 Aug 4, 2026
@clawsweeper

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

Re-review progress:

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

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

Re-review progress:

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

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

Re-review progress:

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

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

Re-review progress:

Punchcard-Session: brisk-workshop-harbor-jn
Add temporary opt-in phase and lifecycle diagnostics for the first models-set E2E case using the existing plugin load profiler. Keep cold imports, timeout, assertions, and execution order unchanged; this is diagnostic evidence, not a timeout root-cause fix.
Exercise embedded-runner and harness-host capability delivery through the current-turn integration paths, including authority invalidation at the actual preparation and execution boundaries.
Move shared integration support under test helpers and cover nested, outer-loop, and Host delivery boundaries with real persistence and transport ownership.
Record bounded cleanup attribution without replacing the original error or exposing state paths.
Capture allowlisted lifecycle milestones before cleanup without weakening streaming assertions or changing timeouts.
Use the existing loader diagnostics switch to distinguish lazy preparation and module evaluation without changing native or source-transform selection.
@vincentkoc

Copy link
Copy Markdown
Member Author

Closing this stacked proposal as a preservation-aware archival disposition, not as landed verbatim or fully superseded.

The audit used main 6facd0d02d6fe870742617d74a3f72c3cf4787c7 and this PR's own range 7e7df513bddb6ee15f342e3fe1cd4cb94afe9d6b..708809cdc2cdbb09c1184ce74838fbf283b71419 (17 commits, 140 unique paths), not its cumulative stack.

Focused replacements landed:

These are scoped replacements, not coverage of every supported-runtime or orchestration variant. Optional cold-model, loader, streaming, self-yield, OTel and request-shape diagnostics, plus unported orchestration fixtures, remain preserved reference work. Retired Task/heartbeat test machinery and obsolete proposed API shapes are not reasons to restore old runtime paths.

Older-host fallback remains held and unqualified; the old constructorless fixture is not proof of every released host through 2026.9.2. Durable catalog exec-prefix, accepted-steering, omitted aborted-wait, replay-safety and publication assertions also remain unqualified and deferred. #135969 remains separate; restart/FULL-B and committed-result/publication recovery work are not activated or declared complete.

The adapter audit included the native Codex response contract at openai/codex@414782450952a196bbb64b1605a458c2531c47b6, codex-rs/protocol/src/dynamic_tools.rs:43-80 and codex-rs/core/src/tools/handlers/dynamic.rs:100-245; private per-result completion is not a native wire-field compatibility claim.

No whole-17-commit/140-path equivalence, Beta qualification or performance claim is made. The original branch fix/code-mode-semantic-observation-stack-20260804, head 708809cdc2cdbb09c1184ce74838fbf283b71419 and history are retained. This closes only this PR, not its dependents or the preserved goals above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling channel: qa-channel Channel integration: qa-channel commands Command implementations docs Improvements or additions to documentation extensions: codex extensions: copilot extensions: qa-lab gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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