Description
On Windows with Kaspersky 21.26 enabled, the V2 CLI can remain on Restarting service... for minutes even though /api/health responds normally. The generated Promise SSE client does not set Accept: text/event-stream, and the initial /api/event response can be delayed beyond the CLI's two-second connection deadline.
I compared the same authenticated requests against one running 2.0.3 backend, without restarting it or changing its configuration:
| Kaspersky state |
Unspecified / wildcard Accept (6 requests) |
Explicit SSE Accept (3 requests) |
| Enabled |
4 timed out at 2.5 s; 2 took 1.3-1.4 s |
3-6 ms |
| Disabled for the comparison |
All succeeded in 3-40 ms |
3-5 ms |
| Protection restored |
3 timed out at 2.5 s; 3 took 1.1-1.4 s |
3-4 ms |
The request-header-dependent delay also reproduces with a separate Node HTTP server/client, without OpenCode plugins. This identifies a compatibility problem with the enabled security software, not a particular internal Kaspersky module.
The EventSource specification says user agents may set this header, not that it is mandatory. Setting it by default for Promise SSE requests would improve interoperability; explicit caller headers should remain respected. SvelteKit has a matching Kaspersky report.
OpenCode version
Observed in 2.0.2 and 2.0.3. The default is still missing on v2 at 7a31b5c0f76ce1c06befacc09b47b4fc3c71c408, in packages/httpapi-codegen/src/index.ts and packages/client/src/promise/generated/client.ts.
Steps to reproduce
- On an affected Windows/Kaspersky setup, start the V2 CLI and observe repeated connection timeouts while the backend remains healthy.
- Compare authenticated streaming GET requests to the same
/api/event endpoint with the default Accept and with Accept: text/event-stream.
- The explicitly identified SSE request receives
server.connected promptly; the default request can stall until later traffic arrives.
Operating System
Windows x64
Description
On Windows with Kaspersky 21.26 enabled, the V2 CLI can remain on
Restarting service...for minutes even though/api/healthresponds normally. The generated Promise SSE client does not setAccept: text/event-stream, and the initial/api/eventresponse can be delayed beyond the CLI's two-second connection deadline.I compared the same authenticated requests against one running 2.0.3 backend, without restarting it or changing its configuration:
The request-header-dependent delay also reproduces with a separate Node HTTP server/client, without OpenCode plugins. This identifies a compatibility problem with the enabled security software, not a particular internal Kaspersky module.
The EventSource specification says user agents may set this header, not that it is mandatory. Setting it by default for Promise SSE requests would improve interoperability; explicit caller headers should remain respected. SvelteKit has a matching Kaspersky report.
OpenCode version
Observed in 2.0.2 and 2.0.3. The default is still missing on
v2at7a31b5c0f76ce1c06befacc09b47b4fc3c71c408, inpackages/httpapi-codegen/src/index.tsandpackages/client/src/promise/generated/client.ts.Steps to reproduce
/api/eventendpoint with the default Accept and withAccept: text/event-stream.server.connectedpromptly; the default request can stall until later traffic arrives.Operating System
Windows x64