Skip to content

Tool-call regression — agents return prose ('I will search…') instead of emitting tool calls #80150

Closed as not planned

Description

@jpazvd

Upstream issue draft — OpenClaw

Repo: https://github.com/openclaw/openclaw/issues/new
Title: Tool-call regression — agents return prose ("I will search…") instead of emitting tool calls

Summary

Across all locally-served LLMs in our deployment, agents respond to prompts that should trigger tool invocation by describing what they would do rather than actually calling the tool. The pattern is consistent enough that it appears to be a gateway-level tool-advertisement bug, not a per-model behavior difference.

Empirically: prompts like "Search the web for X and tell me what you find" (action_now in our bench) routinely produce replies starting with "I'll search for X…", "Let me look up Y…", or "I would need to call the search tool to find Z…" — but no tool call is emitted, and the user gets only the announcement, not the result.

Symptom

[bench] prompt action_now → reply
> I'll search the web for what's new in OpenClaw in May 2026 and report back
> with concrete findings. Let me check the official release notes…

[no tool call recorded; turn ends]

This pattern is reproduced across:

  • qwen2.5:14b (default)
  • qwen3-fast:30b (MoE)
  • qwen3-think:30b (chain-of-thought)
  • qwen2.5:14b-instruct-q5_K_M / q8_0 (quantization variants)

The persona files (SOUL.md, AGENTS.md) all contain "action over explanation" rules with concrete examples of the desired shape. The rules have been validated to flip behavior in 1–2 iterations on qwen2.5:14b for some tools (Tier 1 #6 delegate_data_task shipped 2026-05-08 at 100% on the configured model). But for native-tool calls (web_search, exec, read), the regression persists.

Hypothesis

The gateway tool-advertisement layer may not be advertising the available tool set to the model in a way that triggers the model's tool-calling behavior. Things to verify:

  1. Does the system prompt actually list the available tools for the agent?
  2. Is the model instructed (in OpenClaw's framing) that tools are available to call, not just describable?
  3. For models with native tool-calling format (Qwen 2.5 family supports OpenAI-style function calls), is the gateway sending the tool schemas in the right format?

Reproduction

openclaw agent --agent main --session-id $(uuidgen) \
  --message 'Search the web for what is new in OpenClaw in May 2026 and tell me what you find. Reply with concrete findings — URLs, dates, version numbers.' \
  --json --timeout 300

Expected: agent emits a web_search tool call, gateway resolves it, model summarizes results.
Actual: agent's reply is prose announcing what it would do, no tool call recorded in the gateway turn log.

What this blocks

This is the single largest UX bug in the deployment. Until it ships:

Environment

  • openclaw 2026.5.2 (8b2a6e5)
  • macOS 25.4.0 (Darwin 25.4.0) / arm64 / Mac Mini M4 Pro 64 GB
  • Models tested: qwen2.5:14b (Q4 default), qwen3-fast:30b, qwen3-think:30b, qwen2.5:14b-q5_K_M, qwen2.5:14b-q8_0

Related

Pairs with openclaw-mcp-runtime-disposed.md (this repo, separate issue draft) — together these two issues account for the bulk of locally-tracked Tier 0 work in docs/18-chatbot-improvement-plan.md. Tracked there as Tier 0 #7.

What I'd expect

For prompts that should invoke a tool, the gateway turn log shows a tool_call event followed by a tool_result event followed by the model's final reply that incorporates the tool result.

Workaround in place

None local. We've tuned persona text exhaustively (concrete examples, verbatim failing-phrase callouts, "do not announce; just call the tool" rules) and the regression persists. The pattern survives across model classes, which is what convinces me this is a gateway-side advertisement issue rather than a model-personality issue.

Activity

  1. clawsweeper commented on May 10, 2026

    @clawsweeper
    Contributor

    Thanks for the context here. I swept through the related work, and this is now duplicate or superseded.

    Close as a duplicate of the older open canonical tool-call boundary thread; the remaining work is already tracked there, while current main already sends tool schemas and documents the scoped forced-tool workaround for stricter local backends.

    So I’m closing this here and keeping the remaining discussion on the canonical linked item.

    Review details

    Best possible solution:

    Keep the remaining strict tool-call boundary, scoped forced-tool retry policy, and provider exceptions on #45049, with this report preserved there as fresh Qwen/local-model evidence.

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

    Yes, at source level: current main executes provider-emitted structured tool calls, but assistant text without structured tool_calls is logged or delivered as text. I did not live-run the reporter's exact Qwen command.

    Is this the best way to solve the issue?

    Yes. Closing this as a duplicate is the best cleanup path because the older open canonical issue already owns the strict protocol and forced-tool policy work, while the narrower Qwen/vLLM workaround is documented.

    Security review:

    Security review: No patch is under review; any security-sensitive tool-boundary policy work remains on the canonical issue.

    What I checked:

    Likely related people:

    • steipete: Authored the fake-local-tool-call diagnostics, documented the required-tool-choice workaround, and recently touched OpenAI-compatible stream behavior on the affected request/parse path. (role: recent area contributor; confidence: high; commits: f9181835e870, 1ee885123ffb, 2fb99143a47d; files: src/agents/pi-embedded-subscribe.tool-text-diagnostics.ts, src/agents/pi-embedded-subscribe.handlers.messages.ts, src/agents/openai-transport-stream.ts)
    • openperf: Recent native Ollama stream work touched the same local /api/chat path that sends tool schemas and parses returned tool_calls. (role: adjacent Ollama runtime contributor; confidence: medium; commits: c1b9af277071; files: extensions/ollama/src/stream.ts)
    • vincentkoc: Recent local-model documentation work restructured stricter-backend troubleshooting and routing guidance around local model setup. (role: adjacent local-model docs contributor; confidence: medium; commits: 624eaf5d4a79; files: docs/gateway/local-models.md)

    Codex review notes: model gpt-5.5, reasoning high; reviewed against bcd1e4235036.

  2. locked as resolved and limited conversation to collaborators on May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions