-
Notifications
You must be signed in to change notification settings - Fork 780
Open
Labels
Description
Steps to reproduce:
- Create a GitHub repo with a package.json using
@github/copilot-sdkas a dependency. Add abugRepro.mjsfile to the repo with the following content
import { CopilotClient } from "@github/copilot-sdk";
async function main() {
const client = new CopilotClient({
logLevel: 'all',
});
const session = await client.createSession({
model: 'claude-sonnet-4.5',
});
const done = new Promise((resolve) => {
session.on((event) => {
console.log(`=== session event ${event.type}`);
if (event.type === 'session.idle') {
console.log("resolve");
resolve();
return;
}
});
});
await session.send({ prompt: "hello, what can you do?" });
await done;
process.exit();
}
main();- Install the dependencies and run
node bugRepro.mjs. The agent will do some work and finally emit a session.idle event. - Create a manual GitHub Action workflow that installs the npm modules, uses mvkaran/setup-copilot-cli@v1 to setup Copilot CLI, and executes the
node bugRepro.mjsscript. - Observe that the agent consistently emits two pending_messages.modified events and then hangs.
Reactions are currently unavailable