mirror of
https://github.com/davidkaya/aryx.git
synced 2026-07-23 21:18:40 +02:00
Previously, CopilotAgentBundle.CreateAsync spawned a separate CopilotClient (and thus a separate Copilot CLI process) for each agent in a workflow. When multiple CLI processes started concurrently, their auto-login mechanisms could race on token refresh, causing subsequent agents to fail with 'Session was not created with authentication info or custom provider'. Share one CopilotClient across all agents in the bundle. Each agent still gets its own CopilotSession on the shared client. The bundle owns the client and disposes it after all agents. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>