Skip to content

Commit 270db55

Browse files
chore: add tracing context note for parallel executor submissions
Agent-Logs-Url: https://github.com/MervinPraison/PraisonAI/sessions/67d22169-f2e6-4727-9804-065fd54f9f78 Co-authored-by: MervinPraison <454862+MervinPraison@users.noreply.github.com>
1 parent 86f7c53 commit 270db55

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/praisonai-agents/praisonaiagents/tools/call_executor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ def _execute_single_tool(tool_call: ToolCall) -> ToolResult:
167167
with concurrent.futures.ThreadPoolExecutor(max_workers=self.max_workers) as executor:
168168
# Submit all tool calls
169169
future_to_index = {
170+
# Preserve contextvars (tracing/session context) across worker threads.
170171
executor.submit(copy_context_to_callable(_execute_single_tool), tool_call): i
171172
for i, tool_call in enumerate(tool_calls)
172173
}

0 commit comments

Comments
 (0)