Skip to content

fix(openclaw): preserve progressive tools for N1x Qwen preview - #13173

Merged
ericksoa merged 3 commits into
mainfrom
fix/n1x-qwen-progressive-tools
Oct 14, 2026
Merged

ericksoa merged 3 commits into
mainfrom
fix/n1x-qwen-progressive-tools

Conversation

@sandl99

@sandl99 sandl99 commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

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 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. 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]

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.

@sandl99 sandl99 self-assigned this Oct 14, 2026
@copy-pr-bot

copy-pr-bot Bot commented Oct 14, 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 14, 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: 43c6731d-65d8-40d7-a78a-ec3fad0f3a3d
📥 Commits

Reviewing files that changed from the base of the PR and between f4de239 and b045e85.

📒 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

The sandbox onboarding flow now selects an initial tool-disclosure mode using the requested model and deferred N1x managed-vLLM preview intent. Explicit disclosure requests retain precedence. Tests cover selection conditions and preservation of recorded modes.

Changes: N1x tool disclosure

Layer / File(s) Summary
Initial disclosure mode selection
src/lib/onboard/machine/handlers/sandbox-resume.ts
The selector accepts the requested model and optional deferred preview intent. For eligible fresh OpenClaw local reservations, it selects progressive only when the intent is true, the provider and model match the managed N1x vLLM recipe, and the entry model matches the requested model. Explicit disclosure requests take precedence; other eligible reservations default to direct.
Sandbox creation wiring and coverage
src/lib/onboard/machine/handlers/sandbox.ts, src/lib/onboard/machine/handlers/sandbox-tool-disclosure.test.ts
Sandbox creation passes the requested model and deferred preview intent to the selector. Tests cover preview acceptance, mismatches, explicit requests, sandbox creation, and preservation of recorded disclosure modes.

Priority: ➖ Normal

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

Change: Bug fix

Merge Risk: ⚪ Minimal · up to b045e

The disclosure-mode selection and recorded-mode handling have no identified merge-blocking issue; merge after normal checks.

Pre-merge checks: Passed 5
Passed 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: preserving progressive tool disclosure for the N1x Qwen preview route.
✨ Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • 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.

@github-code-quality

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

Copy link
Copy Markdown
Contributor

Code coverage overview

Languages: TypeScript

TypeScript / code-coverage/plugin

main 63002cd fix/n1x-qwen-progres... b045e85 +/-
96% 97% +1%
View coverage of the 8 most impacted files.
File main 63002cd fix/n1x-qwen-progres... b045e85 +/-
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

main 63002cd fix/n1x-qwen-progres... b045e85 +/-
84% 86% +2%
View coverage of the 10 most impacted files.
File main 63002cd fix/n1x-qwen-progres... b045e85 +/-
src/lib/onboard.ts 62% 47% -15%
src/lib/actions...ess-recovery.ts 65% 78% +13%
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/domain/...y/dimensions.ts 0% 71% +71%
src/lib/actions...ry/operation.ts 0% 76% +76%
src/lib/actions...try/snapshot.ts 0% 78% +78%
src/lib/inferen...ovider/index.ts 0% 88% +88%
src/lib/onboard...ternal-image.ts 0% 91% +91%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated October 14, 2026 16:35 UTC

@sandl99
sandl99 requested a review from ericksoa October 14, 2026 16:36
@sandl99

sandl99 commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator Author

Manual N1x TUI validation — passed

Tested checkout: b045e8569401f1da6e142d8c62254ceb5272bce2 on fix/n1x-qwen-progressive-tools.

The tester reported the following result on the ARM64 N1x host with model nvidia/Qwen3.6-35B-A3B-NVFP4:

openclaw tui - ws://127.0.0.1:18789 - agent main - session main
session agent:main:main

User: Hellooo
Assistant: Hey. What's up?

connected | idle
agent main | session main | nvidia/Qwen3.6-35B-A3B-NVFP4
 tokens 11k/33k (34%)

The TUI returned a visible answer to the basic greeting. The earlier reproduction failed with “Agent couldn't generate a response” at approximately 32k/33k context use (99%). This run used approximately 11k/33k (34%).

A read-only check confirmed that the host checkout is clean at the commit above and its three tool-disclosure source files match the published PR commit.

This is user-reported manual evidence for the basic TUI turn. Automated E2E, longer-session compaction, and an upstream estimator repair are separate validation claims.

@sandl99
sandl99 marked this pull request as ready for review October 14, 2026 16:37
@github-actions

Copy link
Copy Markdown
Contributor

PR Review Advisor finished for commit b045e85. 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

@sandl99

sandl99 commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator Author

Focused E2E validation — passed

E2E PR #13173 — run 38601717329, attempt 1 completed successfully. All eight selected test jobs and the Relevant E2E aggregate passed.

Tested commit: b045e8569401f1da6e142d8c62254ceb5272bce2.
The trusted dispatch receipt binds this commit to PR #13173, base f4de239dc8802027cd66266e59fbc6ec2d24a985, and workflow 16cbbb3489553b143fd37c72b96329aa6445b564.

Docker scenario Evidence
Cloud onboarding Passed
OpenClaw repository install, onboarding, and hosted inference Passed
Deep Agents Code repository install, onboarding, and hosted inference Passed
Repair a missing sandbox and reject conflicting resume input Passed
Resume interrupted onboarding Passed
Hermes sandbox resume and forwards Passed
Gateway upgrade from v0.0.89, preserving a sandbox Passed
Gateway upgrade from v0.0.123, restoring registration and sandboxes Passed

The SDK package, matrix planning, and image-publication prerequisite jobs also passed. This evidence covers the selected Docker scenarios; full release qualification was not selected. The N1x local-model greeting has separate manual TUI evidence.

@sandl99
sandl99 requested a review from rsliter October 14, 2026 17:25

@ericksoa ericksoa left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed commit b045e8569401f1da6e142d8c62254ceb5272bce2 and the three-file PR diff. No correctness or security blocker found.

Scope decision: Accept. Aaron Erickson explicitly approved progressive disclosure for fresh, opted-in N1x Qwen preview sandboxes, preserving explicit and saved choices. This approves the configuration mitigation in this PR despite the earlier #13088 decision. NemoClaw retains ownership in the existing sandbox-create planner. Existing sandboxes retain their recorded mode; other local routes retain their defaults. This does not establish a repair of OpenClaw's upstream estimator or validate longer-session compaction.

Advisor disposition — run 38599358433:

  • Product scope: resolved by the explicit maintainer decision above.
  • Documentation: defer the guide, command/environment reference, and changelog updates to the post-merge documentation catch-up permitted by AGENTS.md. Describe the fresh N1x exception and explicit-selection precedence.
  • Verification: nonblocking coverage suggestion. The changed selection logic has accepted/rejected route, mismatched-model, explicit-choice, and recorded-choice tests. The unchanged consumer passes the selected mode through prepareSandboxToolDisclosure into both the startup profile and registration. Existing disclosure-flow and OpenClaw configuration tests cover that mechanism. A combined N1x creation assertion would add coverage, but the finding identifies no defect in this diff. Fresh Express hardware validation remains unproven.
  • The other six specialists reported no P0/P1 findings. The Advisor run remains failed; this review records the disposition rather than claiming a green Advisor result.

Evidence: Required PR checks pass; all three commits are GitHub Verified; CodeRabbit reviewed this commit with no actionable findings; there are no unresolved review threads. CI run 38585454758 and the eight selected Docker scenarios in run 38601717329 passed. The reported N1x TUI greeting succeeded at this commit. The selected scenarios are not the complete E2E fanout. No new local test run is claimed.

Security review: All nine categories pass for this diff.

  • Secrets and credentials: no credential or logging change.
  • Input validation: exact provider/model matching and existing disclosure validation remain in place.
  • Authentication and authorization: the session-owned reservation and accepted-preview checks remain required.
  • Dependencies: no dependency or image change in the PR diff.
  • Error handling and logging: no changed failure or logging path.
  • Cryptography and data protection: no changed cryptographic or data-protection mechanism.
  • Configuration: existing tool-disclosure modes are used; sandbox and network controls are unchanged.
  • Security testing: rejected routes and preserved choices are covered; no security assertion is removed.
  • System security: fresh-create guards and downstream registration authority remain in place.

Reviewed paths: sandbox-resume.ts, sandbox.ts, and sandbox-tool-disclosure.test.ts under src/lib/onboard/machine/handlers/, plus the disclosure consumer, reservation checks, and related tests.

Trusted repository approval checker: allPass: true, with all 65 current checks green, against observed main e7840acd43451ae79191854aacafdf9e206983ed. No contributor/approver overlap was detected.

@ericksoa
ericksoa merged commit 45a898e into main Oct 14, 2026
@ericksoa
ericksoa deleted the fix/n1x-qwen-progressive-tools branch October 14, 2026 17:43
@wscurran wscurran added area: providers Inference provider integrations and provider behavior area: skills Skills, agent behaviors, prompts, or skill packaging bug-fix PR fixes a bug or regression integration: openclaw OpenClaw integration behavior platform: n1x Affects N1X hardware or workflows provider: vllm vLLM local or hosted provider behavior labels Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: providers Inference provider integrations and provider behavior area: skills Skills, agent behaviors, prompts, or skill packaging bug-fix PR fixes a bug or regression integration: openclaw OpenClaw integration behavior platform: n1x Affects N1X hardware or workflows provider: vllm vLLM local or hosted provider behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[N1x Linux][Agent&Skills] Fresh OpenClaw TUI session cannot answer hi at 32K context

3 participants