Agent stuck in context summary loop
Before opening, please confirm:
- [x] I have searched for duplicate or closed issues
Operating System
Windows 11
Kiro Version
1.107.1
Bug Description
When I execute a workflow as regular as Kiro would be used, I experience extremely often that the agent is unable to cope with larger files. It tries to process a problem, but the context is too big, and then a summary loop starts. The agent is unable to come out of that. I have tried to give it instructions to break out, but even that fails in 90% of the cases. There should be a circuit breaker implemented on the application level that detects such patterns and reorganizes the tasks so that they are digestible. I'm working on a greenfield application that does not have a very complicated code base and is fully created by Kiro.
Steps to Reproduce
Create a spec with Kiro on an existing code-base Krio creates to big tasks on his own
Model: Claude Opus 4.6
Expected Behavior
Descriped already in the bug description
Conversation ID
a4ba8d16-539a-4766-92b2-652d300c3dd0
Additional Context
No response
🤖 Potential Duplicate Detected
This issue appears to be similar to:
- #4992: New sessions immediately hit 85%+ context usage and enter summarization loop, even with minimal steering docs and simple prompts. This worked fine for 6+ months prior. (95% similar)
- #6132: Automatic Sprint/Task Review Before Context Compression (85% similar)
- #5527: Hooks bypass auto-compaction trigger - ValidationException at 100% context (85% similar)
- #5457: Context usage always shows 0% and crashes with "unexpected error" when context is full (85% similar)
- #4879: During long dialogues or editing of large files, the oldStr parameter of the strReplace tool may be truncated, resulting in an inability to match the file content (85% similar)
- #4638: 切換SESSION (85% similar)
- #4606: Bug: New sessions auto-ingest .kiro/specs and instantly hit context limit (400k+ tokens) (85% similar)
- #4493: 无法自动总结 (85% similar)
- #4411: Auto Summarization (85% similar)
- #4293: Context Length Issue Causing Task Interruptions and Data Loss (85% similar)
- #4181: Context limit exceeded unexpectedly. Please start a new session to continue. (85% similar)
- #4876: Kiro doesn't respect .kiroignore file, try to read every files in the workspace and run out of context-usage everytime (82% similar)
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 report agents getting stuck in context summarization loops due to high context usage, with similar symptoms of being unable to break out of the loop
This issue has been automatically closed as it appears to be a duplicate of #4992.
If you believe this is incorrect, please comment on this issue and a maintainer will review it.