Public bug reported:

git ubuntu deltarebase continue fails at the split step with:

    RuntimeError: SDK protocol version mismatch: SDK supports versions 3-3,
    but server reports version 4. Please update your SDK or server to ensure
    compatibility.

The AI step never runs because the Python Copilot SDK in the git-ubuntu
snap and the Copilot CLI in the AI container speak different protocol versions.

Environment

- git-ubuntu snap: 1.2-140-g989fe28, revision 2333, channel
  latest/edge, installed 2026-10-23
- Python SDK in the snap: github-copilot-sdk 1.0.26 (import name
  copilot), supports protocol 3
- AI image: git-ubuntu-dr-ai, created 2026-11-19 19:38 UTC
- Copilot CLI in the image: @github/copilot 1.0.114, reports
  protocol 4
- Affected command: git ubuntu deltarebase continue

Steps to reproduce

1. Install git-ubuntu from latest/edge (revision 2333).
2. Create container with `git-ubuntu container prepare-deltarebase`
3. Run a deltarebase with the AI harness `git ubuntu deltarebase start
--bug lpXXXXXX --ai`
4. The SDK rejects the server during the protocol handshake.

Actual behaviour

The SDK aborts before creating a session. Full output and traceback
from the failing run:

    ❯ git ubuntu deltarebase continue
    checking AI credentials ...
    prepare [1/9] already done
    reconstruct [2/9] already done
    split [3/9]
      starting AI container 'git-ubuntu-ai-0a98d607' with harness 'copilot' ...
      git-ubuntu-ai-0a98d607$ systemd-run --unit=git-ubuntu-copilot.service 
--collect --setenv=COPILOT_GITHUB_TOKEN --setenv=COPILOT_CONNECTION_TOKEN 
--setenv=HOME=/root --setenv=GIT_CONFIG_COUNT=1 
--setenv=GIT_CONFIG_KEY_0=safe.directory '--setenv=GIT_CONFIG_VALUE_0=*' -- 
copilot --headless --host 0.0.0.0 --port 4321 --no-auto-update
      waiting for copilot server to start in container 'git-ubuntu-ai-0a98d607' 
...
      copilot server is ready.
      AI: run /tmp/git-ubuntu-skills/deltarebase-split.md
    WARNING:copilot.client:CopilotClient.start failed
    Traceback (most recent call last):
      File 
"/snap/git-ubuntu/2333/usr/lib/python3/dist-packages/copilot/client.py", line 
2096, in _start
        await self._verify_protocol_version()
      File 
"/snap/git-ubuntu/2333/usr/lib/python3/dist-packages/copilot/client.py", line 
4613, in _verify_protocol_version
        raise RuntimeError(
        ...<4 lines>...
        )
    RuntimeError: SDK protocol version mismatch: SDK supports versions 3-3, but 
server reports version 4. Please update your SDK or server to ensure 
compatibility.

Root cause

gitubuntu/container/image.py builds the delta-rebase AI image with an
unpinned npm install:

    _PROFILE_SETUP = {
        "deltarebase": [
            ["npm", "install", "--global", "@github/copilot"],
        ],
    }

The image therefore picks up whatever Copilot CLI is newest at image
build time. The image in this report was built on 2026-11-19 and
installed CLI 1.0.114, released 2026-11-18. CLI 1.0.114 bumped the
server protocol to 4, but the SDK bundled in the snap is version
1.0.26, which only supports protocol 3.

The latest released SDK on PyPI at the time of writing is 1.0.35
(2026-11-18), and it still reports protocol 3; protocol 4 is
present on the SDK's main branch but has not been released. So the
image is ahead of any released SDK.

Workaround

Downgrade the CLI inside the existing git-ubuntu-dr-ai image:

    lxc launch git-ubuntu-dr-ai git-ubuntu-dr-ai-fix
    lxc exec git-ubuntu-dr-ai-fix -- npm install -g @github/[email protected]
    lxc exec git-ubuntu-dr-ai-fix -- copilot --version
    lxc stop git-ubuntu-dr-ai-fix
    lxc publish git-ubuntu-dr-ai-fix --alias git-ubuntu-dr-ai \
      --compression none --reuse
    lxc delete git-ubuntu-dr-ai-fix

    git ubuntu deltarebase continue

** Affects: git-ubuntu (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: snap

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2175113

Title:
  deltarebase: Copilot SDK protocol mismatch (SDK 3 vs server 4)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/git-ubuntu/+bug/2175113/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to