Skip to content

[NemoClaw][macOS][CLI&UX] OpenClaw chat UI shows ✓ Completed on tool calls that returned error / "Tool not found" #2621

Description

@caroline-xuan

Description

Issue Summary

In the OpenClaw chat Web UI (http://127.0.0.1:18789/chat), tool-call cards display a green ✓ Completed / View ✓ status in the card header even when the underlying tool invocation actually failed.

Two confirmed sub-cases:

  1. web_search returns error JSON → card header still shows Completed ✓:
    { "error": "missing_brave_api_key", ... }
  2. Unknown tool dispatch returns "Tool not found" → card body literally shows the words "Tool not found" but the inner Unknown sub-card still shows View ✓

This misleads both the user (who thinks the tool succeeded) and likely the agent itself (which keeps retrying or making decisions based on a "successful" tool result that actually contained an error payload).

Environment

  • Platform: macOS
  • NemoClaw: latest local install (verified 2026-04-28)
  • OpenShell: bundled with the install
  • Model: moonshotai/kimi-k2.5 (NVIDIA Endpoints variant)
  • Surface: OpenClaw Web UI dashboard at 127.0.0.1:18789/chat?session=

Steps to Reproduce

Sub-case 1 — web_search without BRAVE_API_KEY:

  1. Run nemoclaw onboard on macOS, do NOT configure BRAVE_API_KEY when offered.
  2. Open the printed dashboard URL in a browser.
  3. Send a prompt that triggers web_search, e.g.:
    Search the web for the current Python stable version, summarize in 3 bullet points, then run python3 --version in the sandbox shell, and tell me whether the two
      match.
  4. Observe the Web Search tool card.

Sub-case 2 — Unknown / not-found tool dispatch:

  1. Same setup as Sub-case 1. After web_search fails once, the agent retries with various tool names that come back as Tool not found.
  2. Observe the resulting Tool output cards.

Expected Behavior

  • Tool cards whose output is an error JSON should show ✗ / Failed / Error in the header (color and icon distinct from success).
  • Tool cards whose body literally says "Tool not found" should never show ✓ in either the header or the inner sub-card.
  • Header status must reflect the actual tool result, not just "the tool returned a response".

Actual Behavior

Web Search card:

  • Header: ✓ Completed
  • Body:
    { "error": "missing_brave_api_key", "message": ..., "docs": ..., "provider": ... }

Unknown tool card:

  • Header: ✓ View ✓
  • Body: Tool not found

Both cases reproduce deterministically across multiple sessions (verified in session=main, session=ns3retry1, session=agent:main:ns3retry2).

Impact

  • User cannot trust the tool-status indicator at all; the green ✓ becomes meaningless.
  • Compounds downstream debugging: when the agent then loops or stalls (see related agent-side bugs), the user has no way to see from the UI that the tools actually failed.

Suggested Fix Direction

  • In the gateway tool-result rendering path, parse the tool output: if the parsed JSON contains an error field at top level, OR if the body equals "Tool not found", render the card with a failed/error status instead of ✓.
  • Add a UI test that asserts a tool returning an error JSON renders with non-✓ header.

Bug Details

Field Value
Priority Unprioritized
Action Dev - Open - To fix
Disposition Open issue
Module Machine Learning - NemoClaw
Keyword NemoClaw, NemoClaw_CLI&UX, NEMOCLAW_GH_SYNC_APPROVAL, NemoClaw-SWQA-VDR

[NVB#6122538]

Metadata

Metadata

Assignees

Labels

NV QABugs found by the NVIDIA QA Teamarea: cliCommand line interface, flags, terminal UX, or outputarea: uiWeb UI, terminal display, visual layout, or UX behaviorplatform: macosAffects macOS, including Apple Siliconv0.0.77Release target

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions