Solution skill
[BUG] Regression in CrewAI 1.9.3: custom BaseTool wrapper around BedrockKBRetrieverTool gets called without args (_run()
Complete solution
Shows how to fix [BUG] Regression in CrewAI 1.9.3: custom BaseTool wrapper around BedrockKBRetrieverTool gets called without args (_run(). Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
The tool call fails with: • ParsedBedrockKBRetrieverTool._run() missing 1 required positional argument: 'query' …and the agent repeatedly attempts to use the tool, effectively entering an infinite tool-calling loop.
Steps
- Reporter abdullahshahin's drive-by diagnosis: the tool-call args extraction fails before run is reached, so query arrives as {} and the agent retries forever (watch for the toolusagefinished-closing-flowstarted pairing warning as the signal). If the wrapper subclasses BaseTool and overrides init, argsschema can be shadowed by Pydantic field resolution in 1.9.x - declaring argsschema on the subclass and re-passing it via super().init(args_schema=KBQueryInput) restores arg parsing.
When to use
You are seeing this: Issue crewAIInc/crewAI#4495 (closed, 30 comments): ### Description After upgrading CrewAI from 1.6.1 → 1.9.3, a custom tool wrapper around BedrockKBRetrieverTool no longer receives its required query argument. Use this skill when you run into "[BUG] Regression in CrewAI 1.9.3: custom BaseTool wrapper around BedrockKBRetrieverTool gets called without args (_run()".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: 1.6.1, 1.9.3. If you are on something much newer or older, the details may have shifted.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
In gh:crewAIInc/crewAI#4495 (https://github.com/crewAIInc/crewAI/issues/4495), someone reported: Issue crewAIInc/crewAI#4495 (closed, 30 comments): ### Description After upgrading CrewAI from 1.6.1 → 1.9.3, a custom tool wrapper around BedrockKBRetrieverTool no longer receives its required query argument. The tool call fails with: • ParsedBedrockKBRetrieverTool.run() missing 1 required positional argument: 'query' …and the agent repeatedly attempts to use the tool, effectively entering an infinite tool-calling loop. In crewai==1.6.1, the same code and workflow work as expected. The logs also show an events mismatch warning during the loop: [CrewAIEventsBus] Warning: Event pairing mismatch. 'toolusagefinished' closed 'flowstarted' (ex The verified resolution from the thread: Reporter abdullahshahin's drive-by diagnosis: the tool-call args extraction fails before run is reached, so query arrives as {} and the agent retries forever (watch for the toolusagefinished-closing-flowstarted pairing warning as the signal). If the wrapper subclasses BaseTool and overrides init, argsschema can be shadowed by Pydantic field resolution in 1.9.x - declaring argsschema on the subclass and re-passing it via super().init(args_schema=KBQueryInput) restores arg parsing.
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_tPa7balrss4vv9v0ah68LQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">[BUG] Regression in CrewAI 1.9.3: custom BaseTool wrapper around BedrockKBRetrieverTool gets called without args (_run() <span>— Vectle</span></a>