Skip to content

Python: [Feature/Question]: GitHubCopilotAgent does not forward skill_directories to create_session, and MAF SkillsProvider is likely incompatible #5282

@ts46237

Description

@ts46237

Description

Package: agent-framework-github-copilot
Version: 1.0.1
Python: 3.11+

Summary
[GitHubCopilotAgent._create_session] does not forward skill_directories to the underlying CopilotClient.create_session call. The Copilot SDK ([github-copilot-sdk 0.2.2]) accepts this parameter and it is actively used — confirmed in the SDK's own test suite at [test/scenarios/tools/skills/python/main.py].

This raises a broader design question: is this a deliberate decision because MAF has its own Agent Skills system (SkillsProvider)? If so, does SkillsProvider actually work with [GitHubCopilotAgent]? Based on reading the source, the answer appears to be no — and for the same underlying reason.

Reproduction
Using the Copilot SDK directly (works):

session = await client.create_session(
    on_permission_request=lambda _, __: {"kind": "approved"},
    model="claude-sonnet-4.5",
    skill_directories=["/path/to/skills"],
)

Using [GitHubCopilotAgent] (skill_directories silently dropped):

# No way to pass skill_directories — GitHubCopilotOptions does not expose it,
# and _create_session does not forward it even if passed via default_options.
agent = GitHubCopilotAgent(
    instructions="...",
    default_options={"on_permission_request": PermissionHandler.approve_all},
)

_create_session as it stands today ([_agent.py]):

return await self._client.create_session(
    on_permission_request=permission_handler,
    streaming=streaming,
    model=model or None,
    system_message=system_message or None,
    tools=tools or None,
    mcp_servers=mcp_servers or None,
    # skill_directories is never passed
)

Design question: does MAF's own SkillsProvider cover this?
MAF introduced Agent Skills in 1.0.0rc2 (#4210) — a framework-level skill system using SkillsProvider, @skill.resource, @skill.script, and progressive disclosure via load_skill / read_skill_resource / run_skill_script tools. These are listed as experimental.

The MAF and Copilot SDK skill systems are architecturally different:

MAF SkillsProvider Copilot SDK skill_directories
Where implemented Python, MAF layer Copilot CLI process
Discovery mechanism load_skill tool injected into LLM context CLI loads SKILL.md files natively
Format agentskills.io spec, Python decorators Copilot CLI SKILL.md format
Script execution In-process or subprocess via MAF CLI subprocess
Status in MAF Experimental Not forwarded (gap)

So the likely situation is:
skill_directories (Copilot SDK native skills): not forwarded — confirmed gap
SkillsProvider (MAF skills): tools not forwarded to create_session — likely also broken

Questions for the team
Is omitting skill_directories intentional, with SkillsProvider as the intended replacement?
If so, do context provider-injected tools need to be forwarded to create_session for SkillsProvider to work?
If both skill systems are intended to coexist, skill_directories should be added to GitHubCopilotOptions and forwarded.

Proposed minimal fix (if forwarding is the right answer)
GitHubCopilotOptions — add one field:

skill_directories: list[str]
"""Directories containing SKILL.md files to load into the Copilot CLI session."""

init — extract alongside other options:
self._skill_directories: list[str] | None = opts.pop("skill_directories", None)

_create_session — forward it:

return await self._client.create_session(
    ...
    mcp_servers=mcp_servers or None,
    skill_directories=self._skill_directories or None,  # add this
)

Workaround (until resolved)
Subclass and override _create_session (private API — fragile across releases):

class CopilotAgentWithSkills(GitHubCopilotAgent):
    def __init__(self, *args, skill_directories=None, **kwargs):
        super().__init__(*args, **kwargs)
        self._skill_directories = skill_directories

    async def _create_session(self, streaming, runtime_options=None):
        # ... replicate parent logic, add skill_directories= to create_session call

Code Sample

Language/SDK

Python

Metadata

Metadata

Assignees

Labels

agentsIssues related to single agentspython

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions