Skip to content

CLI v0.0.410+ auto-update breaks all SDK versions — --headless --stdio no longer accepted #530

@darthmolen

Description

@darthmolen

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

  1. Document the minimum and maximum CLI versions supported by each SDK release (related: Docs need to show a minimum CLI version required #137)
  2. Either update the SDK to use --acp --stdio (the new protocol), or coordinate with the CLI team to restore --headless --stdio backward compatibility
  3. Add a CLI version check to the SDK that fails fast with a clear error message instead of "Connection is closed"

Environment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions