Skip to content

openclaw tui emits malformed tool calls on local Ollama (macOS) even when health checks and one-shot agent runs succeed #1211

@sangeetsu

Description

@sangeetsu

Description

On macOS with local Ollama, NemoClaw onboarding can complete successfully and the sandbox can be healthy, but openclaw tui can still fail in practice even when raw inference works.

In my case:

  • host-side Ollama worked
  • routed https://inference.local/v1/* worked inside the sandbox
  • openclaw health --json was healthy
  • one-shot openclaw agent --session-id ... --message ... --json worked
  • but openclaw tui produced malformed tool calls for simple prompts like hello test

Expected behavior:

  • openclaw tui should reply normally to simple text prompts or recover cleanly from a bad tool call

Actual behavior:

  • the TUI session emitted malformed tool calls such as memory_search and sessions_spawn
  • OpenClaw rejected them with schema validation errors
  • the model then fell back to nonsense text instead of giving a normal response

[https://github.com//issues/1193](possibly similar issue)

Reproduction Steps

  1. Install and start local Ollama on macOS.
  2. Set:
    • OLLAMA_HOST=0.0.0.0:11434
    • OLLAMA_CONTEXT_LENGTH=8192
  3. Pull llama3.1:8b.
  4. Run nemoclaw onboard with local Ollama and create a sandbox.
  5. Verify the sandbox is healthy with openclaw health --json.
  6. Verify one-shot agent calls work, for example:
    • openclaw agent --session-id smoke --message 'Reply with exactly: ok' --json --timeout 120
  7. Start the TUI:
    • openclaw tui
  8. Enter a trivial prompt such as:
    • hello test
  9. Observe that the session emits malformed tool calls instead of a normal reply.

Environment

  • OS: macOS 15.7.4
  • Hardware: Apple M1 Pro, 16 GB unified memory
  • Node.js: v22.22.2
  • Docker: Docker version 29.3.1, build c2be9cc
  • NemoClaw: nemoclaw v0.1.0
  • OpenClaw: 2026.3.11 (29dc654)
  • OpenShell: 0.0.19
  • Ollama: 0.19.0
  • Model: llama3.1:8b
  • Sandbox: terabox

Debug Output

I ran:


nemoclaw debug --output /tmp/nemoclaw-debug.tar.gz


Attach this file to the issue:

`/tmp/nemoclaw-debug.tar.gz`

Optional quick summary from `nemoclaw debug --quick`:

- OpenShell gateway connected
- sandbox `terabox` phase: `Ready`
- OpenShell version: `0.0.19`
- sandbox was reachable and healthy during collection

Logs

Relevant TUI session log file:

`/sandbox/.openclaw/agents/main/sessions/584909a8-6f4c-4e07-9b52-f189608e35db.jsonl`

Relevant behavior:

- line 5: user message `hello test`
- line 6: malformed `memory_search` tool call
- line 7: OpenClaw rejects it with schema validation failure
- line 8: fallback nonsense text
- line 10: later simple `hi` triggers another invalid tool call (`sessions_spawn`)

Example bad tool call shape:


{
  "name": "memory_search",
  "arguments": {
    "function": "memory_search",
    "parameters": {
      "query": "hello"
    }
  }
}

Checklist

  • I confirmed this bug is reproducible
  • I searched existing issues and this is not a duplicate

Metadata

Metadata

Labels

Local ModelsRunning NemoClaw with local modelsPlatform: macOSSupport for macOSbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions