agent-zero icon indicating copy to clipboard operation
agent-zero copied to clipboard

A0: Message misformat, no valid tool request found.

Open CODEBREAKER128 opened this issue 6 months ago • 4 comments

can you do something about this its such an annoying error even when using openrouter api the agent cant figure out how to format it correctly

CODEBREAKER128 avatar May 11 '26 18:05 CODEBREAKER128

I usually ask politely agent0 to check from Agent0ai Github repo how to call correctly tools (not to forget tool name) Possibly also enforsing it with behaviour change, mostly this happpens to me if I use chat models that are not trained to use tools.

jisokuor avatar May 19 '26 10:05 jisokuor

this bug right here is truly driving me crazy currently... happens non stop with Minimax M2.5 which does have a JSON mode

IconicFinesse avatar May 25 '26 11:05 IconicFinesse

same here: Claude Opus 4.8 (via AWS BedRock) hitting the same error many times during operations.

i.e. HITL calls plugin scan from the plugin marketplace A0 -> reads the repo to list files GEN - "12 files, small plugin. Let me read all of them. Start with plugin.yaml, README, default_config.yaml. I'll dump the key metadata/config files first." WRN - A0: Message misformat, no valid tool request found.

(second attempt) GEN - I got a formatting warning. The previous turn accidentally echoed the tool result before my JSON. I need to emit a single clean JSON object now. Metadata clean. Now read all code files verbatim with line numbers. WRN - Agent stopped after 2 consecutive unusable model responses to prevent further API charges. Send a new message to try again.

(final result) Plugin scan aborted.

th3f001 avatar Aug 08 '26 10:08 th3f001

Thank you for reporting this. Agent Zero now bundles the Context Doctor plugin, which repairs malformed model replies before normal tool processing.

Context Doctor will ship later this week in Agent Zero v2.11 and will be available to everyone through self-update. For older A0 versions, install it from the Plugin Hub: click the puzzle piece icon in the sidebar, select Browse at the top of the modal, then search for "Context Doctor."

I am closing this as addressed. If it persists with Context Doctor enabled, please open a fresh report with the model, provider, and logs. Thank you!

3clyp50 avatar Aug 25 '26 23:08 3clyp50