Skip to content

fix(openclaw): default fresh local tool disclosure to direct - #12968

Merged
ericksoa merged 1 commit into
mainfrom
fix/12106-local-openclaw-tool-default
Oct 10, 2026
Merged

ericksoa merged 1 commit into
mainfrom
fix/12106-local-openclaw-tool-default

Conversation

@ericksoa

@ericksoa ericksoa commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

Outcome

A fresh managed OpenClaw sandbox on local Ollama or vLLM defaults to direct tools. An explicit CLI/environment choice remains authoritative. Existing sandbox choices, other agents, cloud routes, and llama.cpp retain their current behavior.

Reason

The initial onboarding session seeds progressive disclosure before a provider is selected. Passing that seed unchanged into local OpenClaw creation can require models to drive nested Tool Search calls even when direct tools work.

Related issues

Refs #12106: addresses the initial local OpenClaw default.
Replays the narrow default proposal from #12110, with Cestercian credited as co-author. The original remains open until this replacement lands.

Changes

  • Select the local default in the existing sandbox planning companion.
  • Apply it only to a new route-only reservation belonging to this onboarding session, without an existing recorded disclosure choice.
  • Preserve the existing fallback and all explicit requests.
  • Keep the configuration generator, native configuration ownership, runtime tool execution, MCP ownership, policy, and dependencies unchanged.

Verification

  • Focused CLI validation: 140 tests passed.
  • During implementation, broader sandbox-handler and related CLI validation: 49 files, 777 tests passed with file parallelism disabled. The parallel run encountered shared host-maintenance locks.
  • Existing OpenClaw configuration-generation suite: 6 tests passed.
  • CLI typechecking passed on commit 01337a2e8aef7b12a0d71631cbdc1840b133244d.
  • PR CI passed on this head. Ready-for-review qualification also passed AMD64/ARM64 image builds, non-root smoke, managed-image security, and port-contract checks.
  • Managed-image publication and qualification passed, including Docker and rootless Podman activation.
  • CodeRabbit reviewed all three files on this head with no actionable comments.
  • Do-no-harm is verified against exact base fcbbab088ad89dc78322b79d6b4e5ecceee8f1b0: the complete supported E2E fanout selected 135 entries. On the PR, 120 passed and 15 failed. All 15 failures were reproduced on the base with the same cause and failed phase or preparation step. Both original dispatch receipts have empty jobs/targets selectors; retries retained the same source commits.
  • Evidence: PR E2E, attempt 2, base full fanout, attempt 2, and base GPU retry, attempt 3.
  • The local Ollama/config-export checks, vLLM storage check, six MCP checks, and both credential-generation checks passed on both sources. GPU runtime qualification remains incomplete because of the shared preparation failure; earlier runs also encountered disk exhaustion.
Inherited failure Entries Matching failed phase or step
NVIDIA HTTP 401: Pi and OpenClaw native switching 3 Pi phase 2; OpenClaw phase 3
Hermes native route model assertion 2 Phase 2
OpenClaw Anthropic route spacing / legacy Podman Dockerfile rejection 2 Docker phase 9; Podman phase 3
Hermes Slack rendered credential assertion 2 Phase 4
Podman native-home cleanup permissions: DCode deferred/cloud, OpenClaw lifecycle/scope approval 4 Phases 4, 10, 6, and 6 respectively
Podman sibling sandbox identity selection and retained recovery 1 Phases 5 and 9
Cached GPU base image rejected by source/run/platform validation 1 Resolve digest-pinned amd64 runtime base images
  • No secrets, API keys, or credentials are included.

Review notes

Self-review covered the onboarding default, explicit-choice preservation, established registry state, and unrelated agent/provider behavior. Automated review and CI passed on the current head. No live Gemma result is claimed. This change does not add runtime fallback or new E2E assertions.

Public-guide updates may follow the repository's Author Post-Merge Catch-Up workflow.


Co-authored-by: Cestercian [email protected]
Signed-off-by: Aaron Erickson [email protected]

Use direct tools for a fresh managed OpenClaw sandbox on Ollama or vLLM.
Preserve explicit requests, established registry state, other agents,
cloud routes, and llama.cpp. Reuse the existing route reservation
classification and session checks.

Refs #12106
Replays the narrow default fix from #12110.

Co-authored-by: Cestercian <[email protected]>
Signed-off-by: Aaron Erickson <[email protected]>
@copy-pr-bot

copy-pr-bot Bot commented Oct 10, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/NemoClaw/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 7d38f982-aa4d-4396-8c65-7aa045b6137c




📥 Commits

Reviewing files that changed from the base of the PR and between fcbbab0 and 01337a2.





📒 Files selected for processing (3)
  • src/lib/onboard/machine/handlers/sandbox-resume.ts
  • src/lib/onboard/machine/handlers/sandbox-tool-disclosure.test.ts
  • src/lib/onboard/machine/handlers/sandbox.ts




Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.






📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

The sandbox create flow now derives initial OpenClaw tool disclosure for eligible fresh local-provider sessions with a matching pending route-only reservation. Tests cover provider and agent defaults, explicit environment settings, registered state, and sandbox removal behavior.

Changes

Sandbox tool disclosure

Layer / File(s) Summary
Resolve initial disclosure for eligible sessions
src/lib/onboard/machine/handlers/sandbox-resume.ts
A new helper resolves the environment-requested disclosure or defaults to direct when the specified fresh-session, OpenClaw, local-provider, reservation, session, and metadata conditions hold.
Apply disclosure during sandbox creation
src/lib/onboard/machine/handlers/sandbox.ts, src/lib/onboard/machine/handlers/sandbox-tool-disclosure.test.ts
The create-intent builder reuses the registered sandbox entry and applies the helper result for eligible creates. Tests cover defaults, explicit settings, registered state, and sandbox removal behavior.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~15 minutes

Change: Bug fix

Suggested reviewers: senthilr-nv








Merge Risk: ⚪ Minimal · up to 01337

Explicit disclosure choices remain intact, and the reported issue does not prevent merging after normal checks.

Pre-merge checks | Passed 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: setting fresh local OpenClaw tool disclosure to direct.

✨ Finishing Touches 💡 1
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR





🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR




🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR





  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@ericksoa

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-code-quality

github-code-quality Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall line coverage in commit 01337a2 in the fix/12106-local-open... branch is 97%. The line coverage in commit 63002cd in the main branch is 96%.

Show a line coverage summary of the most impacted files.
File main 63002cd fix/12106-local-open... 01337a2 +/-
nemoclaw/src/onboard/config.ts 98% 96% -2%
nemoclaw/src/index.ts 94% 93% -1%
nemoclaw/src/bl...print/runner.ts 95% 95% 0%
nemoclaw/src/bl...ime-identity.ts 97% 97% 0%
nemoclaw/src/bl...t-management.ts 100% 100% 0%
nemoclaw/src/co.../config-show.ts 100% 100% 0%
nemoclaw/src/commands/slash.ts 100% 100% 0%
nemoclaw/src/on...native-route.ts 0% 100% +100%

TypeScript / code-coverage/cli

The overall line coverage in commit 01337a2 in the fix/12106-local-open... branch is 86%. The line coverage in commit 63002cd in the main branch is 84%.

Show a line coverage summary of the most impacted files.
File main 63002cd fix/12106-local-open... 01337a2 +/-
src/lib/onboard.ts 62% 46% -16%
src/lib/onboard...rchestration.ts 41% 32% -9%
src/lib/state/sandbox.ts 92% 84% -8%
src/lib/actions...ess-recovery.ts 65% 78% +13%
src/lib/inferen...file/cleanup.ts 73% 88% +15%
src/lib/state/l...diness-lease.ts 66% 82% +16%
src/lib/inferen...ollama/proxy.ts 41% 61% +20%
src/lib/onboard.../application.ts 55% 84% +29%
src/lib/inferen...nvidia/index.ts 0% 85% +85%
src/lib/onboard...ternal-image.ts 0% 91% +91%

Updated October 10, 2026 15:32 UTC

@github-actions

Copy link
Copy Markdown
Contributor

PR Review Advisor finished for commit 01337a2. Include the Advisor findings in the complete PR feedback collection. Verify and group valid findings before repair.

Request review only when Require no Advisor blockers is green.

All previous runs

@ericksoa
ericksoa marked this pull request as ready for review October 10, 2026 20:01
@ericksoa
ericksoa merged commit 7409ce2 into main Oct 10, 2026
@ericksoa
ericksoa deleted the fix/12106-local-openclaw-tool-default branch October 10, 2026 20:18
@wscurran wscurran added area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow area: providers Inference provider integrations and provider behavior bug-fix PR fixes a bug or regression integration: openclaw OpenClaw integration behavior provider: ollama Ollama local model provider behavior provider: vllm vLLM local or hosted provider behavior labels Oct 13, 2026
ericksoa pushed a commit that referenced this pull request Oct 14, 2026
## Outcome

Fresh OpenClaw sandboxes created through the accepted Deferred N1x
Express Qwen preview default to progressive tool disclosure. The smaller
tool list leaves room for a reply in the 32,768-token local model.
Explicit disclosure requests and recorded sandbox choices keep their
existing precedence.

The branch also includes main's merged curl repair (#13158), so the
ARM64 local Dockerfile fallback can install matching curl/libcurl
packages. Its nine curl pins and Pi qualification receipts match main.

## Reason

#12968 made direct disclosure the default for fresh local Ollama and
vLLM routes in v0.0.133 to address the Gemma/Ollama tool-search failure
in #12106. On the N1x Qwen recipe, exposing all tools nearly fills the
context window and exposes OpenClaw's input-token estimate problem. A
fresh greeting can receive a one-token output allowance and produce no
usable reply.

This mitigation uses existing configuration. OpenClaw source, the model,
context window, and GPU memory settings remain unchanged.

The development branch's local build was also blocked because pinned
curl `deb13u5` requires the same libcurl revision, while APT selects
`deb13u7`. The branch now carries the merged `deb13u7` repair and its
qualification evidence.

### Related issues

Fix #13088
Refs #12106, #12968, #13158.

## Changes

- Select progressive disclosure for a fresh, session-owned reservation
on the accepted N1x vLLM/Qwen route with matching model metadata.
- Keep direct defaults for other local routes, including Gemma/Ollama.
Preserve explicit selections and recorded choices.
- Cover accepted and rejected routes, mismatched reservations, explicit
selections, and saved choices in the sandbox-handler tests.
- Merge main's qualified curl repair into the testing branch. These
image inputs already match main and add no separate image changes to the
PR diff.

## Verification

- [Manual N1x TUI
validation](#13173 (comment))
on checkout `b045e8569401f1da6e142d8c62254ceb5272bce2`: the tester sent
`Hellooo` and received `Hey. What's up?`, with approximately 11k/33k
context use (34%). A read-only check confirmed the host checkout and
three tool-disclosure source files match the PR.
- Focused Vitest run with `--project integration --project cli`: 243
tests across seven suites passed after the base merge. Selection:
`node-tar-dockerfile-contract`,
`bundled-npm-brace-expansion-dockerfile-contract`,
`bundled-npm-ip-address-dockerfile-contract`,
`sandbox-base-security-packages`, `native-security-packages`,
`sandbox-tool-disclosure`, and `sandbox-resume`.
- `docker buildx build --platform linux/arm64 --target npm12 --file
Dockerfile --load .` on N1x: passed with the original pinned Node base.
curl and libcurl both installed at `8.14.1-2+deb13u7`; npm's tar,
brace-expansion, and ip-address remediation checks passed. The exercised
Dockerfile SHA-256 is
`d79d7c13530ac8b34e999811b9fd8a760690490eb81b2619add3177b896eed57`,
matching this branch.
- Five Dockerfile/security suites on ARM64: 159 tests passed before the
main merge added five curl-pin assertions.
- Hadolint for all five affected Dockerfiles, Oxfmt, normal commit
hooks, and `git diff --check`: passed.
- Isolated OpenClaw 2026.9.2 tests on base
`abf42f10a54617128c1464d33592164356660e43`: direct disclosure sent 49
tools/31,387 input tokens and failed with one output token. Progressive
sent 11 tools/10,652 first-call input tokens and answered a greeting.
Execution returned `391` for `17*23`; tool search, description, and
invocation completed a session-status request. These were embedded-agent
configuration tests, not fresh Express/TUI validation.
- The QA checkout's modified lockfile, tool-disclosure files, host
package inventory, and running vLLM container identity/start time
remained unchanged by the curl repair. The owned validation image tag
was removed.
- Installed pre-push publication validation and CLI typecheck: passed in
the credential-isolated boundary. GitHub verified all three
feature-branch commits.
- Reviewed diff contains no secrets, API keys, or credentials.

## Review notes

Self-review covers NVIDIA/NemoClaw commit
`b045e8569401f1da6e142d8c62254ceb5272bce2` and all three sensitive PR
paths under `src/lib/onboard/machine/handlers/`. The prior commit's nine
Advisor specialists completed in [run
38575577290](https://github.com/NVIDIA/NemoClaw/actions/runs/38575577290).
Seven reported clear results. The documentation finding is deferred to
post-merge docs catch-up under AGENTS.md; the guide and
command-reference changes must describe the fresh N1x exception and
explicit-selection precedence.

Advisor also raised a scope concern about the earlier #13088 closure.
That issue has since reopened for investigation. This PR preserves the
explicitly requested configuration mitigation and contains no upstream
monkeypatch. Independent maintainer review of the scope remains required
before merge; no approval or waiver is claimed.

The reported manual TUI greeting passed. A fresh Express onboarding run
tied to the final commit and longer-session/compaction behavior still
need hardware validation. The curl verification covers the `npm12`
stage; a complete local sandbox build remains untested. Existing
sandboxes keep their recorded disclosure mode.

---
Signed-off-by: San Dang <[email protected]>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Eligible N1x Qwen managed vLLM previews now use progressive tool
disclosure when preview intent is accepted. Explicitly selected
disclosure settings continue to take precedence, and other provider or
model combinations keep their existing behavior.
* **Bug Fixes**
* Recorded tool disclosure settings are preserved when resuming N1x Qwen
sandboxes.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: San Dang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow area: providers Inference provider integrations and provider behavior bug-fix PR fixes a bug or regression integration: openclaw OpenClaw integration behavior provider: ollama Ollama local model provider behavior provider: vllm vLLM local or hosted provider behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants