Skip to content

Background process (qwen-cli --acp) persists after VS Code closes, accumulates on repeated launches #2553

@mormushka

Description

@mormushka

What happened?

The extension spawns a background process (qwen-cli/cli.js --acp) that does not terminate when VS Code is closed. This "zombie" process persists until system shutdown, where it fails to respond to systemd's termination signals. This causes a ~90 second delay during shutdown as systemd waits for the process to timeout before force-killing it.
The issue is reproducible: even after a single launch and exit of VS Code, the background process remains active in the system.

What did you expect to happen?

The qwen-cli --acp background process should terminate gracefully when VS Code closes.

Client information

Client Information

Run qwen to enter the interactive CLI, then run the /about command.

$ qwen /about
# I use the plugin
OS: CachyOS (Linux 6.19.9-1-cachyos)
VS Code Version: 1.112.0-1 (visual-studio-code-bin)
Extension Version: 0.12.6

Login information

No response

Anything else we need to know?

  1. Persistent Process After Exit:
    After closing VS Code, the following process remains active:
ps aux | grep -iE "code|electron" | grep -v grep
# Output:
mormush+   27198 12.9  1.2 1459594616 191140 ?   S<l  02:37   0:00 \
/opt/visual-studio-code/code \
/home/mormushka/.vscode/extensions/qwenlm.qwen-code-vscode-ide-companion-0.12.6-linux-x64/dist/qwen-cli/cli.js \
--acp --channel=VSCode
  1. Systemd Shutdown Logs (90s delay):
мар 21 02:04:06 omen systemd[1]: Stopped Ananicy-Cpp - ANother Auto NICe daemon in C++.
мар 21 02:05:35 omen systemd[1555]: app-org.chromium.Chromium-25015.scope: Stopping timed out. Killing.
мар 21 02:05:35 omen systemd[1555]: app-org.chromium.Chromium-25015.scope: Killing process 25505 (code) with signal SIGKILL.
мар 21 02:05:35 omen systemd[1555]: app-org.chromium.Chromium-113261.scope: Stopping timed out. Killing.
мар 21 02:05:35 omen systemd[1555]: app-org.chromium.Chromium-113261.scope: Killing process 113658 (code) with signal SIGKILL.
мар 21 02:05:35 omen systemd[1555]: app-org.chromium.Chromium-27002.scope: Stopping timed out. Killing.
мар 21 02:05:35 omen systemd[1555]: app-org.chromium.Chromium-27002.scope: Killing process 27426 (code) with signal SIGKILL.
мар 21 02:05:35 omen systemd[1555]: app-org.chromium.Chromium-25015.scope: Failed with result 'timeout'.
мар 21 02:05:35 omen systemd[1555]: Stopped app-org.chromium.Chromium-25015.scope.
мар 21 02:05:35 omen systemd[1555]: app-org.chromium.Chromium-27002.scope: Failed with result 'timeout'.
мар 21 02:05:35 omen systemd[1555]: Stopped app-org.chromium.Chromium-27002.scope.
мар 21 02:05:35 omen systemd[1555]: app-org.chromium.Chromium-113261.scope: Failed with result 'timeout'.
мар 21 02:05:35 omen systemd[1555]: Stopped app-org.chromium.Chromium-113261.scope.

Metadata

Metadata

Assignees

Labels

type/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