Skip to content

fix: preserve complete Tool Search network pages - #201487

Merged
roboclaw-bot merged 2 commits into
mainfrom
openclaw/tool-search-output-194857
Nov 18, 2026
Merged

roboclaw-bot merged 2 commits into
mainfrom
openclaw/tool-search-output-194857

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #194857

What Problem This Solves

Reading a long web page or paged MCP document through Tool Search could stop at 20,000 characters even when the active model could accept more. A continuation cursor could survive while the end of its page was missing, silently skipping document lines.

User Impact

Network-backed Tool Search calls use the active model's existing tool-result budget, including external-content framing, sanitization expansion, and forwarded image context costs. No new setting or migration is required; tool-selection defaults, policy checks, and native harness behavior are unchanged.

If a complete execution result cannot fit, its payload is omitted instead of exposing a cursor for a partial page. Read-only callers are told to request a smaller page from the same starting position, and not to replay mutations just to recover output. Full programmatic details remain intact. Discovery still retains useful schema excerpts.

Why This Change Was Made

Reuse the existing model-aware budget rather than add another configuration limit. Shared rendering keeps Code Mode fitting and final delivery aligned; batch discovery rejects omitted trial renders rather than mistaking their short notice for delivered candidates.

The fixed 20,000-character policy is removed. Necessary growth is budget propagation, cursor-safe omission, and preservation of discovery excerpts: +75 net production lines, +152 net test lines, and +9 documentation lines against the task base.

Evidence

  • Both reported failures reproduced through actual dispatch_action execution in the Agent loop with its context guard: malformed partial pages on a 320k context and cursors for undelivered page tails on a 32k context. Both regressions failed before the repair.
  • 181 focused tests passed across eight files (59 seconds wall time including compiler preparation): gap-free 78-line retrieval, smaller-page recovery, mixed image/text pages, remote discovery batches, sanitization, retained details, Code Mode budgets, termination, and prefix stability.
  • Real-model end-to-end proof passed through an isolated admitted OpenClaw runner with gpt-5.4-mini: one search, two dispatched network pages, four assistant turns, and exact freshly generated markers from lines 47 and 78. The first page exceeded the old cap. Test time was 14.4 seconds (76 seconds wall); no live Gateway state was changed.
  • Full pnpm build passed in 180 seconds. Core and agents-tools test typechecks, targeted lint/format, and git diff --check passed.
  • Independent final review found no remaining substantive P0–P2 findings after the batch-admission and image-reservation repairs.
  • Exact-head CI passed for deada7dc25d490ad662a290d2def73cf6d131584; openclaw/ci-gate was verified successful on that head. Hosted ClawSweeper review was still running at the landing check and is advisory under the explicit maintainer land instruction.

Requested by @vincentkoc; reported by @lyrakat.

Work sessions

Linked for team reference; these sessions aren’t public.

Worked on by

roboclaw-bot and others added 2 commits November 18, 2026 22:21
Align network control output with the active model result budget, including wrapping and forwarded image context costs. Omit oversized execution payloads rather than exposing cursors for partially delivered pages; preserve discovery schema excerpts and shared Code Mode fitting.

Co-authored-by: vincentkoc <[email protected]>
Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: 19830a27-0ae7-4709-a145-b5d2865301c0
@clawsweeper

clawsweeper Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation agents Agent runtime and tooling size: M labels Nov 18, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review November 18, 2026 22:26
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 18, 2026
@roboclaw-bot
roboclaw-bot merged commit 852f25b into main Nov 18, 2026
204 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/tool-search-output-194857 branch November 18, 2026 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. docs Improvements or additions to documentation size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Tool Search: make the 20,000-character limit on dispatch_action results configurable

1 participant