Skip to content

Endless loop for <tool_call> <function=complete_goal> #4864

Description

@Asem-D

Bug Description

complete_goal keeps erroring because the gateway is parsing the recap parameter as a bare string instead of a JSON object. This is likely a nanobot gateway bug introduced in a recent update where the tool parameter serialization changed.

What's happening: The tool expects JSON object parameters like {"recap": "text"} but the gateway is sending just "text" as a string. That's why it says "got str".

The tool keeps firing automatically each turn because the goal is still registered as active, and I can't close it due to the platform bug. But the work itself is finished.

Steps to Reproduce

  • update to nanobot-ai-0.2.2
  • use <tool_call> <function=complete_goal>

Expected Behavior

Complete the task. but it keps repeating

Relevant Logs

nanobot Version

0.2.2

Python Version

3.11

Operating System

Windows

Channel / Platform

Telegram

LLM Provider

OpenRouter

Configuration (Optional)

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions