Files
Holocron/plugins/kyberforge/docs/research/docs/github-copilot-plugins/troubleshooting.md
T
Defame1297andClaude Sonnet 4.6 83e1a50a51 docs(kyberforge): add GitHub Copilot plugins and sub-agents research
## Why
Parallel research track to the Claude Code plugins research already
committed. Needed to understand GitHub Copilot's extensibility model
before designing cross-tool plugin compatibility for the kyberforge
plugin system.

## Implementation Notes
Three distinct Copilot extension tracks are covered: CLI plugins
(plugin.json + marketplaces), cloud/IDE custom agents (frontmatter .md
files committed to repos), and the SDK programmatic API. The SDK track
got its own topic file (sdk.md) because the content doesn't fit neatly
into the default topic list. Sources include Context7 (/websites/github_en_copilot),
both user-provided reference URLs, and four additional deepened pages.

## Impact
Provides a reference baseline for evaluating .claude-plugin/ / plugin.json
compatibility between Claude Code and Copilot CLI — the two formats share
a manifest discovery path and the strict:false field enables cross-tool
plugin distribution.

---
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
2026-06-27 14:22:32 +00:00

6.3 KiB

topic, source_keys
topic source_keys
troubleshooting
github-cli-plugin-reference
github-plugins-creating
github-custom-agents-configuration
github-sdk-custom-agents
github-plugins-finding-installing

Troubleshooting

CLI Plugin System

Changes to a locally-installed plugin are not reflected. Plugins are cached on install. Editing files on disk has no effect until you reinstall:

copilot plugin install ./my-plugin

Agent or skill not loading after install. Use /agent and /skills list to verify what loaded. If a component is missing, check for name collisions — the first-found instance wins for agents and skills. Plugin-provided components lose to project-level (.github/agents/, .claude/agents/) and personal (~/.copilot/agents/) components with the same name.

copilot plugin marketplace remove fails. The CLI refuses to remove a marketplace that has installed plugins. Either uninstall those plugins first, or use --force to remove the marketplace and uninstall all its plugins simultaneously.

Plugin manifest not found. The CLI checks .plugin/plugin.json → plugin.json → .github/plugin/plugin.json → .claude-plugin/plugin.json. Do not put conflicting manifests in multiple of these locations — the first one found wins.

Name collision for agents/skills. Duplicate names are silently ignored; only the first-found instance is loaded. Plugin-provided components always lose to project-level and personal components. Rename the conflicting file to resolve.

MCP server override not working. Unlike agents and skills, MCP servers use last-wins resolution. The --additional-mcp-config flag takes the highest priority and can silently override plugin-provided MCP servers. Check the loading order: ~/.copilot/mcp-config.json < plugin MCP configs < --additional-mcp-config.

extensions: { exclusive: true } broke the session. This flag disables ALL built-in extensions, not just the one you want to replace. Use with care and only when you are fully replacing the built-in extension set.

COPILOT_PLUGIN_DATA not persisting between updates. Make sure you are reading/writing to ${COPILOT_PLUGIN_DATA} (or ${CLAUDE_PLUGIN_DATA}), not a path derived from ${PLUGIN_ROOT}. The root path changes on each install; the data path is stable.

Cache issues in CI. Set COPILOT_CACHE_HOME to a writable directory. Default locations (~/.cache/copilot/ on Linux, ~/Library/Caches/copilot/ on macOS) may not exist or may not be writable in containerized environments.

Cloud / IDE Custom Agents

Agent runs with different behavior than expected. Check for shadowing: the scoping hierarchy is repo > org > enterprise. A repo-level agent file silently overrides higher-level agents with the same name.

mcp-servers frontmatter block is ignored. This field is only processed by the cloud agent runtime. It is silently ignored in VS Code and most IDEs. MCP tools declared here will not be available outside the cloud agent context.

metadata field is ignored. Like mcp-servers, the metadata annotation block is not processed in VS Code.

stdio type for MCP server not working. Use type: 'local' in cloud agent files, not type: 'stdio'. The stdio alias maps correctly in VS Code .mcp.json but not in agent frontmatter.

Agent auto-selected when it shouldn't be. Set disable-model-invocation: true to prevent the runtime from autonomously selecting this agent. This is important for agents with destructive or irreversible tool access.

Prompt truncated. The prompt body cap is 30,000 characters. Content beyond this is silently truncated. Split long prompts into skills where possible.

infer field not recognized. infer is retired. Replace with disable-model-invocation: false (equivalent to old infer: true) and user-invocable: true.

MCP token can only access the source repository. The built-in github MCP server's token is scoped to the repository the agent was triggered from. Cross-repository reads require explicit additional configuration.

SDK Custom Agents

Agent not auto-selected by runtime. Check the description field quality. Vague descriptions like "helps with code" produce poor inference. Be specific about capabilities and constraints. Also confirm infer is not set to false.

agent pre-selection not working. The agent session field requires an exact match against customAgents[].name. A mismatch silently falls through to inference rather than erroring.

Sub-agent failed with no error handling. subagent.failed events are not automatically retried or surfaced by the runtime. Wire up explicit error handling on the subagent.failed event before going to production.

Tool excluded at session level still not available to sub-agent. Session-level excludedTools applies to everyone including named sub-agents. defaultAgent.excludedTools only restricts the main (built-in) agent. If a tool needs to be available to sub-agents but not the main agent, use defaultAgent.excludedTools, not the session-level blocklist.

Sub-agent not seeing parent's skills. Skills are not inherited by sub-agents. Each agent must explicitly declare the skills it needs via the skills array, and skillDirectories must be set at session level.

Agent-scoped MCP server tools not visible across agents. MCP servers declared in a CustomAgentConfig.mcpServers block are scoped to that agent only. Other agents, including the main agent, do not see those tools unless the same MCP server is also declared at the session level.

Hooks

Hooks not executing. Confirm version: 1 is present in hooks.json. Without it the config is treated as invalid.

Hook script not found or not executable. Run chmod +x on the script. Use set -x at the top of bash scripts for verbose debugging. Validate that the cwd field points to the correct working directory.

Hook timing out. The default timeoutSec is 30. Increase it for slow scripts. Long-running hooks block the lifecycle event they are attached to.

Skill pre-approving tools you didn't intend. The allowed-tools field in SKILL.md bypasses per-use permission prompts for the listed tools. Only set this after fully reviewing the skill source — any skill with allowed-tools: [shell] from an untrusted source can run arbitrary shell commands without prompting the user.