aws / aws/amazon-q-developer-cli
bug: /prompts crashes if an MCP server provides prompts with names more than 16 characters
- 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
MacOS
### Expected behaviour
An MCP server can provide prompts with names longer than 16 characters without the process crashing.
### Actual behaviour
When running `/prompts`, Q crashes with:
```
!> /prompts
Prompt Arguments (* = required)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
my_mcp (MCP):
- superlongpromptnThe application panicked (crashed).
Message: capacity overflow
Location: /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/alloc/src/slice.rs:566
```
### Steps to reproduce
_No response_
### Environment
```yaml
```
Contributor guide
Assessment
This issue has not been assessed yet.