Skip to content

fix: honor Agent and node exec settings in Dedicated workers - #205572

Merged
stevenlee-oai merged 9 commits into
mainfrom
dev/stevenlee/dedicated-worker-exec-runtime
Nov 26, 2026
Merged

stevenlee-oai merged 9 commits into
mainfrom
dev/stevenlee/dedicated-worker-exec-runtime

Conversation

@stevenlee-oai

@stevenlee-oai stevenlee-oai commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

A Dedicated Agent's exec tool could use different timeouts and executable search paths than its owner configured. When a model invoked Git, the supervised worker also lost the Git configuration selected by the node.

User Impact

Dedicated workers honor the Agent's configured timing and can find tools in directories that the node permits. The node can provide an image-owned Git configuration and public tool inputs to local commands. Explicit per-turn GitHub identity retains precedence.

Why This Change Was Made

The Gateway sends the resolved exec settings through the tool surface defined in #205571. The node admits requested directories and supplies the local tool inputs. Source credentials remain with their existing owners, and the exec approval path stays in effect.

Evidence

At 2895edef, 20 local worker-supervisor tests passed. Hosted CI passed all five core typecheck shards and the baseline check. The full local Gateway exec suite could not complete because the local environment lacks the pinned native fs-safe companion.

Hosted CI at 2895edef passed the required gate after the Android retry. The earlier Android timeout also occurred on scheduled main. All five Gateway worker exec approval tests passed in the first hosted attempt, including the new case for the Agent timeout and the executable directory admitted by the node. Required CI · Worker exec tests · Scheduled main Android job

Earlier compiled worker tests exercised model-invoked exec and system Git using the node-selected configuration, with the model credential and private launch configuration kept outside the tool process. OCE qualified and merged the Runner pinned to 9a838501. Qualification of the newer upstream-main Runner follows this stack. OCE qualification

@clawsweeper

clawsweeper Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

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

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling labels Nov 25, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. impact:auth-provider Auth, provider routing, model choice, or SecretRef resolution may break. impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. labels Nov 25, 2026
@stevenlee-oai stevenlee-oai changed the title Apply Agent and node exec settings to Dedicated workers fix: honor Agent and node exec settings in Dedicated workers Nov 25, 2026
@stevenlee-oai
stevenlee-oai marked this pull request as ready for review November 25, 2026 21:58
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 25, 2026
@clawsweeper

clawsweeper Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR carries Agent exec timing settings into Dedicated workers and applies node-selected executable paths, Git configuration, and public tool inputs.

Example: An Agent configures tools.exec.timeoutSeconds to 17 and runs sleep 30 without an explicit timeout.

  • Before: The worker omits the configured timeout and uses the ordinary 1800-second default.
  • After: The worker supplies the configured 17-second timeout to the process supervisor.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The focused implementation has no definite introduced defect, but test-based evidence does not satisfy the required real-behavior proof.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Dedicated Agent commands can ignore configured timing and executable search paths, and Git cannot read the node-selected tool configuration.
Reason: Restoring configured worker behavior has clear value, and the host identifies this as maintainer-authored direction, including activation of the optional launcher settings.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it addresses a source-confirmed worker configuration gap, has maintainer-approved direction, and contains no definite introduced defect.

Reviewed head: 9a838501b1e4471401fef588a1b73c61a2965056

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Provide redacted installed Gateway/node output from a real Agent and model exercising configured timing, an admitted executable path, and node-selected Git configuration, including latest-stable upgrade behavior with existing settings intact; base-failing regression results are also not shown.
Agent review details

How this fits together

The Gateway prepares each worker turn's tool policy, the node supplies local execution settings, and the worker combines them when constructing approved command processes.

flowchart LR
  A[Agent configuration] --> B[Gateway tool policy]
  B --> C[Worker admission]
  D[Dedicated node launcher] --> E[Node execution context]
  C --> F[Worker exec tool]
  E --> F
  F --> G[Approved local process]
Loading

Technical review

Best possible solution:

Carry resolved settings through the existing worker tool-policy and node execution owners while preserving Gateway approval and explicit GitHub identity precedence.

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

Current-main source drops configured exec timing and search paths during worker tool construction, while node environment projection excludes launcher-selected Git configuration; no target code was executed during this review.

Is this the best way to solve the issue?

The implementation uses the existing configuration resolver, worker tool surface, node supervisor, and exec environment merger without introducing a competing policy owner.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Shared worker tool policy keeps the original intent (10ea473: Share Gateway-prepared tool policy and constructors with node turns while preserving execution authority.)
  • Gateway worker exec approval keeps the original intent (db38f86: Keep automatic review and human approval on the Gateway and prevent worker loopback approval fallback.)
  • Local prepared execution environment keeps the original intent (f898552: Prevent native GitHub credential fallback after loss of a managed identity profile.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Pinned introduced change: Reviewed the supplied merge-base-to-head diff; timing propagation, node settings, feature negotiation, documentation, and affected tests serve the stated execution-settings problem. (src/worker/worker-placement-tools.ts:51, 9a838501b1e4)
  • Current main still omits exec defaults: Current main constructs worker exec defaults without configured timeout, background delay, cleanup interval, or search paths; its Gateway authority producer also returns corePolicy without those fields. (src/worker/worker-placement-tools.ts:49, e61e680e180e)
  • Node settings retain their execution boundary: Launcher inputs are captured only for ephemeral process-worker nodes; worker PATH additions are intersected with node-admitted directories, and local tool inputs enter the execution environment after caller environment validation. (src/node-host/runtime.ts:181, 9a838501b1e4)
  • Explicit identity keeps precedence: A turn with a GitHub binding omits the node-selected Git configuration before tool construction, including when private-profile preparation cannot produce an identity environment. (src/worker/worker.runtime.ts:362, 9a838501b1e4)
  • Existing build compatibility contract: Admission already requires matching bundle hash, version, and protocol features; the new exec-default feature check follows the existing reject-incompatible-workers contract. (src/gateway/worker-environments/admission.ts:134, 9a838501b1e4)
  • Supplied proof exercises a controlled provider: The modified integration case launches a worker process and system Git, checks node-selected configuration and public data, and verifies transcript persistence; its provider response is a fixed test fixture rather than a real model. (src/worker/native-worker.integration.test.ts:171, 9a838501b1e4)

PR surface

Source +86, Tests +94, Docs +14, Other +1. Total +195 across 17 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 11 97 11 +86
Tests 4 106 12 +94
Docs 1 14 0 +14
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 1 +1
Total 17 219 24 +195

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

No label changes.

Label justifications:

  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

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

  • Supply the installed-worker real-model and upgrade evidence described in the proof assessment.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 25, 2026, 5:27 PM ET / 22:27 UTC.

Base automatically changed from dev/stevenlee/dedicated-worker-exec-contract to main November 26, 2026 06:02
@openclaw-barnacle openclaw-barnacle Bot added app: macos App: macos size: L and removed size: M labels Nov 26, 2026
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 560b63594fb5c0c3a22cfd51eaa378667b381962
  • Maintainer: @stevenlee-oai
  • Repository role: maintain

These security sensitive changes were made:

  • src/gateway/worker-environments/worker-tool-authority.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

@openclaw-barnacle openclaw-barnacle Bot added size: M and removed app: macos App: macos size: L labels Nov 26, 2026
@stevenlee-oai
stevenlee-oai enabled auto-merge (squash) November 26, 2026 06:16
@stevenlee-oai
stevenlee-oai merged commit 7df58a4 into main Nov 26, 2026
143 of 145 checks passed
@stevenlee-oai
stevenlee-oai deleted the dev/stevenlee/dedicated-worker-exec-runtime branch November 26, 2026 06:22
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 27, 2026
…w#205572)

* fix(worker): apply Agent and node exec settings to dedicated tools

* feat(protocol): define dedicated worker exec settings

* Use system Git in the Dedicated worker process test

* chore(ci): account for the node worker execution setting

* fix(worker): type the exec fixture and account for public tool data

---------

Co-authored-by: stevenlee-oai <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 30, 2026
Co-authored-by: sallyom <[email protected]>
(cherry picked from commit 3f00a51)

Companion audit: #204847 participant-limit propagation, #205572 worker exec settings, #204805 deferred tools, #206762 tool-description perf, and #206537 prompt manifest redesign touch neighboring owners but are not prerequisites for stable worker spawn guidance.

Release adaptation: Render the dedicated-worker hint only for worker placement; preserve stable local workflow text and keep both render sites on one delegation section binding, and let the worker hint suppress the duplicate full-surface messaging hint.

Co-authored-by: RomneyDa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime impact:auth-provider Auth, provider routing, model choice, or SecretRef resolution may break. impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. security-sensitive-changed size: M 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