Files
crewAI/lib
iris-clawd 6d496f799b fix: handle async get_agent in load_agent_from_repository (#6608)
* fix: handle async get_agent in load_agent_from_repository

The enterprise PlusClient.get_agent() is async, but
load_agent_from_repository() calls it synchronously. When the enterprise
client is hooked in, client.get_agent() returns a coroutine instead of a
response, causing "'coroutine' object has no attribute 'status_code'".

This adds an inspect.isawaitable() check after the call: if the response
is a coroutine, it is properly awaited via asyncio.run() (or via a
thread-pool executor if an event loop is already running).

Co-authored-by: Joe Moura <joao@crewai.com>

* fix: resolve mypy type-checker errors for async awaitable handling

* fix: remove unused type: ignore comment

---------

Co-authored-by: Joe Moura <joao@crewai.com>
2026-07-21 15:21:41 -03:00
..
2026-07-21 08:37:08 -03:00