Skip to content

feat: optionally omit tools on conversational turns - #153340

Merged
jalehman merged 13 commits into
openclaw:mainfrom
MertBasar0:feat/dynamic-skill-tool-filter
Oct 1, 2026
Merged

jalehman merged 13 commits into
openclaw:mainfrom
MertBasar0:feat/dynamic-skill-tool-filter

Conversation

@MertBasar0

@MertBasar0 MertBasar0 commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Related: #155316

What Problem This Solves

Conversational turns carry optional tool definitions even when the selected Decision model can confidently determine that the next response needs no tools.

User Impact

Default-off Decision assistance can narrow the next turn's optional tools when a saved Labs opt-in, an effective Decision model and a supported harness are all present. Required tools remain; denied tools never become available. Missing context, uncertainty, unavailability and the original 500 ms budget all retain the normal surface. Disabling Decision assistance stops future automatic evaluations; an evaluation already dispatched to its provider may finish and apply its result. A changed Decision model still restores permitted schemas, catalogs, callability and prompt guidance at foreground dispatch. Optional deadlines do not poison explicit decision_evaluate calls.

Privacy and cost: the selected provider receives the current request, at most two complete visible exchanges and five structurally labeled ordinary prompt-build hook fields. Hidden reasoning, raw tool names/IDs/arguments/results, runtime envelopes and media are excluded. Conversation text is bounded at 6,000 UTF-16 code units; conversation plus verbatim hook text at 8,000. JSON framing, rubric text and escaping are additional—not token/wire-byte limits. Hosted providers may charge. Existing saved opt-in intent is honored; no new destination, consent flag or migration is introduced.

Known limit: deterministic tests prove wiring, privacy and restoration—not general model quality, calibration or latency improvement. Rubric 9 and the 0.35 thresholds are unchanged. Mert’s later hosted rubric-9 stress-set report reports 6/457 false-negative tool-requiring calls (1.3%) at the prefilter owner, on one model/host with one-exchange histories; it is not a production traffic estimate or a foreground-dispatch measurement. Shipping that experimental error risk remains a maintainer decision, not a new benchmark added by this conflict-resolution task.

Why This Change Was Made

One Decision batch asks two independent Boolean questions (missing referent; next response needs tools). Only a strong no to both proposes a turn-scoped restriction. The existing tool-policy owner retains permissions and independent hook caps, checks Labs opt-in at Decision provider dispatch after awaited preparation, preserves independent live guards for admitted work, and restores the next turn. Auxiliary/compaction requests and callbacks after authority closure remain fenced.

The reduction removes duplicate admission/semantic-story layers and the repeated HTTP/deadline composition, reuses existing typed message/submission fixtures, and keeps unique regressions at their owners. Foreground submission cases now share the existing typed fixture in a bounded support file; hook fixtures still install the complete real runner. No assertions were dropped, and no DSL or release-only relocation was added. Hook availability queries retain their scope and authority semantics. The earlier reduction-review hold was lifted by @jalehman’s September 29 landing decision below; required GitHub gates still apply.

Evidence

Current landing status — October 1, 2026 PDT

At @jalehman’s explicit request, rebased the twelve feature commits onto main fffdd92f45036e49093292cf48f5fa10c75204b3 and published 150178058145b189118454d94b69359cacbc0499 with an exact old-head force-with-lease. Contributor authorship is preserved. Resolved the hook-layout/comment conflict without changing the final hook implementation and regenerated the configuration baseline through its canonical owner; generation/check and diff checks pass. Decision runtime, provider-host, TypeSafe transport and Labs copy remain byte-identical to the previously reviewed head. Main’s newer test-fixture and foreground-runner changes are retained.

This base includes the worker-planner repair 5a1c18b2655, Windows WAL rollback repair 9863e3f97ab, and final-verification presentation repair 82fe5e962f7. Separate local updater experiments are not added to this feature PR. These landed fixes replace the former inherited blockers; they do not establish green CI for this new head. That head’s hosted CI failed in the Discord capture fixture’s watcher teardown (run 36885987759); its test assertions passed. Focused validation on that head passed: 32 tests in the Decision admission, conversational prefilter and prompt tool-policy suites. The accepted auto-merge request was retired through confirmed native cancellation before publishing the correction. An initial test attempt overlapped a native checkout transition and was discarded; the clean pinned rerun supplies this result. No merge or bypass has occurred.

Prior refresh evidence:

Published head 972cc626ecaed19596d3b675784715e94334e9db incorporates main e9b768b14d266d0ddd935a6af36a12e6736f8ef5, preserving contributor history. The prior head’s sole failing test job hit an inherited explicit-port reservation gap before Gateway startup; #162431 fixes that gap with deterministic main-red/candidate-green coverage and repeated original-shard proof. The historical competing listener is not identified. This merge preserves the Decision/runtime/TypeSafe sources unchanged; the hook conflict only reconciles main’s comment cleanup, and the configuration baseline was regenerated. All 49 focused Decision/prompt-policy tests and configuration-baseline verification pass. That run subsequently failed; current results are described above. #162224 remains separate, not a landing prerequisite.

ClawSweeper Revision 44 found no actionable code/security findings and accepted the recorded provider-boundary disposition. Configuration compatibility is confirmed: no stored shape change or migration; an existing saved Labs opt-in activates this consumer as already disclosed and accepted. The setting remains default-off.

Maintainer decision and attribution: the narrow already-admitted model-setting race is not a reason to add a provider capability gate or block this opt-in experiment. Independent cancellation/authority checks stay intact. Older external providers remain responsible for their final I/O checks; no universal no-transmission guarantee is claimed. Normal required CI and native merge gates still apply.

October 1: deterministic capture-fixture cleanup — ff38551

Published ff38551468d4b689d44b35ec92a0febe9568a061, adding only explicit skills-watcher cleanup to the minimal-Gateway Discord capture fixture. Reproduced the same 16-entry teardown leak on the preceding exact head; the unchanged assertions and teardown pass with the repair (1 E2E test). No production behavior, assertions, leak guard, or timeout changed. File formatting/lint, root E2E TypeScript graph, and independent scoped P0–P2 autoreview passed. Previous 32 focused feature-test results are carried forward because feature inputs are unchanged, not described as freshly rerun. New exact-head hosted CI remains required before native replacement-head recovery and merge.

September 30: admission-only Decision assistance opt-out — db3f7f99e382

At @jalehman's direction, disabling Decision assistance stops future automatic provider dispatches, not work already admitted. An admitted evaluation may finish lazy loading/DNS/network I/O and still apply its tool restriction. This is a preference for starting optional work, not a cancellation command. The existing independent model-selection, run/operator authority, abort/deadline, provider-configuration and credential-generation guards remain intact. Explicit decision_evaluate remains Labs-independent.

The runtime now checks the consumer's one-shot canDispatch predicate after awaited preparation and immediately before provider dispatch. Only the independent live-admissibility predicate reaches the provider. Existing pre-dispatch opt-out regressions still require zero provider calls; post-dispatch opt-out regressions now require completion. No new provider capability gate, public config, SDK field, UI copy, timeout, or suppression was added.

Verified source tree: ce531eda65d7823c9b3d7fc041679667cd1efaa9; published commit: db3f7f99e382d614a309b3a227112336079e650a, a single fast-forward commit on the unchanged prior head 643c6a5d6bbd2d20d7e394730eeeb8c3dba93064.

Focused proof: secretless direct AWS, lease cbx_aba5f6d57988, Node 24.21.0 / pnpm 12.5.1. Passing boundary run: 103 tests in six files passed (41 composed/prefilter/foreground tests, 61 runtime/admission tests, one registered TypeSafe real-loopback HTTP integration test). The agent command took 47.56 s; runtime/transport command 30.48 s. These are isolated test timings, not a latency improvement or full-CI claim.

  • Opt-out during cold import or DNS: 1 admitted request, result retained.
  • Next disabled turn: 0 additional requests; reenabled control: 1.
  • Model, authority, provider configuration, or credential change during DNS: 0 requests each.
  • Explicit evaluation while Labs off: 1 request.
  • Structured, Tool Search and code-mode foreground dispatch retain admitted opt-out results; model changes still restore their permitted tool baseline.

Failure-before and static proof: Negative-control / restored-green / typed-lint run restored the two original production files while retaining the revised regression: the admitted result was incorrectly discarded, so the test failed. Restoring the patch passed the same real HTTP test (191 ms test body; 30.21 s wrapper). Focused typed lint passed with zero warnings/errors (31.94 s). The command completed successfully; its log-event uploader reported one timeout afterward, so these results are also recorded here from the captured command output.

Fresh independent P0–P2 review is scoped-clean. Formatting and git diff --check pass. The first validation exposed a test-fixture error (the next turn reused an old enabled scoped config); the corrected fixture uses the newly disabled config, without changing production config-owner semantics. No full build/full-suite rerun or authenticated provider-quality benchmark is claimed for this small follow-up. No merge, auto-merge, CI rerun, or deployment was requested or performed.

Historical September 30 rebase and final-I/O repair — 74da2b7d9b35d

Superseded Labs semantics: the late-opt-out cancellation and zero-request claims in this historical section describe the prior implementation. The admission-only change above intentionally allows admitted work to finish. Independent model, authority, cancellation, deadline, provider/configuration and credential guards remain.

Rebased the contributor commits onto pinned main 3462306, preserving Mert and Josh’s authorship and the previously published integration fixes. The old head was bd7edd4d2c05f9aaee979bbe796fd674180b79cc; this is the explicitly requested, exact-lease history rewrite, not a merge-main substitute. Main already contains the obsolete registry-test repair in its canonical settlement fixture. Config conflicts were resolved through the canonical generator. Source tree for that historical repair: 84d6303a0c422a4c6b2eb25e329204921f7f9089.

Implemented Mert’s final-request repair at the existing provider host and TypeSafe transport. The final synchronous beforeRequest check revalidates consumer eligibility and the provider configuration/credential generation after lazy loading and DNS preparation. The host retains an observed interruption or thrown authority assertion across adapter sanitization and awaited cleanup; changing config back cannot turn a revoked call into success or a provider outage. Explicit decision_evaluate remains Labs-independent. Cancellation, deadlines, retirement, and physical settlement remain enforced.

  • Failure-first, real transport: the exact old-head cold-load proof received 1 forbidden request; the repaired path receives 0, with 1 allowed request. A review-discovered provider-generation case also first failed at the real socket, then passed. Late transport-preparation opt-out (three consecutive calls), model change, authority closure, provider-config change, and secrets-revision change all send 0 requests. Explicit evaluation with Labs off still sends 1 on the same provider host. This uses the registered TypeSafe plugin and real guarded HTTP against a deterministic loopback System One fixture—not authenticated Jev or model-quality evidence.
  • Verification: Secretless direct AWS (Node 24.21.0, pnpm 12.5.1; original test deadlines) passed 169 focused agent tests, 159 TypeSafe tests, and 62 host/admission/transport tests on their recorded source inputs. Production core/UI/extension types, all 27 core-test graphs, all four root-test graphs and extension-test types passed. Full pnpm deadcode:full, canonical config generation/check, affected typed lint, format, size and applicable structural guards passed. Full pnpm build passed on the independently reviewed production input (449.18 s); later test relocation and lint-only corrections reused that proof, and the affected host/real-transport tests and lint passed again on the exact final tree. The broad changed-check controller timed out while whole-repository lint was running; it is not reported as an all-green command. The remaining applicable lint/guards were completed separately on the changed paths, without suppressions or increased test deadlines. The build retained a non-gating 217.1 KiB versus 215 KiB UI bundle advisory; no UI baseline was changed.
  • Review and cost: fresh independent P0–P2 autoreview and lead source review found no actionable findings. Host-admission cases reuse the registered-host fixture; the socket regression belongs to the existing root integration-test graph, not core’s extension-free graph. No guard, assertion, timeout, line cap, baseline, or ignore was weakened. The final real socket case took 260 ms; the final four-case host/integration command took 54.01 s including cold transforms. The earlier 62-case command took 39.22 s. These are isolated proof costs, not a speedup claim. The bounded repair adds 46 production lines across six existing owners; tests/fixtures add 438 and remove 77 lines (including moving the unchanged registered-host fixture), separately from docs/generated output.
  • CI prerequisite: pinned main includes the upstream preflight harness export repair and its regression test. The old run’s missing .ci-harness/scripts/ci-build-manifest.mjs is not handled by a retry or policy bypass. Fresh current-head CI is separate from isolated proof: CI run 36761319540 is attached to exact head 74da2b7d9b35dd83559c3fedf5473f25637fff39 and was in progress at publication. GitHub reports the PR mergeable; required checks/review are not claimed complete.

Cold-load RED · Provider-generation RED · Final-tree admission and lint proof

This update is scoped to rebase, repair, and publication. No merge, auto-merge, or deployment was performed. Third-party providers must adopt the optional final-I/O callback; local ONNX retains its existing signal-controlled worker lifecycle. No new consent flag, provider destination, or model benchmark is introduced.

Historical verification and prior landing direction (before this rebase)

Previous hosted CI — September 29, head 94244f1c34cfe

CI run 36635774877, attempt 1 completed with four failed test jobs; live GraphQL confirms the required openclaw/ci-gate is FAILURE, while dependency and security review contexts pass. The accepted squash auto-merge was safely cancelled through its retained native outcome before branch repair. That failure remains historical evidence for head 94244f1c34cfe; the signed replacement below still requires its own exact-head CI and review. The PR has not merged.

  • Changed tests 1: the archive retirement fixture expected one rejected write but observed zero. Source inspection identifies the obsolete synchronous writer spy; current main contains the owning async-retirement fixture fix in a2abc17ba6f3 / #161406, landed at 22:30 UTC and not included in this head.
  • Changed tests 6: the real npm-pack successor lifecycle test exceeded 120 seconds. Cause remains unresolved.
  • Compact large 14: the noop-successor monitor fixture failed with SQLite database is locked while creating its failure-injection trigger. Cause remains unresolved.
  • Compact large 17: provider-settings Gateway startup exceeded 90 seconds. Cause remains unresolved.

All four failing test files are unchanged by the feature delta. This does not prove the three unresolved failures are unrelated or passing on current main. Exact failed job logs were fetched once and inspected. A bounded local replay of the archive suite was attempted after a frozen dependency install, but the runtime-preparation guard refused because it could not verify separation from managed Gateway artifacts; no test ran and no checkout artifacts were rebuilt by that preparation. The guard was not bypassed. Existing isolated proof remains valid for its original inputs, not a replacement for these failed checks. No CI rerun, head push, admin bypass, or deployment was performed during the initial diagnosis; the subsequent authorized cancellation and isolated repair work are recorded below.

September 30 repair continuation — signed head bd7edd4d2c05f

The candidate incorporates pinned main 56f616e437c8cbee9b19fc60281ebd612b88d783, including the archive fixture repair above. The prompt-helper import conflict retains both main's context-budget normalization and the Decision prompt fields. The signed fast-forward update bd7edd4d2c05f9aaee979bbe796fd674180b79cc preserves contributor ancestry and exactly matches the verified source tree below. It repairs the real merge conflict and incorporates the owning archive fix; it is not a retry-only push.

Secretless direct AWS proof uses Node 24.19.0, pnpm 12.5.1, two-CPU affinity and the original test deadlines. On the frozen merged input tree a7c659f8409fe3c21e03588ff7c09fa341542882:

  • The complete original-order monitor plan passed 62 files, 1,165 tests, with one pre-existing skip. Both monitor cases passed; the original SQLite lock cause is still unproven.
  • The archive file passed 25/25 tests, verifying main's existing fixture repair.
  • The real npm-pack lifecycle case passed in 5.706 s. The full file was 21 passed / 2 failed: two different policy tests encountered a group-writable temporary parent created by the proof harness. Direct negative and positive controls through the unchanged policy owner confirm that bad ancestry yields security_scan_failed and secure ancestry yields the expected security_scan_blocked. The full corrected secure-temp replay subsequently passed 23/23 tests, including both policy cases with unchanged assertions. Its normal source-build/test wrapper completed in 962.28 s (test phase 98.56 s).
  • The larger-runner original catalog plan completed 30 of 31 files, 184 of 185 tests passing. The exact provider-settings startup case passed in 38.596 s, but this does not establish a fix for its hosted timeout. A different private-completion Stop case failed because descendant-cancellation cleanup reported an unavailable session delivery generation. A bounded diagnostic replay of the complete private-completion file subsequently passed 22/22 tests, including the Stop case (7.042 s; wrapper 125.76 s). It added only diagnostic logging at the generation owner, captured no unavailable-generation event, and restored the original source bytes exactly afterward. This narrower instrumented nonreproduction does not establish a root cause or make the failed catalog plan green. No speculative cancellation repair was added.

The complete selected merge-integration check plan passed (2212.15 s), including core types, all 27 test-type graphs, all three Knip scans, typed lint and applicable guards. All 80 tests in five focused prompt-helper/build/phase/submission files passed (102.42 s wrapper wall). Canonical config generation and validation passed with no tracked generated delta. The proof index and working-tree bytes remain bound to the frozen input tree above; there is no generated patch to apply.

The earlier 8 GB npm/archive setup failures occurred before tests (build SIGKILL); the earlier catalog replay's kernel log confirms an OOM kill. Those are proof-environment failures, not product fixes or passing tests. Both small leases were released; the owned 32 GB lease completed all scheduled proof and diagnostic commands. Temporary diagnostic instrumentation was fully removed and is not included in the published source. No security guard, assertion, or timeout was weakened. Passing replays do not explain the unresolved hosted failures or replace fresh exact-head CI and native review/landing gates.

Catalog original-order replay · npm/archive replay · Completed secure-temp and integration verification · Bounded cancellation diagnostic.

September 29 evening main integration: signed head 94244f1c34cfe25636f2755de4b5686eeaba79f8 incorporates pinned main 2d85731967cbcc6acf3c6913436af9e0f93701ea without rewriting contributor ancestry. The Decision feature and late-opt-out admission repair are retained; the only textual conflict was the generated config checksum, regenerated through its canonical owner.

Both failures from the previous hosted run have targeted main fixes included here:

  • 1475b6f8358a stops the original subagent registry and joins accepted sweeps/cleanup tails before the test runner retires SQLite owners. This covers an old registry tick recreating a shared-state worker after cleanup; the earlier module-owner mapping repair alone did not cover that path. The database identity guard remains intact.
  • 4c611618ae4a runs the fake-clock zero-delay wait continuation before draining root work in the exact collector-yield fixture. It preserves the terminal-state assertion rather than relaxing its timeout or result.

Verification: the original two-group CI plan passed 903/903 tests on pinned main: 294 dispatch tests and 609 tests across all 59 Gateway files, including the three formerly failing SQLite cases. The unchanged main source remained clean before and after the run; no OOM was recorded. The combined candidate passes 339 focused feature tests in 19 files, the exact 115-case registry suite, the eight-case registered sweeper lifecycle suite, and the cross-file SQLite runner regressions. Canonical config generation/check and the complete selected check plan pass, including core/UI types, all 27 test-type graphs, Knip, lint, both size ratchets, and applicable guards. Fresh independent P0–P2 review is scoped-clean.

The completed combined proof tree is exactly the signed published commit tree. Full core lint passed with one non-blocking max-lines warning in the unchanged main file ui/src/pages/model-setup/model-setup-page.ts (705 versus 700); this file is byte-identical to pinned main and is not changed by this PR. No gate, assertion, timer deadline, or baseline was relaxed. No tests were added by this integration. Original-plan wall time was 864.85 s, owner regressions 92.08 s, focused feature tests 109.38 s, and the complete selected check plan 1257.56 s. These are isolated AWS measurements, not hosted-CI success claims.

Original physical-plan replay on pinned main · Combined-source verification.

The previous CI failures remain recorded, and a passing replay is not a claim to have reproduced the original hosted timer schedule. Fresh CI on the pushed head is separate from this local/isolated proof. No new benchmark or live-provider claim, retry-only workaround, assertion weakening, baseline waiver, or alternate SQLite owner is introduced.

September 29 earlier integration and admission-repair evidence

September 29 main refresh and admission repair: head 7bca27d14dddd6f595e3bcc87d5e5b70c54ddb5d incorporates pinned main c2feb353e017c809bced95e46f843366db349e22, including the SQLite test-lifecycle repair. Contributor ancestry and the reduced feature are preserved. The only textual integration conflict was the config checksum, regenerated through its canonical owner.

Late opt-out before provider dispatch: addressed Mert’s Revision 34 boundary report. The automatic consumer reuses its existing eligibility predicate after awaited operator preparation and before the provider callback. Explicit decision_evaluate remains Labs-independent; root/scoped authority, cancellation, and resource release remain enforced.

The existing composed regression now tests both steering and operator preparation. On the pre-fix source, the operator barrier first observed zero provider calls, published Labs opt-out, and then observed one provider call (failure); the steering control passed. With the repair, opt-in controls still reach the provider, and opt-out before provider dispatch produces zero calls while retaining permitted tools. This executes the real prompt assembly, automatic consumer, Decision runtime and provider host with a registered fixture provider; it is deterministic production-code boundary proof, not a live-network measurement.

Verification on the earlier head: the integrated source passed 338 tests in 19 files, canonical config generation/check and the complete selected check plan. After the admission repair, 20 composed tests plus 79 runtime/registry/prefilter sibling tests passed, along with the complete incremental check plan, including core/test types, Knip, typed lint and applicable guards. Both independent P0–P2 reviews were scoped-clean. Single-worker composed-file wall time was 50.98 s, dominated by cold transforms (86%); the regression extends the existing fixture without another Gateway/process boot or timing delay. No assertion, deadline, baseline or guard was weakened.

Integration verification · Fail-before boundary evidence · Admission repair verification.

The fail-before test intentionally failed at the provider-call assertion; its shell receipt also exited nonzero because a trailing log-pattern check did not recognize ANSI formatting. The actual 1-failed/1-passed result and assertion were inspected; that run is not presented as a green gate. The earlier catalog-startup timeout remains an unresolved historical observation, not a claimed fix or CI waiver. Fresh hosted CI and ClawSweeper review on the new head are still required for a readiness verdict.

Historical integration and reduction evidence

September 28 current-main integration: 2d0320d25cf39deffbf267edab8f6de7a5e0149a includes the reviewed integration 64a6eefb40faded1b6dcc0f9a577e5294d7e4a4e and the final main refresh 28340c4, preserving published a6d25b13db12 and all contributor ancestry. All seven conflicts were resolved. It adopts main’s prompt/runtime and test consolidations, retains complete real hook-runner fixtures, and regenerates the config baseline through the canonical generator. Caller-budget expiry remains separate from provider-failure health; taking main’s deadline branch unchanged would restore the reported circuit-open regression.

Verification: the combined source passed 283 tests across 18 files. After repairing two typed assembly mocks and four counted lines of fixture growth, all 26 selected type-check graphs, core types, 36-file typed lint (zero warnings/errors), both size ratchets and config checks passed; 68 fixture/eligibility tests passed again. A full P0–P2 review of the integrated candidate found no actionable findings. The deadline negative control deliberately restores the bad health accounting: both resolve/reject cases fail, then pass after exact source restoration. Final per-file checks and normal commit hooks preserve the verified source. Main then advanced again with a checksum-only conflict: all 39 reviewed feature files remained byte-identical, while fresh core types, canonical generation/check and 122 provider-continuation/Decision tests verified the new composition.

Reduction preserved: the earlier reduction removed 716 test/fixture lines (2,211 → 1,495 additions on that comparison base; 32.4%, not the roughly-half target). This integration retains the reduced tests and adopts main’s newer consolidation rather than restoring the expanded versions. Fixtures/helpers are included in all counts; no assertion, cap, baseline or ignore was relaxed.

Combined-source runtime proof · Repaired gates and deadline negative control · Final current-main check.

Validation notes and measured test cost

Direct secretless AWS c7a.8xlarge; Node 24.21.0 and the integrated frozen pnpm 12.5.1 lockfile. The first integration run found two incomplete typed mock return shapes and a four-line grandfathered-size regression; both were repaired and the affected gates rerun. Its initial negative-control selector accidentally selected no tests, which was not counted as proof; the corrected selector ran the two expected failures and the restored green pair.

Single-worker test wall times (pnpm test for each file with --maxWorkers=1):

File Wall
Prompt phase 17.06 s
Tool Search prompt 14.30 s
Context-engine integration 23.00 s

These are isolated-run costs, not speedup or hosted-CI claims. Earlier unchanged-contract Labs, Knip, UI and boundary evidence remains source-bound historical proof. No new live-model benchmark or full-suite pass is claimed.

Publication: normal signed fast-forward Git update as roboclaw-bot, preserving contributor ancestry. No force push or deployment.

Maintainer landing decision — September 29: @jalehman has authorized landing the reviewed experiment once required CI clears, lifting the earlier reduction-review hold. This direction covers the documented behavior as implemented: existing saved Decision-assistance true values activate the consumer when an effective Decision model is selected; bounded turn evidence can reach that selected provider; and the measured rubric-9 stress set included 6 action misses among 457 tool-requiring evaluations. These remain disclosed experimental tradeoffs, not a claim of perfect classification or a new quality measurement. Active organization-admin authority was verified for the ownership/governance decision. Native CI, required-review, and merge safeguards remain enforced; no bypass is requested.

Labs disclosure (unchanged)

Actual running Control UI with a deterministic Gateway fixture, dark theme, captured at 76f34d54c1eb. This reduction does not change pixels.

Before

Labs disclosure before

After

Labs disclosure after

Local Jev quality check

Use a separate checkout:

gh pr checkout 153340 --repo openclaw/openclaw
git rev-parse HEAD # must equal ff38551468d4b689d44b35ec92a0febe9568a061
pnpm install --frozen-lockfile
pnpm build

Follow the TypeSafe setup, preserve other plugin/config entries, use a protected credential/SecretRef, select the effective Decision model and enable Settings → Labs → Decision assistance. Run OPENCLAW_LOG_LEVEL=debug pnpm openclaw gateway run. Inspect Decision tool surface at primary dispatch safe counters for greetings, action versus explanatory approvals, completed-action thanks, failed-action retry, opt-out before dispatch, opt-out during an admitted evaluation, the next disabled turn, model change and bounds overflow. Report the head, scenario and counters—not private conversation or credentials. Counts and normalized definition characters are observations, not tokens, cost or provider acceptance.

Contributor credit

Original implementation and ongoing canonical-gate integration by @MertBasar0. Alignment and verification requested by @jalehman; this update preserves the contributor's implementation and commit authorship and does not claim their implementation as new work.

Work sessions


View the OpenClaw session

@clawsweeper

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

@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Sep 20, 2026
@github-actions

github-actions Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Dependency graph guard cleared

This PR no longer has dependency changes awaiting review. A future dependency graph change from an external contributor requires a maintainer's /allow-dependencies-change comment after the guard notice identifies that revision.

  • Current SHA: ff38551468d4b689d44b35ec92a0febe9568a061

@openclaw-barnacle openclaw-barnacle Bot added triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. and removed triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Sep 20, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 20, 2026
@clawsweeper

clawsweeper Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 1, 2026, 12:31 PM ET / 16:31 UTC (Revision 52).

ClawSweeper review

What this changes

Adds optional conversational tool filtering through the configured Decision model, with bounded context, conservative fallbacks, transport guards, diagnostics, documentation, and focused regressions.

Merge readiness

⛔ Blocked before merge - 1 item remains

This PR still provides useful work absent from main. No actionable introduced defect remains; the previous compatibility concern is covered by unchanged settings, documented upgrade behavior, and explicit administrator acceptance.

Priority: P2
Reviewed head: ff38551468d4b689d44b35ec92a0febe9568a061

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Strong real-provider and transport evidence supports a coherent implementation with no remaining actionable findings.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (logs): Real TypeSafe/Jev Gateway observations demonstrate pruning and retention through prompt assembly; later registered TypeSafe transport proof exercises admitted opt-out and rejects model, authority, config, and credential changes before HTTP dispatch. Rubric-9 hosted measurements cover classification separately, without claiming current-head production accuracy. Inspected before/after Labs images match current copy. Stored configuration shape and defaults remain unchanged, with saved-opt-in activation documented and accepted.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (logs): Real TypeSafe/Jev Gateway observations demonstrate pruning and retention through prompt assembly; later registered TypeSafe transport proof exercises admitted opt-out and rejects model, authority, config, and credential changes before HTTP dispatch. Rubric-9 hosted measurements cover classification separately, without claiming current-head production accuracy. Inspected before/after Labs images match current copy. Stored configuration shape and defaults remain unchanged, with saved-opt-in activation documented and accepted.
Evidence reviewed 10 items Pinned introduction and review continuity: Inspected the introduced merge-base-to-head delta. Comparing the previous reviewed head with the current head shows only explicit skills-watcher cleanup in the Discord capture fixture; feature production inputs are unchanged between those two heads.
Still necessary on current main: Fetched main has no conversational prefilter module. Its Decision-assistance helper and the latest release retain the foundation-only eligibility behavior; the merged foundation #155134 explicitly connected no automatic consumer.
Config and upgrade compatibility: The introduced config change updates help text, not the stored Boolean shape or default. Existing saved true values intentionally activate eligible automatic work; absent/false settings and empty agent model overrides retain baseline behavior. Upgrade activation, evidence transfer, and hosted cost are documented.
Findings None None.
Security None None.

How this fits together

OpenClaw prepares tools and conversation context before each agent response. This optional filter asks the configured Decision provider whether tools are needed, then narrows the permitted tool surface while preserving required tools.

flowchart TD
A[User request and recent conversation] --> B[Labs and harness eligibility]
B -->|Eligible| C[Bounded Decision evaluation]
B -->|Disabled or unsupported| E[Normal permitted tools]
C --> D[Tool need and context judgment]
D -->|Uncertain or unavailable| E
D -->|Conversational| F[Preserve required tools]
E --> G[Foreground model request]
F --> G
Loading

Before merge

  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
Agent review details

Security

None.

PR surface

Source +814, Tests +1853, Docs +120, Generated 0, Other -3. Total +2784 across 51 files.

View PR surface stats
Area Files Added Removed Net
Source 23 897 83 +814
Tests 23 2030 177 +1853
Docs 3 137 17 +120
Config 0 0 0 0
Generated 1 2 2 0
Other 1 0 3 -3
Total 51 3066 282 +2784

Review metrics

Metric Value Why it matters
Configuration surface 0 new settings; existing opt-in gains 1 automatic consumer Saved opt-in activation is documented and explicitly accepted.
Production and test growth production +814 net lines; tests and support +1,853 net lines Growth implements bounded projection, policy restoration, diagnostics, and distinct admission regressions; the body explains the scope and consolidation.

Technical review

Best possible solution:

Keep the default-off consumer with its documented experimental limits, existing tool-policy owner, and independent live authority guards.

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

Not applicable as a bug report. Existing live Gateway and real-transport observations demonstrate the feature's changed behavior; this read-only review did not execute target code.

Is this the best way to solve the issue?

Yes. The consumer reuses canonical selection, Labs eligibility, provider execution, and tool policy, and the remaining experimental tradeoffs have explicit acceptance.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded, default-off agent optimization rather than an urgent baseline regression.
  • merge-risk: 🚨 compatibility: Existing saved opt-in activates a new consumer and the provider API gains an optional callback; these documented compatibility tradeoffs are accepted.
  • merge-risk: 🚨 security-boundary: Automatic evaluation transfers bounded conversation evidence to the selected provider; the disclosed legacy-provider limitation is accepted while live guards remain intact.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (logs): Real TypeSafe/Jev Gateway observations demonstrate pruning and retention through prompt assembly; later registered TypeSafe transport proof exercises admitted opt-out and rejects model, authority, config, and credential changes before HTTP dispatch. Rubric-9 hosted measurements cover classification separately, without claiming current-head production accuracy. Inspected before/after Labs images match current copy. Stored configuration shape and defaults remain unchanged, with saved-opt-in activation documented and accepted.
  • proof: sufficient: Contributor real behavior proof is sufficient. Real TypeSafe/Jev Gateway observations demonstrate pruning and retention through prompt assembly; later registered TypeSafe transport proof exercises admitted opt-out and rejects model, authority, config, and credential changes before HTTP dispatch. Rubric-9 hosted measurements cover classification separately, without claiming current-head production accuracy. Inspected before/after Labs images match current copy. Stored configuration shape and defaults remain unchanged, with saved-opt-in activation documented and accepted.

Evidence

What I checked:

  • Pinned introduction and review continuity: Inspected the introduced merge-base-to-head delta. Comparing the previous reviewed head with the current head shows only explicit skills-watcher cleanup in the Discord capture fixture; feature production inputs are unchanged between those two heads. (test/e2e/gateway-transcripts-discord-capture.e2e.test.ts:87, ff38551468d4)
  • Still necessary on current main: Fetched main has no conversational prefilter module. Its Decision-assistance helper and the latest release retain the foundation-only eligibility behavior; the merged foundation feat(decisions): add explicit evaluation and Labs opt-in foundation #155134 explicitly connected no automatic consumer. (src/agents/decision-assistance.ts:11, f833bb42560b)
  • Config and upgrade compatibility: The introduced config change updates help text, not the stored Boolean shape or default. Existing saved true values intentionally activate eligible automatic work; absent/false settings and empty agent model overrides retain baseline behavior. Upgrade activation, evidence transfer, and hosted cost are documented. Public docs: docs/concepts/experimental-features.md. (docs/concepts/experimental-features.md:133, ff38551468d4)
  • Accepted experimental tradeoffs: The captured PR body records September 29 acceptance of saved-opt-in activation and the measured 6/457 action misses. The later administrator disposition accepts the disclosed legacy-provider limitation without a capability gate, while retaining cancellation, authority guards, TypeSafe final-I/O checks, and stale-result rejection: feat: optionally omit tools on conversational turns #153340 (comment). A live permission read verifies jalehman has the repository admin role.
  • Live consumer proof: The inspected live Gateway trace uses the built-in harness and real TypeSafe/Jev inference: conversational pruning changed visible tools from 5 to 0 and the primary model answered successfully; exact-history retrieval retained 5 tools. That trace covers rubric 8 integration, while the separately inspected hosted stress report covers rubric 9 classification and its limitations. feat: optionally omit tools on conversational turns #153340 (comment). (src/agents/embedded-agent-runner/run/attempt-prompt-build.ts:222, ff38551468d4)
  • Admission and final-I/O proof: The captured September 30 evidence exercises the real prefilter, runtime, registered TypeSafe provider, guarded transport, and counting HTTP listener: admitted opt-out sends one request and retains its result; the next disabled turn sends none; model, authority, provider-config, and credential changes during DNS send none; explicit evaluation with Labs off sends one. The current integration test preserves those scenarios. Legacy providers ignoring both callback and signal are expressly outside a universal no-transmission guarantee. (test/decision-typesafe-admission.integration.test.ts:23, ff38551468d4)

Likely related people:

  • jalehman: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • jjjhenriksen: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • jb510: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: 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 (51 earlier review cycles; latest 8 shown)
  • reviewed 2026-10-01T05:09:51.930Z sha 68ac55c39911102b64cf1ebdd13b228976d95238 :: blocked before merge. :: none
  • reviewed 2026-10-01T06:35:09.542Z sha 972cc626ecaed19596d3b675784715e94334e9db :: blocked before merge. :: none
  • reviewed 2026-10-01T07:32:08.120Z sha a084d9b5b4be06387712656ccc35ea1e16a8c31c :: blocked before merge. :: none
  • reviewed 2026-10-01T07:44:47.464Z sha a084d9b5b4be06387712656ccc35ea1e16a8c31c :: blocked before merge. :: none
  • reviewed 2026-10-01T08:08:17.694Z sha a084d9b5b4be06387712656ccc35ea1e16a8c31c :: blocked before merge. :: none
  • reviewed 2026-10-01T08:21:39.532Z sha a084d9b5b4be06387712656ccc35ea1e16a8c31c :: blocked before merge. :: none
  • reviewed 2026-10-01T08:33:31.107Z sha a084d9b5b4be06387712656ccc35ea1e16a8c31c :: blocked before merge. :: none
  • reviewed 2026-10-01T15:52:41.534Z sha 1501780 :: blocked before merge. :: none

@clawsweeper

clawsweeper Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper recorded closeout evidence for this proposed close.

  • Action: close remains subject to final live verification.
  • Close reason: belongs on ClawHub.
    Review evidence: durable ClawSweeper review.

@clawsweeper clawsweeper Bot closed this Sep 20, 2026
@jalehman

Copy link
Copy Markdown
Contributor

Thanks for the idea. I checked the current extension path, and this is a better fit for ClawHub.com than OpenClaw core.

dafuq clawsweeper? no it's not. did you even read the referenced PRs?

@jalehman jalehman reopened this Sep 21, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Sep 21, 2026
@MertBasar0

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

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

@clawsweeper

clawsweeper Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@MertBasar0
MertBasar0 force-pushed the feat/dynamic-skill-tool-filter branch from 4a0f65c to 32f6ed1 Compare September 21, 2026 21:26
@MertBasar0

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 21, 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:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Sep 21, 2026
@MertBasar0

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 21, 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:

@MertBasar0

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@MertBasar0

Copy link
Copy Markdown
Contributor Author

Thanks @jalehman for taking this over and for the careful disposition. The admission-only semantics and leaving the provider contract as a documented limit both make sense to me.

Fair point on my last proof, too: the fake provider ignored context.signal as well, and the authority case never aborted a real signal, so it showed the callback boundary rather than a production revocation path. I'll build future proofs on a provider that honors the signal and on the real revocation path.

When #153915 moves again, I'll make the Vercel provider follow the TypeSafe pattern: pass the signal to fetch and check isAdmissible right before the request.

MertBasar0 and others added 13 commits October 1, 2026 08:38
…bs and harness capability (openclaw#155314, openclaw#155316)

- Connect prompt-build prefilter to canonical isDecisionAssistanceEligible Labs consent contract (openclaw#155314)
- Gate prefilter evaluation on harnessSupportsTurnScopedToolRestrictions capability declaration (openclaw#155316)
- Preserve tool policy when harness is unsupported (e.g. Codex app-server), pending action instructions are present, or attempt is cancelled
- Update test suite with schema-backed decisionAssistance configurations and per-agent decisionModel overrides

Co-authored-by: jalehman <[email protected]>
Preserve the contributor core consumer while binding canonical consent, actual harness support, prepared config, and live run authority. Validate the runtime deadline and real ONNX prompt submission without claiming universal classification or latency gains.

Co-authored-by: jalehman <[email protected]>
Resolve the remaining configuration-help review finding. Explain explicit consent, inherited Decision models, built-in filtering, preserved required tools, request transfer, and hosted costs. Regenerate the config documentation baseline without changing settings or runtime behavior.

Co-authored-by: jalehman <[email protected]>
Use one provider-neutral batch with separate missing-context and next-response tool-need judgments, following the documented Jev/Noul semantics. Preserve first-turn eligibility, safe bounded history, permissions, required tools and per-turn restoration. Measure actual foreground tool definitions with DEBUG-only scalar diagnostics.

Live model-quality testing is deferred to local testing; no classifier-specific thresholds or adapter framework are introduced.

Co-authored-by: jalehman <[email protected]>
Bring the shared prompt-phase fixture and Tool Search assembly override up to the current dispatch diagnostics contract. Type the assembly mock and complete policy result so missing fields fail checking instead of silently blocking the primary stream. Preserve the original four replay/queued-context assertions and cover DEBUG-on/off diagnostics without adding cases.

Construct modified Decision answers on fixture-owned copies rather than mutating the read-only API result. Keep the Labs toggle and configuration help generic; supported uses and full behavior/privacy details remain in canonical docs. No provider, saved-consent, permission, or classifier-policy change.

Co-authored-by: jalehman <[email protected]>
Revalidate Decision eligibility at the foreground dispatch boundary and withdraw only its optional cap when the published opt-in or model selection changes. Restore the current permitted schemas, catalog, callability and owned prompt guidance without discarding independent hook restrictions or required tools.

Keep caller-budget expiry out of shared provider outage accounting while preserving genuine provider failures and physical request settlement. Replace incomplete context-engine hook fixtures with the typed real runner, retain the original assertions, and keep the context limit private for the production dead-code gate.

Preserve the hook-context and rubric-9 change; document and test the separate 6000/8000 UTF-16 evidence-text bounds and the existing forward-looking saved-intent contract. Add failure-first composed final-wire and real loopback HTTP/provider-host regressions, including subsequent explicit evaluation on the same provider.

Co-authored-by: jalehman <[email protected]>
Model the result-budget fixture's foreground-only session explicitly as not compacting. Keep the required production compaction contract and all existing result/persistence assertions intact.

Co-authored-by: jalehman <[email protected]>
Remove overlapping test layers and repeated fixtures while retaining the distinct context, policy, and dispatch boundaries. Runtime validation remains pending because the secretless runner broker is unavailable.

Co-authored-by: jalehman <[email protected]>
Address MertBasar0’s pre-dispatch opt-out report by reusing the automatic consumer eligibility fence after awaited operator preparation. Preserve explicit Decision calls and root/scoped authority and cancellation checks. Extend the existing composed regression at the operator boundary.

Co-authored-by: jalehman <[email protected]>
Carry automatic consumer admission through the existing provider host and TypeSafe adapter to the final synchronous guarded-fetch boundary. Retain observed revocation or authority failure across adapter sanitization and asynchronous cleanup without treating either as a provider outage. Preserve explicit Decision evaluation, caller cancellation, deadlines, and provider retirement.

Rebase the contributor commits onto pinned main and retain their previously published integration fixes and test organization. Prove the cold-load and transport-preparation windows with the registered TypeSafe plugin and a real loopback request counter, including same-host explicit calls after revocations.

Co-authored-by: MertBasar0 <[email protected]>
Co-authored-by: jalehman <[email protected]>
Keep Labs eligibility at provider dispatch while preserving independent live guards for admitted evaluations. Let in-flight results survive opt-out and cover subsequent disabled turns.
@jalehman

jalehman commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Merged via squash.

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 merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. plugin: typesafe proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants