aws / aws/amazon-q-developer-cli

bug: MCP server processes persist after Q CLI terminal closure - orphaned Python processes accumulate

Open
#3,272 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2k
Forks
439
PR merge metrics
No merged PRs in 30d

Description

### Checks

- [x] I have searched [github.com/aws/amazon-q-developer-cli/issues](https://github.com/aws/amazon-q-developer-cli/issues?q=) and there are no duplicates of my issue
- [x] I have run `q doctor` in the affected terminal session
- [x] I have run `q restart` and replicated the issue again

### Operating system

Mac

### Expected behaviour

MCP server processes started by Q CLI continue running as background processes even after the terminal session is closed, leading to resource accumulation and potential system performance issues.
Ideally, All MCP server processes should be terminated when Q CLI exits or the terminal is closed.

### Actual behaviour

MCP server processes remain running as orphaned background processes. In the reported case, 80+ Python processes were found running from .cache/uv/archive-v0/ directories for various AWS MCP servers (cost-explorer,
bedrock, cfn, documentation, billing, terraform, etc.).

### Steps to reproduce

Steps to Reproduce:
1. Start Q CLI with MCP servers configured
2. Use various MCP tools/servers during the session
3. Close the terminal or exit Q CLI
4. Check running processes with ps aux | grep -i "python.*\.cache"

### Environment

```yaml
• OS: macOS
• Q CLI version: [current version]
• MCP servers: AWS Labs MCP servers (cost-explorer, bedrock-kb-retrieval, cfn, documentation, billing, etc.)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.