Skip to content

VS Code extension intermittently fails to connect to the Qwen agent after ACP process exits with SIGTERM #2634

@yiliang114

Description

@yiliang114

What happened?

The VS Code extension intermittently shows the following error:

Failed to connect to Qwen agent: Qwen ACP process failed to start (exit code: null, signal: SIGTERM)
You can still use the chat UI, but messages won’t be sent to AI.

When this happens, the chat panel still opens, but messages cannot be sent to the AI, so the extension is effectively unusable.

This appears to be intermittent rather than deterministic. It does not happen every time VS Code starts or every time the Qwen Code panel is opened.

What did you expect to happen?

The VS Code companion should reliably start the Qwen ACP subprocess and complete the agent connection successfully, so chat messages can be sent to the AI normally.

Even if the ACP subprocess fails to start, the extension should provide a clearer failure reason or perform a more robust retry flow instead of leaving the user with a chat UI that cannot actually work.

Client information

Client Information
  • Qwen Code CLI: 0.13.0-preview.4
  • VS Code extension: qwenlm.qwen-code-vscode-ide-companion@0.13.0-preview.20260323043518
  • VS Code: 1.111.0
  • VS Code commit: ce099c1ed25d9eb3076c11e4a280f3eb52b4fbeb
  • OS: Darwin 24.1.0 arm64
  • Node.js: v22.22.0

Note: I attempted to collect client information automatically via qwen -p '/about', but that command did not return the /about output in the current environment, so the confirmed version information is listed manually here.

Anything else we need to know?

A quick look at the source shows that this error string comes from packages/vscode-ide-companion/src/services/acpConnection.ts. The current logic waits about one second after spawning the ACP subprocess; if the child process has already exited or is marked as killed at that point, it throws:

Qwen ACP process failed to start (exit code: ${code}, signal: ${signal})

The WebView then surfaces that error message through packages/vscode-ide-companion/src/webview/hooks/useWebViewMessages.ts.

There were related historical issues such as #2279 and #2297, but both are already closed. This issue still seems to happen intermittently on the 0.13.0-preview VS Code extension, so it may indicate a remaining edge case or a regression.

Metadata

Metadata

Assignees

Labels

scope/vscodeVSCode extension specificstatus/needs-triageIssue needs to be triaged and labeledtype/bugSomething isn't working as expected

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions