Bug Description
Bug: Agent Calls python_execute Without Required Arguments for Simple Queries
Bug Description
When asking simple factual questions (e.g., "where is Boston"), the Manus agent attempts to call the python_execute tool without providing the required code parameter, resulting in a TypeError.
Steps to Reproduce
- Run:
python main.py
- Input:
where is Boston
- Observe: TypeError about missing required argument 'code'
Expected Behavior
For simple questions that don't require tool use, the agent should answer directly without invoking tools. If tools are invoked, all required parameters should be provided.
Actual Behavior
TypeError: PythonExecute.execute() missing 1 required positional argument: 'code'
Root Cause
- System prompt is too broad, encouraging unnecessary tool use
- LLM (Claude via OpenRouter) doesn't validate required parameters before generating tool calls
- Missing error handling for incomplete tool calls
Environment
- System: macOS Monterey
- Python: 3.12
- OpenManus: main v0.3.0-148-g52a13f2
Suggested Solutions
- Improve system prompt to guide against unnecessary tool use
- Add validation for required tool parameters before execution
- Provide clearer error messages when tools are called incorrectly
Bug solved method
Unresolved - Investigation details provided below
Environment information
- System version: macOS
- Python version: 3.12
- OpenManus version or branch:
- Installation method (e.g.,
pip install -r requirements.txt or pip install -e .): pip install -r requirements.txt
Extra information
No response
Bug Description
Bug: Agent Calls python_execute Without Required Arguments for Simple Queries
Bug Description
When asking simple factual questions (e.g., "where is Boston"), the Manus agent attempts to call the
python_executetool without providing the requiredcodeparameter, resulting in a TypeError.Steps to Reproduce
python main.pywhere is BostonExpected Behavior
For simple questions that don't require tool use, the agent should answer directly without invoking tools. If tools are invoked, all required parameters should be provided.
Actual Behavior
TypeError: PythonExecute.execute() missing 1 required positional argument: 'code'
Root Cause
Environment
Suggested Solutions
Bug solved method
Unresolved - Investigation details provided below
Environment information
pip install -r requirements.txtorpip install -e .): pip install -r requirements.txtExtra information
No response