aws / aws/amazon-q-developer-cli
Panic running `/context show`
- 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
### Operating system
macOS 15.5.0 (24F74)
### Expected behaviour
`/context show` should work as expected and not panic.
### Actual behaviour
The application panicked (crashed).
Message: range end index 10 out of range for slice of length 1
Location: crates/chat-cli/src/cli/chat/mod.rs:2184
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⋮ 9 frames hidden ⋮
10: core::slice::index::slice_end_index_len_fail::do_panic::runtime::h2aea02db9285dc5f
at :
11: core::slice::index::slice_end_index_len_fail::h35fe1ac5b5b3247c
at :
12: chat_cli::cli::chat::ChatContext::handle_input::{{closure}}::h922827d8f33eb3b5
at :
13: as core::future::future::Future>::poll::h1948ecc20937a675
at :
14: chat_cli::cli::chat::ChatContext::try_chat::{{closure}}::h94f071bdd0ad5fc9
at :
15: chat_cli::cli::chat::ChatArgs::execute::{{closure}}::h9f50c48ee70f3042
at :
16: chat_cli::cli::Cli::execute::{{closure}}::h9838601bbe03ee88
at :
17: tokio::runtime::park::CachedParkThread::block_on::h4e3fb6a319fab5fa
at :
18: tokio::runtime::context::runtime::enter_runtime::hc4aa6d5fbd32ed42
at :
19: tokio::runtime::runtime::Runtime::block_on::h4dc1f79f72b95674
at :
20: chat_cli::main::he3fc261d79a436ab
at :
21: std::sys::backtrace::__rust_begin_short_backtrace::hd3cfaf3f38396aaf
at :
22: std::rt::lang_start::{{closure}}::hfd6f3b49084fa293
at :
23: std::rt::lang_start_internal::hacda2dedffd2edb4
at :
24: _main
at :
### Steps to reproduce
I added too much context and got the message "Total token count exceeds limit: 150000. The following files will be automatically dropped when interacting with Q. Consider removing them." and then ran `/context show` and it panicked. On relaunch, running the same command panicked again, until I cleared the context.
Contributor guide
Assessment
This issue has not been assessed yet.