vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Get --ozone-platform found error when launching agent host on linux

Open vijayupadya opened this issue 6 months ago • 1 comments

Testing #319093

when I run below to start agent on linux, I get unexpected argument --ozone-platform found error.

code-insiders agent host --port 8081 --without-connection-token

vijayupadya avatar Jun 01 '26 22:06 vijayupadya

Verified the argument-order fix in Linux Insiders 1.149.0 (b834d498). The Linux Snap used to append --ozone-platform=x11 after the user's arguments. Everything after agent is forwarded to the native CLI, which rejects this desktop display switch. #349577 changed the Snap launcher: normally it no longer adds the switch, and when X11 is forced it puts the switch before agent.

Packaged CLI and launcher argument order Observed result
June 1 Insiders 1.123.0 (1ec0e888), and Stable 1.148.0 (661626d0), with their shipped trailing switch Exact reported unexpected argument '--ozone-platform' found; the native CLI exited 2 and nothing listened on port 8081. The tested Stable Snap does not yet include the fix.
Insiders 1.149.0, default arguments and forced X11 In both cases the host answered a WebSocket initialize request on port 8081 as vscode-agent-host (protocol 1.2.0).
Same Insiders 1.149.0 binary, moving just the X11 switch back to the end Same parser error again; no listener.
Insiders 1.149.0 Debian package, original command unchanged Successful initialize response on port 8081.

How this was verified: I inspected the official amd64 Snaps' manifest and launcher and passed their resulting arguments to each Snap's actual packaged desktop CLI. Each run had a fresh profile and a private, loopback-only network. The attached recording shows live runs. The outer snap run command and a signed-in Copilot session were not exercised. This verifies the reported start-up error, not the separate async-shell test plan.

To verify end to end on a current Insiders Snap, run the command in the report on an isolated loopback interface and connect a client to port 8081. Check for an actual host response: in the failing builds, the outer desktop CLI can return 0 even though the native parser exited 2.

https://github.com/user-attachments/assets/a3f814f0-8769-485c-9d13-b02ee76446c8

dmitrivMS avatar Dec 01 '26 11:12 dmitrivMS