Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
fix: set task name earlier for logging (#8333)
cthomas485fe9d1b2db
diff --git a/letta/utils.py b/letta/utils.pyindex 6b77b5fc0..f360d8f3a 100644--- a/letta/utils.py+++ b/letta/utils.py@@ -1445,11 +1445,12 @@ async def bounded_gather(coros: list[Coroutine], max_concurrency: int = 10) -> lsemaphore = asyncio.Semaphore(max_concurrency)async def bounded_coro(index: int, coro: Coroutine, coro_name: str):+ # Set task name for diagnostics before acquiring semaphore+ task = asyncio.current_task()+ if task:+ task.set_name(f"bounded[{coro_name}]")+async with semaphore:- # Set task name for diagnostics- task = asyncio.current_task()- if task:- task.set_name(f"bounded[{coro_name}]")result = await cororeturn (index, result)