aws / aws/amazon-q-developer-cli
bug: --resume-id does not restore conversation context with --agent-engine v2 in --no-interactive mode
- 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
RHEL 8.10 (x86_64)
### Expected behaviour
kiro-cli chat --no-interactive --agent-engine v2 --resume-id "follow-up" should load the prior session's messages into context before processing the new prompt, the same way it works with the classic engine.
### Actual behaviour
A new session file is created with session_created_reason: "subagent" in metadata. The model responds with no knowledge of the prior conversation (e.g., "this is the beginning of our conversation"). With the classic engine (no --agent-engine flag), --resume-id correctly appends to the same session and the model has full prior context.
### Steps to reproduce
mkdir /tmp/resume-test && cd /tmp/resume-test
# 1. Create a v2 session
kiro-cli chat --no-interactive --agent-engine v2 "Remember this code: XYZ123"
# 2. Get session ID
kiro-cli chat --list-sessions
# Note the session ID (e.g., 58ca16d9-...)
# 3. Resume with v2 engine
kiro-cli chat --no-interactive --agent-engine v2 --resume-id 58ca16d9-... "What code did I ask you to remember?"
# Actual: model has no memory of prior turn
# 4. Compare with classic engine (works correctly):
kiro-cli chat --no-interactive "Remember this word: BANANA"
kiro-cli chat --list-sessions
kiro-cli chat --no-interactive --resume-id "What word did I ask you to remember?"
# Model correctly recalls BANANA
### Environment
```yaml
kiro-cli 2.7.0
RHEL 8.10 x86_64
```
Contributor guide
Assessment
This issue has not been assessed yet.