Conversation summarization loops and leaves the agent stuck in “Working”
Before opening, please confirm:
- [x] I have searched for duplicate or closed issues
Operating System
win32
Kiro Version
1.0.437
Bug Description
Summary
After the conversation reaches the agent context limit, Kiro starts summarizing the session. However, the summary does not appear to reduce the context enough, and the session enters a repeated summarization loop.
In the attached screenshot, the message below appears multiple times:
Conversation above has been summarized The conversation in this session reached the agent context limit. Earlier messages have been summarized, and the summary is sent to the agent as context instead of the full text.
Eventually, the agent remains stuck on “Summarizing conversation” with the status “Working” and does not continue the task.
Steps to Reproduce
- Open a workspace with a large amount of steering/context rules.
- Start a normal multi-step coding task.
- Let the agent read files, call tools, and continue working until it reaches the context limit.
- Wait for Kiro to automatically summarize the conversation.
- Observe the session after summarization.
Actual Result
- The conversation is summarized repeatedly.
- Multiple
Conversation above has been summarizedmessages appear in the same session. - The agent eventually stays on
Summarizing conversation/Working. - The task does not resume and no further tool calls or file changes are completed.
- The user must cancel the execution or start a new session.
Expected Result
- A conversation summary should effectively reduce the context size.
- After summarization, the agent should resume the current task automatically.
- The session should not repeatedly summarize itself without making progress.
- If the task cannot continue, Kiro should show a clear error or recovery option instead of remaining indefinitely in
Working.
Impact
- Multi-step coding tasks cannot be completed.
- Confirmed changes are interrupted before implementation or validation finishes.
- Users lose task continuity and may need to restart the session.
- The issue seems especially likely in workspaces with many global or workspace-level steering rules.
Environment
- OS: Windows
- Project type: Vue 3 + Vite
- Scenario: Multi-step code modification task with extensive steering/context rules
- Kiro version:
Please fill in the current Kiro version - Screenshot: Attached
Steps to Reproduce
- OS: Windows
- Kiro version: 1.0.437
- Model: GPT 5.6 Terra
- Effort level: xHigh
- Project type: Vue 3 + Vite
- Trigger condition: Context usage reaches approximately 80%
- Open Kiro on Windows and select the GPT 5.6 Terra model.
- Set the effort level to xHigh.
- Open a workspace with a large number of global and workspace-level steering/context rules.
- Start a normal multi-step coding task and let the agent read files, call tools, and continue working.
- Continue until the context usage reaches approximately 80%.
- Observe the conversation state.
Result: Once context usage reaches approximately 80%, Kiro repeatedly shows “Conversation Summary” / “Conversation above has been summarized”. The agent eventually remains stuck on “Summarizing conversation” with the status “Working” and does not resume the task.
Expected Behavior
When context usage reaches the summarization threshold, Kiro should create one effective summary that reduces the usable context and then automatically resume the current task.
Kiro should not repeatedly generate conversation summaries after context usage reaches approximately 80%. If the session cannot recover, it should show a clear error message or recovery option instead of remaining indefinitely in the “Working” state.
Conversation ID
sess_de5624e1-3b3f-4caa-8dc1-e75cc46fef15
Additional Context
No response
🤖 Potential Duplicate Detected
This issue appears to be similar to:
What happens next?
- ⏰ This issue will be automatically closed in 3 days
- 🏷️ If this is not a duplicate, you can prevent automatic closure by adding a comment or reacting with 👎 to this message.
- 💬 Comment on the original issue if you have additional information
Why is this marked as duplicate? Both issues involve context compaction/summarization causing agent malfunction. Issue #7491 reports parameters being dropped after context compaction, while the new issue reports a summarization loop that leaves the agent stuck. Both share the core problem of context management failure causing the agent to stop functioning correctly after hitting context limits.
Thank you for your feedback! 🙏
The 👎 reaction has been noted. The duplicate label has been removed and this issue has been sent back for maintainer review.
A maintainer will review this issue shortly.
Thanks for the detailed report and repro conditions. This looks like a compaction loop triggered by how projected context usage is calculated immediately after a compaction completes. When the workspace has large steering documents and the model produces verbose tool responses, the projected usage can exceed the summarization threshold again on the very next turn, before any real work resumes, causing repeated summarizations. We're tracking this for a fix. If you need to unblock your work in the meantime, reducing the number of active steering documents or switching to a lighter model can help.
Reproduction on Kiro CLI 2.21.2: first compaction never returns, runs locally for hours, and leaves no recoverable checkpoint
AWS Support directed me to add this evidence to the Kiro tracker. This appears related to this issue, but the observed failure is more severe than repeated compactions after a successful summary: the first visible auto-compaction never completes at all.
Environment
kiro-cli 2.21.2(a4729fa233d8097438cb3dcb4c9c8d2f21cc82d9, built 2026-09-08)- macOS 27.0.0 (
26A5425a), Apple M3 Pro, 11 cores, 18 GB RAM - Authentication: AWS IAM Identity Center
- Model:
gpt-5.6-sol, effortmax - Context indicator when the failure began: 46%
- Settings:
compaction.excludeContextWindowPercent=25,compaction.excludeMessages=6 - Process chain:
kiro-cli --v3->kiro-cli-chat chat --v3->bun tui.js chat --v3
Reproduction and observed behavior
- Continue a long agentic CLI session until automatic compaction starts.
- Kiro displays
Compacting conversation.... - The spinner stops animating and the in-session timer freezes at the moment compaction began.
- The input line still draws but accepts no input. Ctrl+C, Esc, and Ctrl+D do not return control.
- The process never recovers. The only exit is force-closing the terminal window.
This is reproducible for us on essentially every sufficiently long session that reaches this compaction path.
Live process evidence
The affected process was observed read-only and never signalled during measurement:
- Still hung after 3h49m.
- This was a runaway loop, not an idle stall: CPU accumulated continuously at about 12.2% of one core, including 68.57 seconds of CPU over 560 seconds of wall time across three sample points.
- RSS grew monotonically from 360,784 KB to 435,744 KB in nine minutes (+75 MB). Physical footprint was 749 MB and peak footprint was 888 MB.
lsofreported zero established network connections. No model request was in flight and no network retry was occurring; the non-terminating work was local.- A three-second process sample showed the main thread alternating between
kevent64and deeply recursive JIT-compiled JavaScript frames. Worker threads were parked primarily in__ulock_wait2(6,981 samples) and__psynch_cvwait(4,649 samples).
These measurements suggest an unbounded local loop or recursion in the compaction path that also allocates without releasing.
Why this causes complete work loss
The session was not checkpointed while it was running:
- The CLI conversation store (
data.sqlite3,conversations_v2) contained no row for the affected session. The newest row in the table was three days older. - There was no transcript file for the session in the CLI session directory; the newest transcript was also days older.
- Consequently,
chat --resume,--resume-id,--resume-picker, and/sessionscould not recover it after force-closing the terminal.
The failed session contained about 45 minutes of agent work within a 4h35m run. The missing incremental checkpoint turns a compaction defect into total session loss.
Requested safeguards
- Bound or fix the non-terminating compaction loop.
- Make Ctrl+C or Esc abort a stuck compaction and return to the prompt without killing the process.
- Persist conversation turns incrementally so an unclean exit remains recoverable.
- Emit a diagnostic timeout or stack/error record instead of leaving the TUI indefinitely frozen.
I can provide the full process sample, diagnostic output, and timestamped measurement summary privately if a maintainer provides a safe upload channel.