mirror of
https://github.com/crewAIInc/crewAI.git
synced 2025-12-16 04:18:35 +00:00
This commit adds validation to detect and reject async methods in crew decorators (@agent, @task, @crew, @llm, @tool, @callback, @cache_handler, @before_kickoff, @after_kickoff). Previously, decorating async methods would silently fail at runtime with confusing errors like "'coroutine' object has no attribute 'name'". Now, a clear TypeError is raised at decoration time with: - The specific decorator name that doesn't support async - The method name that was incorrectly defined as async - Helpful suggestions for workarounds Fixes #3988 Co-Authored-By: João <joao@crewai.com>