Skip to content

bug: --resume-id does not restore conversation context with --agent-engine v2 in --no-interactive mode #3842

@small13999

Description

@small13999

Checks

Operating system

RHEL 8.10 (x86_64)

Expected behaviour

kiro-cli chat --no-interactive --agent-engine v2 --resume-id <session_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

kiro-cli 2.7.0
RHEL 8.10 x86_64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions