high severityDelegateWorkTool (crewAI)

Tool usage fails during hierarchical delegation: "Arguments validation failed: 2 validation errors for DelegateWorkToolSchema\ntask\n Input should be a valid string [type=string_type, input_value={'description': '...', 'type': 'str'}, input_type=dict]\ncontext\n Input should be a valid string [type=string_type, input_value={'description': '...', 'type': 'str'}, input_type=dict]"

Root cause

CrewAI's DelegateWorkToolSchema expects string inputs for 'task' and 'context', but LLMs generate dicts like {'description': '...', 'type': 'str'} influenced by tool schema descriptions in prompts. Validation via Pydantic fails with TypeError.

CrewAITypeErrorpydanticvalidationDelegateWorkToolhierarchicaltool-parsing

Citations