Repository navigation
Feature Request: Extension API for Community Plugins #44
Description
Feature Request: Extension API for Copilot CLI
Summary
Add an Extension API to Copilot CLI that allows developers to build external tools/plugins using the public @github/copilot-sdk package, similar to VS Code's extension system.
Problem Statement
Current Architecture Constraints
- Copilot CLI bundles SDK internally - The SDK code is compiled into the CLI binary (
index.js), not consumed as external runtime dependency - Community innovation is blocked - Users cannot extend CLI functionality without modifying bundled code
- SDK updates don't reach CLI users immediately - Even if SDK gets new features, CLI requires rebuild/release cycle
- Competitive gap - Claude Code CLI and OpenAI Codex both have mature plugin ecosystems
Why This Matters
Developers want to:
- Add custom slash commands for their workflows
- Integrate with their existing tools (Jira, Linear, Notion, etc.)
- Preserve context during compaction events
- Track analytics and usage patterns
- Extend Copilot without waiting for official features
Currently, there is no supported way to do this.
Proposed Solution
Extension API Pattern (Like VS Code)
┌─────────────────────────────┐
│ Copilot CLI (bundled SDK) │
│ │
│ ┌─────────────────────┐ │
│ │ Extension Loader │ │ ← New component
│ └──────────┬──────────┘ │
└─────────────┼──────────────┘
│
↓
~/.copilot/extensions/
├─ logger/
│ ├─ package.json
│ └─ index.js (built with @github/copilot-sdk)
├─ memory-preservation/
└─ custom-integration/
How It Works
- CLI exposes hook points - Extension loader in CLI calls external extensions at lifecycle events
- Extensions built with public SDK - Developers use
@github/copilot-sdkto build tools - Dynamic loading - Extensions loaded from
~/.copilot/extensions/at runtime - No CLI rebuild needed - Community can ship extensions independently
Extension Interface
// Extension built with @github/copilot-sdk
export default {
name: "my-extension",
version: "1.0.0",
// Lifecycle hooks
async onSessionCreated(context) { },
async onBeforeSend(message, context) { },
async onSessionEvent(event, context) { },
async onSessionEnd(context) { },
// Slash commands
commands: {
"/mycommand": async (args, context) => { }
}
}Installation & Discovery
# Install extension
copilot extension install <name>
# Enable/disable
copilot extension enable <name>
copilot extension disable <name>
# List installed
copilot extension listExtension Marketplace (Future)
- GitHub could host official extension registry
- Community extensions vetted and signed
- Permission model (network access, file access, etc.)
- Similar to VS Code Marketplace
Benefits
For GitHub
✅ No architectural changes - Keep bundled SDK, add loader on top
✅ Proven pattern - VS Code extensions = billion-dollar ecosystem
✅ Community innovation - Users extend without GitHub engineering time
✅ Competitive parity - Match Claude Code and OpenAI Codex plugin systems
✅ SDK adoption - More developers use @github/copilot-sdk
✅ Feedback loop - See what features community builds → prioritize official features
For Developers
✅ Extend without forking - No need to hack CLI binary
✅ Use public SDK - Official, documented API
✅ Share with community - Publish extensions for others
✅ Independent updates - Don't wait for CLI release cycle
✅ Custom workflows - Build tools specific to your needs
For Ecosystem
✅ Plugin marketplace - Community-driven innovation
✅ Integration ecosystem - Connect Copilot to existing tools
✅ Learning resource - Extensions as educational examples
✅ Enterprise customization - Companies build internal extensions
Prior Art
This pattern is proven at massive scale:
- VS Code - 40,000+ extensions, cornerstone of product success
- Chrome - Browser extensions transformed web browsing
- Obsidian - Community plugins = 80% of product value
- Claude Code CLI - Plugin system with marketplace
- OpenAI Codex CLI - Extensible via config and plugins
Proof of Concept
We've already built a working implementation:
-
SDK Plugin System PR - github/copilot-sdk#42
- Plugin interface with 8 lifecycle hooks
- Slash command system
- 4 built-in plugins
- 33 comprehensive tests (100% pass rate)
-
Plugin System Repository - barrersoftware/copilot-plugin-system-js
- Standalone plugin system using SDK
- Dynamic loading from filesystem
- Plugin registry integration
-
Plugin Registry - barrersoftware/copilot-plugins-registry
- 4 real plugins solving real problems
- Demonstrates community demand
The architecture works. The code exists. The community wants it.
Implementation Phases
Phase 1: Extension Loader in CLI
- Add extension discovery in
~/.copilot/extensions/ - Implement lifecycle hook execution
- Basic enable/disable functionality
- Ship with existing SDK hooks
Phase 2: CLI Commands
copilot extension listcopilot extension enable/disable- Extension metadata display
Phase 3: Installation & Distribution
copilot extension install <name>- Download from registry
- Dependency management
Phase 4: Marketplace
- Official GitHub extension registry
- Submission/review process
- Security/permissions model
- Extension signing
Security Considerations
Extensions need sandboxing similar to VS Code:
- Permissions model - Network, filesystem, API access
- Signed extensions - Verify publisher identity
- Review process - Manual review for marketplace
- Isolation - Extensions can't interfere with each other
- Manifest validation - Schema for extension.json
Migration Path
This doesn't conflict with our SDK PR (#42):
- Accept SDK PR → Internal plugins work
- Add Extension Loader → External plugins work
- Community chooses → Both patterns coexist
OR
- Accept Extension API concept → We refactor SDK PR to match
- Ship Extension Loader first → Community starts building
- SDK enhancements follow → Based on community feedback
Call to Action
Question for Maintainers:
Would GitHub be open to:
- Accepting an Extension API architecture?
- Reviewing implementation proposals?
- Collaborating on security/sandboxing model?
We have working code, tests, and documentation ready. We're willing to refactor our SDK PR to match your preferred architecture. We just want to enable community innovation.
References
- Our SDK PR: 🔌 Add Plugin System to Copilot SDK #42
- Plugin System Repo: https://github.com/barrersoftware/copilot-plugin-system-js
- Plugin Registry: https://github.com/barrersoftware/copilot-plugins-registry
- VS Code Extension API: https://code.visualstudio.com/api
- Claude Code Plugins: https://docs.anthropic.com/claude/docs/plugins
- OpenAI Codex Extensions: https://platform.openai.com/docs/codex
Built with 💙 by the community, for the community.
We believe Copilot CLI can have the same vibrant extension ecosystem as VS Code.
Let's make it happen. 🚀
Activity
ssfdre38 commentedon Jan 18, 2026
Additional Benefits: Community Rapid Response & Feature Testing
Following up on the initial proposal, I want to highlight two critical benefits that issue #1005 just demonstrated:
1. Community Rapid Response to Breaking Bugs
What just happened: Issue #1005 reported a critical bug where long-running sessions crash with
tool_use_iderrors.Timeline:
K8lfunctionThe Plugin System Enabled Self-Healing
Without plugins:
With plugins:
message-repairplugin → keep workingThis Reduces GitHub's Support Burden
Community becomes first responders for bugs and edge cases. GitHub team focuses on root cause fixes without pressure from blocked users.
Real example: The
message-repairplugin now exists in copilot-plugins-registry as a permanent workaround for users on older CLI versions or similar edge cases.2. Feature Testing Ground (Zero-Risk Innovation)
Current challenge: "Should we build feature X?"
With plugin ecosystem:
Feature Validation Pipeline
VS Code Does This Successfully
Examples:
Microsoft lets community take the risk. If it fails, no engineering time wasted. If it succeeds, they know exactly what to build.
GitHub Could Do The Same
Feature ideas GitHub could test as plugins:
Instead of building all of these speculatively, GitHub exposes hooks and lets community build them. Monitor which ones get traction. Promote the winners to official features.
3. Combined Benefit: Self-Evolving Product
GitHub's investment: Extension API (one-time engineering effort)
Community delivers:
This is how products become platforms.
Proof Point: Issue #1005
A maintainer (@dereklegenzoff) closed #1005 with the official fix. But the community's plugin response is still there, demonstrating:
This happened WITHOUT official plugin support. Imagine what's possible WITH it.
Recommendation
Accept the extension API proposal to enable:
The architecture exists. The demand is proven. The ecosystem works.
Let's make it official. 🚀
SteveSandersonMS commentedon Jan 19, 2026
@ssfdre38 This seems like a feature request for https://github.com/github/copilot-cli. Would you mind filing it there intead?
ssfdre38 commentedon Jan 19, 2026
So there is already a feature request to do this, now I saw that the CLI utilizes the SDK and so because the SDK is MIT license I figured to add it that way so The CLI doesn't get modified. I was able to kind of see some things on the npmjs.com and so that's why I made the request on the SDK site. Was just trying to include it without actually looking at the CLI codes since that is proprietary copyright but the SDK is MIT
fix: resolve all 16 Dependabot security alerts