Conversation
… race condition Add an asyncio.Lock around create_session calls in CopilotProvider so that concurrent for-each agents don't hit the SDK race where a permission.request arrives for a session not yet registered in _sessions. Sessions still run in parallel — only creation is serialized. Closes #29 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jrob5756
pushed a commit
that referenced
this pull request
Mar 9, 2026
The permission-denied errors in for-each groups are caused by a regression in github-copilot-sdk 0.1.32, not the create_session race condition we diagnosed in #27. Evidence: SDK 0.1.30 (Mar 7) had zero permission denials; SDK 0.1.32 (Mar 8–9) fails consistently. - Pin github-copilot-sdk to <0.1.32 until the regression is fixed - Revert the _session_create_lock serialization from #30 since it addressed the wrong root cause Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3 tasks
jrob5756
added a commit
that referenced
this pull request
Mar 9, 2026
* fix(copilot): pin SDK <0.1.32 and revert session serialization The permission-denied errors in for-each groups are caused by a regression in github-copilot-sdk 0.1.32, not the create_session race condition we diagnosed in #27. Evidence: SDK 0.1.30 (Mar 7) had zero permission denials; SDK 0.1.32 (Mar 8–9) fails consistently. - Pin github-copilot-sdk to <0.1.32 until the regression is fixed - Revert the _session_create_lock serialization from #30 since it addressed the wrong root cause Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(deps): tighten SDK pin to <0.1.31 SDK 0.1.31 also has the permission-denied regression (confirmed in news repo run 22863258830). The last known good version is 0.1.30. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Jason Robert <jasonrobert@microsoft.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
asyncio.Lockaroundcreate_sessioninCopilotProviderto serialize concurrent session creation, preventing the SDK race condition wherepermission.requestarrives for a not-yet-registered sessionCloses #29
Related: #27
Test plan
TestSessionCreateLockverify lock existence and serialization behavior🤖 Generated with Claude Code