Skip to content

fix: explain unavailable agent harnesses on failed turns - #135118

Merged
steipete merged 5 commits into
mainfrom
fix/harness-recovery-sweep
Sep 1, 2026
Merged

steipete merged 5 commits into
mainfrom
fix/harness-recovery-sweep

Conversation

@steipete

@steipete steipete commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Related: #134304. Credited replacement for #134468 by @fuller-stack-dev (Json); original report by @goslingmanagment.

What Problem This Solves

Fixes an issue where users sending turns to an existing model-dependent session receive a generic missing-registration failure when its required agent harness is unavailable, while Gateway health and readiness remain green. The error does not explain which plugin owns the runtime or whether it is disabled, denied, absent, or degraded.

Why This Change Was Made

The turn guard now diagnoses missing registration from the exact prepared registry's activation context and manifest ownership. Explicit-config library calls retain their policy even without a bound context. Direct hosts resolve one activation context, reuse it for memory adoption, and bind it to their scoped registry; provider usage uses that same owner path. Borrowed Gateway registries do not import direct-host context dependencies.

Owner classification checks the complete owner set before bounding displayed details, respects bundled/platform default enablement, and treats mixed blocked/activatable owners as degraded rather than wholly disabled. Existing registry failures take precedence without echoing raw plugin error text. No configuration, storage, protocol, health, readiness, or model-selection contract changes. Already-landed #134837 is not replayed.

User Impact

Unavailable turns now report the owner when known, the blocking state, and an actionable doctor/inspection/restart path. Model/auth discovery and process health remain independent of whether a particular turn's required harness can run. The documented recovery applies to existing sessions as well as direct hosts and provider usage.

Evidence

Verified on the final committed tree:

  • node scripts/run-vitest.mjs src/cli/run-main.cleanup.test.ts src/agents/runtime-plugins.test.ts src/agents/runtime-plugins.memory-corpus.integration.test.ts src/agents/prepared-model-runtime.plugin-context.test.ts src/agents/harness/runtime-plugin.test.ts src/plugins/provider-runtime.usage-harness.test.ts: 87/87 passed.
  • node scripts/run-vitest.mjs src/gateway/server.sessions.agent-model-catalog.test.ts src/gateway/server-methods/sessions-mutations.sticky-model.test.ts: ordered 54/54 passed after the final fixture correction.
  • node scripts/run-vitest.mjs test/scripts/vitest-worker-artifacts.test.ts: 34/34 passed after the CI fixture repair.
  • Fresh branch-mode autoreview: no accepted/actionable P0 findings.

pnpm build passed, including runtime postbuild, plugin exports, and Control UI budgets. Changed-file checks passed for the original eight paths and separately for the worker-artifact test repair (types, lint, dead exports, architecture, storage, and security guards).

Regression proof includes explicit-config plugin disablement, mixed ownership (including a fourth owner beyond the display cap), bundled/platform defaults, and Json's borrowed-registry lifecycle case. Each newly corrected behavior failed before its fix. The ordered Gateway catalog/sticky suite joins pending config mutations before fixture teardown; activation checks are unchanged.

Direct Codex dependency inspection: openai/codex at 0ae94fdd49b05ee7faa4d984d06a68492cb32b54, codex-rs/app-server/src/request_processors/catalog_processor.rs:168,242, turn_processor.rs:166,499, and account_processor.rs:1034. Catalog/auth and turn-start processing are separate boundaries; this repair does not reinterpret a successful probe as turn executability.

Built Gateway live-proof transcript

Fresh isolated HOME and state directory, synthetic token, loopback port 50912 (not 18789), no provider credentials or inference. The driver waits for the documented startup admission probe.

GET /startupz -> 200
GET /health -> 200
connect -> ok
chat.send -> accepted
first chat error -> Agent harness runtime "codex" is unavailable. (reason=owner-plugin-not-activatable, ownerPluginId=codex). Run "openclaw doctor --fix". Owner plugin "codex" is not activatable (plugins disabled). Repair the plugin or select a model that does...
final chat error -> ⚠️ Agent failed before reply: Agent harness runtime "codex" is unavailable. (reason=owner-plugin-not-activatable, ownerPluginId=codex). Run "openclaw doctor --fix". Owner plugin "codex" is not activatable (plugins disabled). Repair the plugin or select a model that does not require this runtime, restart the Gateway, then retry.
To view logs, run `openclaw logs --follow` in a terminal.
GET /health after failed turn -> 200
GET /readyz after failed turn -> 200
PASS; owned Gateway stopped, no listener remains

An initial fresh driver attempt connected on liveness before startup completed and received the expected startup-sidecars rejection. The corrected driver waits on /startupz; no production retry, timeout increase, or health change was added.

Hosted CI follow-up

The first exact-head CI run failed only checks-node-compact-small-29: the worker-artifact provider-hook case bundled a compiled build and four cold subprocesses under one 120-second deadline. Its log records source/scoped, source/prepared, and compiled/scoped success before the last subprocess was cut off. The original full file passed locally, so this was not a reproduced hook-behavior failure.

The fixture now has separate source and compiled cases. Both still execute scoped and prepared probes with the same assertions and timeout; only the compiled case builds artifacts, so there is still exactly one compiled build total. The full file passes 34/34. This bounded test-owner repair adds one net test line and no production code; fresh hosted CI is required on the updated head.

Scope and production LOC

Both requested refactors are included: direct-registry activation-context reuse and shared registry-load options remove 38 production lines from the inherited patch. Against the integrated main baseline, production is +177/-102 (net +75), tests are +626/-91 (net +535), and docs are +7/-0. The remaining production growth is justified: visible, state-specific recovery is the missing capability for turns that fail while health remains green. It cannot be supplied by removing the guard, changing service health, or weakening plugin activation. The diagnostic stays at the turn/registry owner boundary, using existing policy helpers rather than a second activation policy.

NO-FOLLOW-UP: both rent-paying refactors are included here; a wider readiness or selection redesign is a separate product decision, with existing follow-ups, not part of this repair.

Co-authored-by: Json [email protected]

steipete and others added 4 commits September 1, 2026 02:25
Carry the prepared plugin generation's activation and owner facts to the
final harness guard. Reuse the scoped registry owner for direct agents and
provider usage, preserving loaded request plugins when adding a selection.
Put recovery commands before longer details so the first bounded chat error
retains the operator's next action.

Fixes #134304. Reported by @goslingmanagment.
Release-note context: unavailable model harnesses explain plugin recovery
while model status continues to report route availability independently of
Gateway liveness.

Co-authored-by: Jason (Json) <[email protected]>
Preserve the interrupted worker's seven pending files alongside 81fd1a7.
This is an incomplete recovery checkpoint, not a land-ready change.

Related: #134468 and #134304. Reported by @goslingmanagment.
The session selection work is already merged separately in #134837.

The recovery-only production delta remains +107, exceeding this sweep's
net-zero constraint. Pending owner tests expose contextless disabled-policy
and mixed-owner diagnostic gaps. Gateway selection coverage also exposed
an enabled-to-disabled fixture race with background sticky config writes.
Build, changed checks, and final branch review are not complete.

Co-authored-by: Jason (Json) <[email protected]>
Diagnose unavailable harness owners from the prepared registry, preserve explicit policy for direct hosts, and classify mixed/default-enabled owners correctly. Reuse activation context and shared registry load options; keep borrowed Gateway registry dependencies lazy. Join sticky config mutations before Gateway fixture teardown.

Co-authored-by: Json <[email protected]>
Keep the original ordered activation assertions while awaiting every captured config mutation in a lint-safe try/finally.

Co-authored-by: Json <[email protected]>
@clawsweeper

clawsweeper Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@steipete
steipete marked this pull request as ready for review September 1, 2026 10:38
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime agents Agent runtime and tooling size: L maintainer Maintainer-authored PR labels Sep 1, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 1, 2026
@clawsweeper

clawsweeper Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 1, 2026, 7:16 AM ET / 11:16 UTC.

ClawSweeper review

What this changes

The PR makes unavailable agent-harness failures name the known plugin owner and activation or load blocker, while preserving the prepared registry context for direct agents and provider usage.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open for normal maintainer handling: current main and v2026.8.1 still emit the generic failed-turn message, while this member-authored PR adds the missing state-specific recovery at the final registry guard. No introduced correctness or security defect was found in the reviewed change.

Priority: P2
Reviewed head: 4c3dc23b19742da884020394db63b45fafd44ab8

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-backed repair with meaningful boundary coverage and supplied isolated Gateway evidence; no actionable patch defect was found.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The ordinary external-contributor proof gate is not applicable to this member-authored PR; independently, the supplied body records an isolated built-Gateway after-run that reaches the changed final guard, reports the disabled Codex owner and Doctor action, and leaves health and readiness successful.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The ordinary external-contributor proof gate is not applicable to this member-authored PR; independently, the supplied body records an isolated built-Gateway after-run that reaches the changed final guard, reports the disabled Codex owner and Doctor action, and leaves health and readiness successful.
Evidence reviewed 7 items Current main still has the reported generic error: Current main only says that the registration is missing and gives generic enable/reinstall guidance; it does not identify a plugin owner or activation/load state.
PR centralizes diagnosis at the final guard: The introduced helper derives manifest owners from the registry-owned context, preserves disabled/allowlist and degraded states, bounds rendered details, and the existing final guard emits its result.
Turn and provider callers use the same owner boundary: Embedded turns call the guard with the active prepared registry, and cold provider-usage resolution now creates a scoped selected registry before checking and invoking its harness.
Findings None None.
Security None None.

How this fits together

Agent turns choose a model runtime from a prepared plugin registry. The final harness guard stops a turn before execution when that runtime is unavailable and now turns the registry’s state into actionable recovery guidance without changing Gateway health semantics.

flowchart LR
  A[Existing agent session] --> B[Selected model runtime]
  B --> C[Prepared plugin registry]
  C --> D[Final harness guard]
  D --> E[Owner and blocker diagnosis]
  E --> F[Actionable failed-turn reply]
  D --> G[Gateway health remains separate]
Loading

Before merge

  • Resolve merge risk (P1) - This bug fix remains net +75 production lines across shared registry and diagnostics code; the accepted design should remain one final-guard classification path as adjacent runtime flows evolve.
  • Complete next step (P2) - This is a current member-authored implementation PR with no discrete mechanical repair identified by review.
Agent review details

Security

None.

PR surface

Source +75, Tests +535, Docs +7. Total +617 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 3 177 102 +75
Tests 5 626 91 +535
Docs 1 7 0 +7
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 810 193 +617

Review metrics

Metric Value Why it matters
Production versus test delta production +177/-102 (net +75); tests +626/-91 (net +535); docs +7/-0 The production growth supplies the new failed-turn diagnostic and shared registry context; the accompanying tests cover its state classifications and direct/provider caller paths.

Root-cause cluster

Relationship: canonical
Canonical: #135118
Summary: This PR is the current implementation candidate for the execution-time diagnostic gap; selection-time prevention was merged separately.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep one prepared-registry-owned diagnosis at the final turn guard, preserve independent Gateway health checks, and land only after the normal exact-head merge gates are satisfied.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep one prepared-registry-owned diagnosis at the final turn guard, preserve independent Gateway health checks, and land only after the normal exact-head merge gates are satisfied.

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

Yes, from source: current main’s final guard produces the generic message when the prepared registry lacks the selected harness, while the supplied isolated Gateway transcript exercises that same disabled-plugin path.

Is this the best way to solve the issue?

Yes: the patch keeps diagnosis at the prepared-registry/final-guard boundary, reuses existing activation helpers, and preserves the established separation between model-route status, turn execution, and Gateway health.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is a bounded recovery-diagnostic improvement for turns whose selected harness cannot execute.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The ordinary external-contributor proof gate is not applicable to this member-authored PR; independently, the supplied body records an isolated built-Gateway after-run that reaches the changed final guard, reports the disabled Codex owner and Doctor action, and leaves health and readiness successful.

Evidence

What I checked:

  • Current main still has the reported generic error: Current main only says that the registration is missing and gives generic enable/reinstall guidance; it does not identify a plugin owner or activation/load state. (src/agents/harness/runtime-plugin.ts:138, 0043769cabc1)
  • PR centralizes diagnosis at the final guard: The introduced helper derives manifest owners from the registry-owned context, preserves disabled/allowlist and degraded states, bounds rendered details, and the existing final guard emits its result. (src/agents/harness/runtime-plugin.ts:44, 4c3dc23b1974)
  • Turn and provider callers use the same owner boundary: Embedded turns call the guard with the active prepared registry, and cold provider-usage resolution now creates a scoped selected registry before checking and invoking its harness. (src/plugins/provider-runtime.ts:666, 4c3dc23b1974)
  • Boundary-level regression coverage: Tests cover disabled and allowlisted owners, load/register failures without exposing raw errors, activated-but-unregistered owners, direct-host context, and cold provider usage with a real fixture plugin. (src/agents/harness/runtime-plugin.test.ts:121, 4c3dc23b1974)
  • Latest shipped release has not already implemented this change: v2026.8.1 contains the same generic final-guard message as current main, so this PR remains necessary rather than being superseded by a release. (src/agents/harness/runtime-plugin.ts:138, ea806575e645)
  • Feature-history routing: The agent-runtime path has recent upstream work by Peter Steinberger, including the current-main preparation change and earlier selected-harness setup work; the historical exact-line introduction could not be established because the required promisor parent is unavailable locally. (src/agents/harness/runtime-plugin.ts:136, a0868f477a8e)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • fuller-stack-dev: 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 (1 earlier review cycle)
  • reviewed 2026-09-01T10:46:51.458Z sha 86cb95b :: needs maintainer review before merge. :: none

@steipete

steipete commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Maintainer review decision on the +75 production lines: accepted for the missing visible recovery capability, with both requested refactors already included (38 inherited lines removed). The PR body records the rationale and production/test split. Removing the diagnostic would lose the owner, blocking state, and next action in the first bounded failed-turn error; changing activation or health instead would alter a different contract.

The rank-up move is already satisfied in this change: one describeMissingHarnessRegistration path consumes the prepared registry's facts at the final guard. Direct hosts and provider usage enter the same scoped registry owner, reuse its activation context, and do not add a second activation policy, metadata rediscovery path, or health probe. Keeping that boundary consolidated as the runtime evolves is ongoing maintenance, not an additional repair needed here.

All local gates and the isolated built-Gateway proof passed. Exact-head CI remains the final execution gate; no merge is being requested by this comment.

The previous case bundled compilation and four fresh subprocesses under one deadline. Give source and compiled execution their own cases, compile only the compiled case, and retain both provider scopes, lifecycle assertions, and the existing timeout.

Co-authored-by: Json <[email protected]>
@steipete
steipete merged commit cfefc26 into main Sep 1, 2026
489 of 491 checks passed
@steipete
steipete deleted the fix/harness-recovery-sweep branch September 1, 2026 12:12
@steipete

steipete commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@fuller-stack-dev

Copy link
Copy Markdown
Member

Post-merge exact-revision verification for cfefc2614eeb35ba2d528312b940636e7213c840:

The isolated packaged build preserves owner-plugin-not-activatable from model status into the failed turn, names ownerPluginId=codex, provides openclaw doctor --fix and alternate-model recovery, does not add or enable the owner, and keeps /health, /healthz, and /readyz at HTTP 200. The pre-switch built-in-harness control has no plugin-owner failure. No credentials or private runtime data are present.

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

* fix(agents): show recovery when a model harness is unavailable

Carry the prepared plugin generation's activation and owner facts to the
final harness guard. Reuse the scoped registry owner for direct agents and
provider usage, preserving loaded request plugins when adding a selection.
Put recovery commands before longer details so the first bounded chat error
retains the operator's next action.

Fixes openclaw#134304. Reported by @goslingmanagment.
Release-note context: unavailable model harnesses explain plugin recovery
while model status continues to report route availability independently of
Gateway liveness.

Co-authored-by: Jason (Json) <[email protected]>

* chore: preserve blocked harness recovery checkpoint

Preserve the interrupted worker's seven pending files alongside 81fd1a7.
This is an incomplete recovery checkpoint, not a land-ready change.

Related: openclaw#134468 and openclaw#134304. Reported by @goslingmanagment.
The session selection work is already merged separately in openclaw#134837.

The recovery-only production delta remains +107, exceeding this sweep's
net-zero constraint. Pending owner tests expose contextless disabled-policy
and mixed-owner diagnostic gaps. Gateway selection coverage also exposed
an enabled-to-disabled fixture race with background sticky config writes.
Build, changed checks, and final branch review are not complete.

Co-authored-by: Jason (Json) <[email protected]>

* fix(agents): preserve exact harness recovery policy

Diagnose unavailable harness owners from the prepared registry, preserve explicit policy for direct hosts, and classify mixed/default-enabled owners correctly. Reuse activation context and shared registry load options; keep borrowed Gateway registry dependencies lazy. Join sticky config mutations before Gateway fixture teardown.

Co-authored-by: Json <[email protected]>

* test(gateway): join sticky mutations with explicit cleanup

Keep the original ordered activation assertions while awaiting every captured config mutation in a lint-safe try/finally.

Co-authored-by: Json <[email protected]>

* test: isolate provider hook proofs by execution mode

The previous case bundled compilation and four fresh subprocesses under one deadline. Give source and compiled execution their own cases, compile only the compiled case, and retain both provider scopes, lifecycle assertions, and the existing timeout.

Co-authored-by: Json <[email protected]>

---------

Co-authored-by: Jason (Json) <[email protected]>
Co-authored-by: Json <[email protected]>
steipete added a commit that referenced this pull request Sep 3, 2026
… Codex plugins

Since #135118 the runtime reports a disabled or untrusted harness plugin as
'Agent harness runtime "codex" is unavailable. (reason=..., ownerPluginId=codex)'
with a doctor hint instead of "plugin registration is missing from this
prepared run". The copied-session e2e still asserted the retired text. Assert
the current diagnostic and its reason per case.

Proof: gateway-copied-codex-session-resume.e2e.test.ts 4/4 after; the two
rejection cases failed before.

(cherry picked from commit cb47cf8)
steipete added a commit that referenced this pull request Sep 3, 2026
…ill resource argv, Codex diagnostic) (#137358)

* fix(test): keep Control UI browser suites out of the Gateway E2E project

The Gateway E2E vitest project globbed extensions/qa-lab's
control-ui-media-transcript.real-gateway.e2e.test.ts, a browser suite that
depends on the Control UI project's global setup (inject("controlUiE2eChromium")).
Collected under the Gateway project it fails at suite load with
"Cannot destructure property 'executablePath' of 'inject(...)'". Exclude the
UI real-gateway suite list from the Gateway project and assert the two
projects never collect the same browser file.

Owner: test/vitest/vitest.e2e.config.ts (Gateway E2E project).
Proof: new sharding test "collects browser suites only in their Control UI
projects" fails before and passes after; Full Release Validation Gateway 3/4
shard (run 33757831055) reproduced the load failure.

* fix(gateway): carry skill resource operations over stdin, not workspace argv

transferSkillResources passed the receiver's temp root, identity, resource
name, offsets and hash as argv to `node -e`. The paired-node workspace guard
(node-worker-workspace.ts) realpaths every argv element and rejects paths
outside the workspace, so the absolute tmpdir root failed every skill transfer
with "INVALID_REQUEST: workspace command argv resolves outside its workspace"
and Codex turns on paired nodes died before replying.

Move the whole operation into a validated stdin JSON envelope: the receiver
derives its temp root from a caller-supplied hex id, checks the exact key set,
identity, hash and chunk bounds, and size-budgets each chunk against the stdin
limit including the envelope. argv is now only `node -e <script>`.

Owner: src/gateway/worker-environments/skill-resource-transfer.ts.
Proof: unit tests drive a real NodeWorkerWorkspaceRuntime carrier (transfer
despite a project path collision, rejected mutated requests); e2e
codex-node-exec-server.e2e.test.ts fails before and passes after.

* test(gateway): expect the harness-unavailable diagnostic for disabled Codex plugins

Since #135118 the runtime reports a disabled or untrusted harness plugin as
'Agent harness runtime "codex" is unavailable. (reason=..., ownerPluginId=codex)'
with a doctor hint instead of "plugin registration is missing from this
prepared run". The copied-session e2e still asserted the retired text. Assert
the current diagnostic and its reason per case.

Proof: gateway-copied-codex-session-resume.e2e.test.ts 4/4 after; the two
rejection cases failed before.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 4, 2026
…ill resource argv, Codex diagnostic) (openclaw#137358)

* fix(test): keep Control UI browser suites out of the Gateway E2E project

The Gateway E2E vitest project globbed extensions/qa-lab's
control-ui-media-transcript.real-gateway.e2e.test.ts, a browser suite that
depends on the Control UI project's global setup (inject("controlUiE2eChromium")).
Collected under the Gateway project it fails at suite load with
"Cannot destructure property 'executablePath' of 'inject(...)'". Exclude the
UI real-gateway suite list from the Gateway project and assert the two
projects never collect the same browser file.

Owner: test/vitest/vitest.e2e.config.ts (Gateway E2E project).
Proof: new sharding test "collects browser suites only in their Control UI
projects" fails before and passes after; Full Release Validation Gateway 3/4
shard (run 33757831055) reproduced the load failure.

* fix(gateway): carry skill resource operations over stdin, not workspace argv

transferSkillResources passed the receiver's temp root, identity, resource
name, offsets and hash as argv to `node -e`. The paired-node workspace guard
(node-worker-workspace.ts) realpaths every argv element and rejects paths
outside the workspace, so the absolute tmpdir root failed every skill transfer
with "INVALID_REQUEST: workspace command argv resolves outside its workspace"
and Codex turns on paired nodes died before replying.

Move the whole operation into a validated stdin JSON envelope: the receiver
derives its temp root from a caller-supplied hex id, checks the exact key set,
identity, hash and chunk bounds, and size-budgets each chunk against the stdin
limit including the envelope. argv is now only `node -e <script>`.

Owner: src/gateway/worker-environments/skill-resource-transfer.ts.
Proof: unit tests drive a real NodeWorkerWorkspaceRuntime carrier (transfer
despite a project path collision, rejected mutated requests); e2e
codex-node-exec-server.e2e.test.ts fails before and passes after.

* test(gateway): expect the harness-unavailable diagnostic for disabled Codex plugins

Since openclaw#135118 the runtime reports a disabled or untrusted harness plugin as
'Agent harness runtime "codex" is unavailable. (reason=..., ownerPluginId=codex)'
with a doctor hint instead of "plugin registration is missing from this
prepared run". The copied-session e2e still asserted the retired text. Assert
the current diagnostic and its reason per case.

Proof: gateway-copied-codex-session-resume.e2e.test.ts 4/4 after; the two
rejection cases failed before.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L 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.

2 participants