Fix: Provider github copilot cannot create session#1849
Fix: Provider github copilot cannot create session#1849gaaralbakuu wants to merge 7 commits intosipeed:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses GitHub Copilot provider session creation failures by adding a permission request handler when creating the Copilot SDK session.
Changes:
- Configure Copilot session creation to auto-handle permission requests via
OnPermissionRequest.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| session, err := client.CreateSession(context.Background(), &copilot.SessionConfig{ | ||
| Model: model, | ||
| OnPermissionRequest: copilot.PermissionHandler.ApproveAll, | ||
| Hooks: &copilot.SessionHooks{}, | ||
| }) |
There was a problem hiding this comment.
OnPermissionRequest: copilot.PermissionHandler.ApproveAll will automatically grant any permission request coming from the Copilot CLI. That changes the provider’s security posture (potentially allowing filesystem/network/tooling access without user confirmation) and can be surprising as a default. Consider making auto-approval explicitly opt-in via config/env (default deny/prompt), or scope the handler to only approve the specific permission(s) needed to create a session and reject everything else (ideally with logging).
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📝 Description
🗣️ Type of Change
🤖 AI Code Generation
🔗 Related Issue
📚 Technical Context (Skip for Docs)
🧪 Test Environment
📸 Evidence (Optional)
Click to view Logs/Screenshots
☑️ Checklist