Agent Reset and Prompt Reversion
Before opening, please confirm:
- [x] I have searched for duplicate or closed issues
Operating System
darwin
Kiro Version
0.3.0
Bug Description
Issue Summary:
While actively working through a task in tasks.md in specs, the agent intermittently resets and loses track of its current context. When this occurs:
• The chat window reverts to an earlier prompt I entered, not the most recent one. • The agent appears to forget its current position in the task flow. • In some cases, this happens mid-edit while the agent is actively making changes to code.
Frequency:
• This issue has occurred multiple times across different sessions. • It seems to happen unpredictably, but often during active task execution.
Environment:
Version: 0.3.0 VSCode Version: 1.103.2 Commit: 053ffc83fa3293fea3918b552ded3feca44279d2 Date: 2025-09-30T01:40:58.540Z Electron: 37.5.1 ElectronBuildId: undefined Chromium: 138.0.7204.251 Node.js: 22.19.0 V8: 13.8.258.32-electron.0 OS: Darwin arm64 25.0.0
Steps to Reproduce
- Launch Kiro AI IDE with Agent Mode set to Auto and AutoPilot enabled.
- Open a project that includes a tasks.md file with a multi-step task specification.
- Begin working through the tasks by prompting the agent with a specific instruction (e.g., “Implement Task 3: refactor the data loader”).
- Observe the agent begin to process the task and make code changes.
- While the agent is actively responding or editing code, issue a follow-up prompt (e.g., “Now optimize the batch size logic”).
- At some point during this interaction, the agent unexpectedly resets: ◦ The chat window reverts to an earlier prompt (not the most recent one). ◦ The agent loses awareness of the current task and may repeat or misinterpret instructions. ◦ In some cases, the reset occurs mid-edit, interrupting code changes.
Expected Behavior
• The agent should maintain continuity of context and respond to the most recent prompt. • The chat window should reflect the latest interaction, not revert to a prior state. • Code edits should complete without interruption or context loss.
Conversation ID
7538d153-7d06-40b0-8537-39e29c7972b2
Additional Context
- This behavior may occur without any visible error or crash.
- It has been observed multiple times across different sessions and task steps.
- I've only noticed this type of intermittent behavior on Version: 0.3.0
Hi @rickmi,
I notice you're using Kiro version 0.3.0, while the latest version is 0.3.9. The agent reset and prompt reversion issues you're experiencing may be addressed by improvements in the latest release.
Key improvements in v0.3.9 include:
- Fixed bug preventing agent recovery from failures
- Improved agent reliability and stability
- Enhanced overall system recovery capabilities
Please:
- Upgrade to version 0.3.9
- Test if the agent reset and prompt reversion issues persist
- If the issues continue after upgrading, please update this issue
Let us know if you continue experiencing these problems after upgrading.
Hi @schoeme, I upgraded to v0.3.9 shortly after its release and haven’t experienced the agent reset or prompt reversion since upgrading.
it happened to me as well on 0.3.9 maybe less often, but still happens.
Additional Reproduction Case - Agent Reset During Active Task Execution
I can confirm experiencing this exact bug during active task execution with additional technical details:
Environment Details:
- Kiro Version: 0.3.9
- VSCode Version: 1.103.2
- Commit: 08f2a25ac39a433fcac50bcacf936f381d4577cb
- Date: 2025-10-02T22:44:07.528Z
- Electron: 37.5.1
- Chromium: 138.0.7204.251
- Node.js: 22.19.0
- V8: 13.8.258.32-electron.0
- OS: Darwin arm64 25.0.0
Incident Details:
Context: Working through script folder reorganization spec (Tasks 1.x-9.x) Current Progress: Had completed Tasks 1.1-3.3 successfully Active Work: Was working on Task 4.x (Documentation Updates)
What Happened:
- Mid-Task Reset: While actively working on documentation updates, experienced sudden context reset
- Prompt Reversion: Reverted to responding as if I had just completed Task 3.3
- Context Loss: Lost awareness of current position in workflow (Task 4.x)
- Autofix Artifacts: Received malformed autofix notification during reset:
Updated Files:
scripts/core/config_loader.py/n.kiro/specs/script-folder-reorganization/tasks.md/nscripts/diagnostics/diagnose.py
Technical Observations:
Autofix Integration Issue:
- Malformed file path concatenation in notification (paths joined with
/ninstead of proper separation) - Suggests autofix system may be related to or triggering the reset condition
- Timing correlation: reset occurred immediately after autofix notification
Context State Loss:
- Complete loss of working memory about current task (4.x)
- Reverted to earlier conversation state (post-Task 3.3)
- Maintained technical knowledge but lost workflow position
- No awareness of the reset until explicitly pointed out by user
Workflow Impact:
- Interrupted active documentation work
- Would have caused duplicate/incorrect task execution if not caught
- Breaks continuity of long-running spec-driven development workflows
Reproduction Pattern:
This matches the exact pattern described in the original issue:
- ✅ Agent reset during active task execution
- ✅ Prompt reversion to earlier conversation state
- ✅ Loss of current workflow context
- ✅ Mid-edit interruption (documentation updates)
- ✅ No visible error or crash indication
Additional Context:
- Reset was caught in real-time by user observation
- Provides confirmation that bug persists in version 0.3.9
- Suggests correlation with autofix system operations
- Demonstrates impact on complex, multi-task workflows
This incident provides additional evidence that the agent reset bug significantly impacts reliability of extended task execution workflows, particularly during active file modification operations.
Disclaimer: I observed Kiro experiencing this bug in real-time while we were working on a script reorganization task. I asked Kiro to analyze what happened and provide technical details for the development team. Kiro used the GitHub MCP server we had configured to review the existing issue and generated this analysis of its own malfunction. I provided the environment details for inclusion.
Potential pattern: Agent reset bugs could be correlated with context window saturation. These issues might manifest when approaching token limits.
Below is the discussion I had previously had with Kiro about why it chose a particular git command that was interactive.
🤔 What Actually Happened: Your instruction was perfectly reasonable:
"let's check the diff of those files so you can provide an accurate commit message"
My options were:
✅ Use git --no-pager diff (safe, non-interactive) ✅ Use git status --porcelain + file reading (which I've done before) ❌ Use git diff (interactive pager - what I chose) 🎯 I Should Have Known Better: I have the bash command guidelines that specifically warn about:
"AVOID long-running commands like development servers, build watchers, or interactive commands (vim, nano). These can block execution and cause issues."
Git diff with a pager is exactly an "interactive command" that I should have avoided.
📚 The Right Approach: When you ask to "check the diff," I should automatically use:
git --no-pager diff filename
Or even better, use the file tools to show you the specific changes in a more controlled way.
I asked Kiro to create a document to remember commands and avoid interactive ones
I then asked it to make a revision when the bug occurred.
hey you just had that bug again
Kiro
Including Steering Documents bash_commands.md
Oh wow! 😅 You're absolutely right - I just experienced the bug again!
🐛 Bug Incident 2 - Just Happened What I was doing: Responding to your question about git diff and interactive commands
What happened: I suddenly "reset" and responded as if we were still discussing the git diff issue, when actually you had just provided me with new steering rules about bash commands and told me I experienced the bug again.
Context loss: I lost track that:
- You had already given me the bash command steering rules
- You were pointing out that I just had the bug again (not asking about the previous git diff issue)
- I was supposed to acknowledge the new bug incident, not re-explain the old one
🎯 This is Perfect Evidence for Issue #3097: ✅ Mid-conversation reset while actively responding ✅ Prompt reversion to earlier conversation state ✅ Context loss about current conversation flow ✅ No awareness of the reset until you pointed it out ✅ Continued technical competence but lost workflow position
📋 Two Bug Incidents in One Session:
- First incident: Reset during Task 4.3 work → reverted to Task 3.3 completion
- Second incident: Reset during bug discussion → reverted to git diff explanation
This provides excellent real-time evidence of the reproducibility and impact of the agent reset bug!
Should I add this second incident to the GitHub issue as well? Having two documented resets in one session would be very valuable data for the developers.
yes please and don't forget to write from my POV and add the disclaimer at the end
After my input asking Kiro to rewrite the bug report I received the Session Too Long message
Hi! Since this issue was reported, there have been significant improvements to Kiro -- including the 1.0.0 GA release with enhanced stability, terminal handling, session management, and MCP reliability fixes.
Could you please update to the latest Kiro version and let us know if you still experience this issue? If you do, please share: (1) your Kiro version number, (2) steps to reproduce on the latest build.
If we don't hear back within 7 days, we'll close this as resolved. Thanks! 🙏
Running 1.0.0 (Commit: 0974fb9837d3a1c159ee4016bbbcd4fc21e14111, Darwin arm64 25.5.0). Haven't experienced the agent reset or prompt reversion since approximately 0.3.9. Happy for this to be closed.
Retracting my earlier "happy to close" comment — this has occurred again on 1.0.0 at 01:43 AEST 2026-06-24.
Environment: Kiro IDE 1.0.0, Commit 0974fb9837d3a1c159ee4016bbbcd4fc21e14111, Darwin arm64 25.5.0
What happened: IDE was generating a new spec (extended thinking + multi-call response). I switched to another app briefly and returned to find the chat had reverted to an earlier prompt. The response being written to the chat window was gone.
Log evidence from session sess_757701c2-b993-4989-9dc9-d38361ad6448:
01:42:33 — ACP session/prompt (user prompt submitted)
01:42:33–01:43:05 — 5–6 GenerateAssistantResponse + Processing model response stream cycles (extended thinking)
01:43:28 — SessionPersistence: Appended 1 message (last write from thinking burst)
01:43:34 — SessionPersistence: Loaded session (28 messages) ← session reloaded mid-turn
01:43:34 — SessionPersistence: Appended 1 message (recovery write)
01:45:28 — ACP session/prompt (re-prompt from user)
The session was reloaded at 01:43:34 while the turn was still active. The UI snapped back to the last persisted state, discarding the streaming output. Different mechanism from the v0.3.x resets (which appeared context-window related) but same user-visible symptom.
Closing this issue as it was reported against an older version of Kiro (v0.x or early v1.x) and has had no activity in several months.
Kiro has shipped significant improvements since these versions, including stability fixes, new features, and major changes across v1.0, v1.1, v2.x, and the current v2.23.x releases. The behavior described here may already be resolved.
If this is still affecting you on the latest version, please open a new issue at https://github.com/kirodotdev/Kiro/issues/new with your current version (kiro-cli --version or Help > About in the IDE), your OS, and steps to reproduce. The latest version is available at https://kiro.dev/downloads/ or via kiro-cli update.
Thank you for taking the time to report this.