Skip to content

fix(tool-search): preserve dotted target arguments - #119464

Merged
vincentkoc merged 1 commit into
openclaw:mainfrom
louria:main
Aug 5, 2026
Merged

vincentkoc merged 1 commit into
openclaw:mainfrom
louria:main

Conversation

@louria

@louria louria commented Aug 5, 2026 •

Copy link
Copy Markdown

Closes #119418

What Problem This Solves

Fixes an issue where users running Tool Search with providers that flatten nested tool arguments could enter repeated missing-parameter failures. GitHub Copilot Gemini emitted fields such as args.path and args.command, which reached the selected target tool with the prefix still attached instead of as path and command.

Why This Change Was Made

The shared Tool Search call decoder now normalizes non-empty args.* compatibility fields at the wrapper boundary. Canonical nested args values retain precedence, and the existing ordinary flattened-argument behavior remains unchanged.

User Impact

Tool Search calls from affected providers can execute the selected target tool instead of retrying until timeout. Correctly nested calls and existing flattened calls continue to behave as before.

Evidence

  • Reproduced before the fix with github-copilot/gemini-3.1-pro-preview: 172 tool calls followed by a 300-second timeout.
  • Live patched flow completed in 8-17 seconds with 2-3 tool calls, zero failures, and no provider fallback.
  • pnpm test src/agents/tool-search-runtime.test.ts: 45 tests passed.
  • pnpm exec oxfmt --check src/agents/tool-search-runtime.ts src/agents/tool-search-runtime.test.ts: passed.
  • pnpm exec oxlint src/agents/tool-search-runtime.ts src/agents/tool-search-runtime.test.ts: passed.

AI Assistance

  • This change was AI-assisted.
  • I reviewed and understand the implementation.
  • The focused regression suite was run on the exact submitted commit.

Punchcard-Session: clear-orchard-lantern-bc

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS labels Aug 5, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. labels Aug 5, 2026
@clawsweeper

clawsweeper Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 5, 2026, 2:39 AM ET / 06:39 UTC.

ClawSweeper review

What this changes

The PR converts top-level provider-emitted args.* fields into Tool Search target-tool input fields while preserving nested and ordinary flattened argument precedence.

Regression provenance

Possible regression — probable (reproduction; reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

No blocking findings. This remains a necessary, focused repair: current main passes dotted wrapper keys literally to target tools, while the PR normalizes them at the shared decode boundary and preserves established precedence.

Priority: P2
Reviewed head: f158ec514da872997e4615e8c669649a19abdbd2

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The live before-and-after evidence and focused decoder repair support normal merge review with no actionable defect found.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body supplies after-fix live provider behavior: 8–17 second completion with 2–3 calls, zero failures, and no fallback.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body supplies after-fix live provider behavior: 8–17 second completion with 2–3 calls, zero failures, and no fallback.
Evidence reviewed 6 items Current-main defect: Current main copies non-wrapper flattened keys verbatim, so a provider field named args.path remains that literal key instead of reaching the target as path.
Owning runtime boundary: The structured Tool Call control invokes the decoder immediately before calling the selected tool, so this is the canonical place to repair provider wrapper shape.
Patch precedence and coverage: The PR extracts non-empty dotted fields, lets nested input and ordinary flattened fields win duplicate keys, and adds focused conversion and precedence cases.
Findings None None.
Security None None.

How this fits together

Structured Tool Search receives a provider tool-call wrapper, resolves a catalog tool, and passes normalized input to it. Target-tool schema validation then rejects missing or unexpected fields before execution.

flowchart LR
  A[Provider wrapper payload] --> B[Tool Call control]
  B --> C[Argument decoder]
  C --> D[Catalog tool resolution]
  D --> E[Schema validation]
  E --> F[Target tool execution]
Loading

Before merge

  • Complete next step (P2) - The open PR already contains the narrow repair and no discrete automation follow-up is needed.
Agent review details

Security

None.

PR surface

Source +9, Tests +20. Total +29 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 12 3 +9
Tests 1 21 1 +20
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 33 4 +29

Review metrics

Metric Value Why it matters
Production vs test delta production +12/-3; tests +21/-1 The net production growth is justified by the single shared compatibility normalization; regression coverage adds dotted and precedence cases.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #119418
Summary: This PR is the concrete candidate repair for the issue’s documented dotted Tool Search arguments.

Members:

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

Technical review

Best possible solution:

Merge the exact-head decoder normalization after normal merge gating; it fixes the shared wrapper boundary without altering target-tool schemas, provider routing, or configuration.

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

Yes. Current main demonstrably retains args.path as a literal target input key, and the PR supplies the affected payload plus live before-and-after provider results.

Is this the best way to solve the issue?

Yes. Normalizing at the shared Tool Call decoder fixes the malformed wrapper once while preserving nested and ordinary flattened input behavior.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 702eb6eb5734.

Labels

Label justifications:

  • P2: Affected Tool Search calls can repeatedly fail rather than execute the selected tool, but the repair is bounded to one compatibility decoder.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body supplies after-fix live provider behavior: 8–17 second completion with 2–3 calls, zero failures, and no fallback.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies after-fix live provider behavior: 8–17 second completion with 2–3 calls, zero failures, and no fallback.

Evidence

What I checked:

  • Current-main defect: Current main copies non-wrapper flattened keys verbatim, so a provider field named args.path remains that literal key instead of reaching the target as path. (src/agents/tool-search-runtime.ts:257, 702eb6eb5734)
  • Owning runtime boundary: The structured Tool Call control invokes the decoder immediately before calling the selected tool, so this is the canonical place to repair provider wrapper shape. (src/agents/tool-search.ts:392, 702eb6eb5734)
  • Patch precedence and coverage: The PR extracts non-empty dotted fields, lets nested input and ordinary flattened fields win duplicate keys, and adds focused conversion and precedence cases. (src/agents/tool-search-runtime.ts:244, f158ec514da8)
  • Sibling-path check: Code Mode passes its JavaScript input object directly to the runtime and does not consume the structured Tool Call wrapper, so it is unaffected. (src/agents/code-mode-bridge.ts:419, 702eb6eb5734)
  • Current-main provenance: The adjacent current-main batch-query refactor extracted search-request parsing but left this decoder unchanged; the PR is still needed and GitHub reports it mergeable. (src/agents/tool-search-runtime.ts:214, 95d7d95515b5)
  • Shipped-version check: Latest release v2026.7.1-2 predates the runtime-file split and no tag contains the unmerged PR head; the fix is not already shipped. (src/agents/tool-search.ts, 0790d9f593ad)

Likely related people:

  • Jesse Merhi: Recent Tool Search work extracted adjacent request parsing while retaining this decoder path. (role: recent Tool Search contributor; confidence: medium; commits: 95d7d95515b5; files: src/agents/tool-search-runtime.ts, src/agents/tool-search.ts, src/agents/tool-search-request.ts)

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 (2 earlier review cycles)
  • reviewed 2026-08-05T04:05:45.210Z sha 73053c96de488e942f953f0deaa0a7660b481c7d :: needs maintainer review before merge. :: none
  • reviewed 2026-08-05T06:03:51.467Z sha f158ec5 :: needs maintainer review before merge. :: none

@louria

louria commented Aug 5, 2026

Copy link
Copy Markdown
Author

@clawsweeper re-review

Rebased onto current main at submission time. Exact head f158ec514da872997e4615e8c669649a19abdbd2 passes the focused 45-test Tool Search suite, oxfmt, and oxlint. The single upstream commit that landed afterward does not touch either changed file.

@clawsweeper

clawsweeper Bot commented Aug 5, 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 repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@vincentkoc vincentkoc self-assigned this Aug 5, 2026
@vincentkoc

Copy link
Copy Markdown
Member

ClawSweeper rank-up move disposition: satisfied; no separate automation action is required. The reviewed head f158ec5 already contains the narrow shared Tool Search decoder repair recommended by the review. ClawSweeper reports no findings, sufficient proof, and explicitly says no discrete automation follow-up is needed. The remaining work is the normal maintainer validation and landing gate, so no code change or follow-up issue is warranted.

@vincentkoc
vincentkoc merged commit 3faa2b0 into openclaw:main Aug 5, 2026
119 checks passed
@vincentkoc

Copy link
Copy Markdown
Member

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 5, 2026
Punchcard-Session: frost-brook-timber-mx

* origin/main:
  fix: cap local tsgo CPU usage (#119517)
  fix(tool-search): normalize dotted call arguments (#119418) (#119464)
  fix(qa): retain child output on CLI timeouts (#119524)
  fix(discord): preserve authored block order in presentation components (#119506)
  fix: make plugin verification restart guidance install-neutral (#119508)
  fix(qa): preserve profile execution contracts (#119519)
  test(qa): cover managed OTEL runtime paths (#118965)

Punchcard-Session: frost-brook-timber-mx
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 6, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 6, 2026
Punchcard-Session: frost-brook-timber-mx

* origin/main:
  fix: cap local tsgo CPU usage (openclaw#119517)
  fix(tool-search): normalize dotted call arguments (openclaw#119418) (openclaw#119464)
  fix(qa): retain child output on CLI timeouts (openclaw#119524)
  fix(discord): preserve authored block order in presentation components (openclaw#119506)
  fix: make plugin verification restart guidance install-neutral (openclaw#119508)
  fix(qa): preserve profile execution contracts (openclaw#119519)
  test(qa): cover managed OTEL runtime paths (openclaw#118965)

Punchcard-Session: frost-brook-timber-mx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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.

[Bug]: Tool Search drops GitHub Copilot Gemini args.* parameters

2 participants