From d12b0b43e6051adf648a8ae79baaacae73e0d2c9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 28 Jan 2026 23:36:47 +0000 Subject: [PATCH 2/3] Fix Python async syntax in copilot-sdk-python.instructions.md Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com> --- .../copilot-sdk-python.instructions.md | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/instructions/copilot-sdk-python.instructions.md b/instructions/copilot-sdk-python.instructions.md index e4b08e02..867b6c3d 100644 --- a/instructions/copilot-sdk-python.instructions.md +++ b/instructions/copilot-sdk-python.instructions.md @@ -31,10 +31,14 @@ uv add copilot-sdk ```python from copilot import CopilotClient +import asyncio -async with CopilotClient() as client: - # Use client... - pass +async def main(): + async with CopilotClient() as client: + # Use client... + pass + +asyncio.run(main()) ``` ### Client Configuration Options @@ -56,10 +60,13 @@ When creating a CopilotClient, use a dict with these keys: For explicit control: ```python -client = CopilotClient({"auto_start": False}) -await client.start() -# Use client... -await client.stop() +async def main(): + client = CopilotClient({"auto_start": False}) + await client.start() + # Use client... + await client.stop() + +asyncio.run(main()) ``` Use `force_stop()` when `stop()` takes too long. From c1f10f7dff1c9207f4cec82883371738a52430ce Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 28 Jan 2026 23:38:12 +0000 Subject: [PATCH 3/3] Add missing imports to Manual Server Control example Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com> --- instructions/copilot-sdk-python.instructions.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/instructions/copilot-sdk-python.instructions.md b/instructions/copilot-sdk-python.instructions.md index 867b6c3d..8bc46757 100644 --- a/instructions/copilot-sdk-python.instructions.md +++ b/instructions/copilot-sdk-python.instructions.md @@ -60,6 +60,9 @@ When creating a CopilotClient, use a dict with these keys: For explicit control: ```python +from copilot import CopilotClient +import asyncio + async def main(): client = CopilotClient({"auto_start": False}) await client.start()