-
Notifications
You must be signed in to change notification settings - Fork 887
Description
Summary
The Copilot CLI auto-updated to v0.0.410+, which removed support for --headless --stdio. Since every version of @github/copilot-sdk (0.1.0 through 0.1.26-preview.0) internally spawns the CLI with these flags, all SDK versions are now broken when used with the current CLI.
Problem
The SDK calls:
copilot --headless --stdio --log-level error
CLI v0.0.410+ rejects these flags and exits with code 1. The replacement is --acp --stdio (Agent Client Protocol), which uses a different JSON-RPC method vocabulary (initialize instead of ping, session/new instead of session.create, etc.).
Impact
- Every SDK version is broken with CLI v0.0.410+
- The CLI auto-updates by default, so users discover the breakage at runtime
- There is no SDK configuration to change the CLI flags
- The CLI team made this change without coordinating with the SDK team
Current workaround
Users must pin the CLI binary to v0.0.403 and use --no-auto-update:
const client = new CopilotClient({
cliPath: '/path/to/pinned/copilot-v0.0.403',
// No way to prevent auto-update through SDK API
});This is fragile — there's no official way to prevent auto-update through the SDK, and pinning to an old version means missing security fixes and model updates.
Request
- Document the minimum and maximum CLI versions supported by each SDK release (related: Docs need to show a minimum CLI version required #137)
- Either update the SDK to use
--acp --stdio(the new protocol), or coordinate with the CLI team to restore--headless --stdiobackward compatibility - Add a CLI version check to the SDK that fails fast with a clear error message instead of "Connection is closed"
Environment
- SDK:
@github/copilot-sdk0.1.23 (tested), all versions affected - CLI: v0.0.410+ (broken), v0.0.403 (last working)
- Platform: Linux x64, but all platforms affected
- Related: We've filed a companion issue on copilot-cli (Breaking change: --headless --stdio removed without deprecation, breaks copilot-sdk and all downstream integrations copilot-cli#1606) about the breaking change.
- Related: Feature Request: Support ACP (Agent Client Protocol) Compatible CLIs #377 was closed as wontfix — but the reason we investigated ACP was because the CLI broke the SDK, not because we wanted to use a different CLI.