Kiro icon indicating copy to clipboard operation
Kiro copied to clipboard

[IDE] Agent silent termination during extended thinking with credit loss — no output, no error

Open rickmi opened this issue 5 months ago • 7 comments

Before filing, noting the closest existing issues and why this is distinct:

  • #3349 ("Kiro Stops Responding and Displays Only 'Understood'") — agent stops responding but produces output ("Understood"). Our issue: no output at all, zero response.
  • #5416 ("Output Freezes Mid-Task") — output stops, no error. Similar surface, but no credit consumption evidence and no confirmed extended thinking trigger.

This issue is distinct because:

  1. The trigger is confirmed extended thinking (2m 24s of active model processing logged before silence)
  2. Credits were actively consumed with no value delivered — confirmed via q-client.log (credit counter jump during the gap)
  3. Completely silent — no "Understood", no error, no timeout message surfaced to the user
  4. Log evidence is available with exact timestamps and session ID

Filing separately because the credit waste + silent failure combination is the actionable differentiator that warrants distinct handling.


Bug Report

Operating System

macOS (Darwin arm64)

Kiro Version

1.0.0

Environment Details

Version: 1.0.0
VSCode Version: 1.107.1
Commit: 0974fb9837d3a1c159ee4016bbbcd4fc21e14111
Date: 2026-06-17T02:33:34.894Z
Electron: 39.6.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.5.0

Bug Description

During an active agent session, the agent entered extended thinking and consumed credits over approximately 2m 24s, then terminated silently — no output, no error, no timeout message. The session appeared to still be open in the UI. The only way to discover the failure was to re-prompt, at which point the agent resumed from scratch.

Credits were burned with no value delivered.

Steps to Reproduce

  1. Start an agent session with a complex multi-step task (spec writing/review with multiple file reads and writes)
  2. Allow the agent to reach a point requiring extended thinking
  3. Observe the agent enters extended thinking (UI shows thinking indicator)
  4. Wait — after ~2m the session terminates with no output
  5. Re-prompt to confirm the session produced nothing

Expected Behavior

Either:

  • Output is produced (even partial), OR
  • A visible timeout or error is displayed explaining what happened, OR
  • Credits are not consumed for a failed/empty response

Actual Behavior

Silent termination — session stopped with no output, no error, no indication to the user of what occurred. Credits were consumed regardless.

Log Evidence

Session: sess_f2f89b8b-b0ab-47b6-a2bd-d538d1400466 Log file: ~/Library/Application Support/Kiro/logs/20260618T230559/window1/exthost/kiro.kiroAgent/Kiro Logs.log

The 2m 24s gap (lines ~5241–6692):

2026-06-19 01:48:14.259 [info] [ChatAgent] Processing model response stream
# ← 2m 24s silence — no entries
2026-06-19 01:50:38.609 [info] [SessionPersistence] Appended 1 message(s) to session
2026-06-19 01:52:02.157 [info] [KiroAgent] ACP session/prompt  ← user had to re-prompt

Credit consumption (q-client.log):

Time Credits Delta
01:49 834.58 —
02:12 847.48 +12.90 ← covers the gap

Additional Context

  • macOS Darwin arm64
  • Kiro IDE 1.0.0
  • The session involved complex spec review with multiple file operations preceding the failure
  • A ACP session/cancel appears at 01:55:29 — consistent with a stalled tool approval that required manual intervention to clear
  • Related: #3349, #5416 — but distinct due to extended thinking trigger + confirmed credit consumption with zero output

rickmi avatar Jun 19 '26 16:06 rickmi

🤖 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 report Kiro entering a hung/unresponsive state with no output or error messages, requiring user intervention to resolve

github-actions[bot] avatar Jun 19 '26 16:06 github-actions[bot]

This is not a duplicate of #9532 or #9491.

  • #9532 ("kiro in hung state") and #9491 ("Understood" responses): agent becomes unresponsive or produces minimal output, but there is no evidence of credit consumption and the trigger is unspecified.

This issue is distinct because:

  1. The trigger is confirmed extended thinking — Kiro Logs.log shows [ChatAgent] Processing model response stream at 01:48:14 followed by 2m 24s of complete silence before the session ends
  2. Credits were actively consumed during the silent period — q-client.log records a jump of ~12.9 credits (834.58 → 847.48) with zero output delivered
  3. The failure is completely silent — no "Understood", no error, no timeout surfaced to the user, making it impossible to know whether to wait or re-prompt
  4. Log evidence with exact session ID, timestamps, and credit delta is available

The core issue here is the billing + silent failure combination: credits burned, nothing produced, no feedback. That's a different problem to a hung state or a minimal response.

rickmi avatar Jun 19 '26 16:06 rickmi

Thank you for your feedback! 🙏

The duplicate label has been removed and this issue has been sent back for maintainer review.

A maintainer will review this issue shortly.

github-actions[bot] avatar Jun 19 '26 16:06 github-actions[bot]

I'm seeing exactly the same issue, repeatedly, but on Windows (IDE, latest version). Starting last night, at multiple times, I launched three or four concurrent sessions doing complex vibe work (building a specced feature, reconciling large numbers of specs, etc.). After between five minutes and an hour of thinking each time, all sessions crashed. UI shows nothing except the original prompt (even though during execution I got to see work being produced, responses being generated and more) and the line "Loading model". After six repetitions of this (resulting in several hours of tokens burned) I restarted Kiro and switched to Claude 4.6 since in the past I had observed it to be more stable, but the issue occurred once more. Some (even more worrying) symptoms: the work produced by these sessions was wiped clean. There's no trace in the local workspace or the online repo of the work that was done. Another session I launched to analyze the status commented that it found: 8acb9a5d HEAD@{0}: reset: moving to HEAD 8acb9a5d HEAD@{1}: commit: feat(inventory): solution ontology ... (D303) None of my sessions had been instructed to do any explicit Git operation, let alone a Git reset, so this appears to be a new cleanup behavior in Kiro that's keeping things clean after a crash, but also wipe hours of work produced by large amounts of tokens over several net hours of processing. Happy to share any additional details that may be useful for investigating this serious issue.

Herbys68 avatar Jun 21 '26 20:06 Herbys68

Additional occurrence — 01:43 AEST 2026-06-24, Kiro IDE 1.0.0

Commit 0974fb9837d3a1c159ee4016bbbcd4fc21e14111, Darwin arm64 25.5.0

This time I have log evidence of the specific failure mechanism — a session reload mid-turn that discarded streaming output:

01:42:33 — ACP session/prompt submitted
01:42:33–01:43:05 — 5–6 GenerateAssistantResponse cycles (~32s of extended thinking)
01:43:28 — SessionPersistence: Appended 1 message (last write)
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 after noticing reversion)

Session sess_757701c2-b993-4989-9dc9-d38361ad6448. The session was unexpectedly reloaded at 01:43:34 while a turn was active. The UI snapped back to the last persisted state (the original prompt), discarding everything the model had streamed.

Credit/time discrepancy: The IDE UI reported Est. Credits Used: 1.6, Elapsed time: 2m 17s for the failed turn — but the q-client.log only captured credit snapshots at session startup (69.97 credits) with no snapshot during or after the incident. So the UI-reported 2m 17s elapsed time doesn't appear in the logs (the log activity for the turn spans only ~01:42:33–01:43:34, roughly 60 seconds). This suggests the UI timer and the actual log-observable activity diverge during the failure — potentially worth investigating.

Related: I filed this same session reload/prompt reversion pattern under #3097 (originally v0.3.x, now confirmed recurring on 1.0.0).

rickmi avatar Jun 23 '26 16:06 rickmi

Thanks for raising this. The agent silently consuming credits during extended thinking and producing zero output is a real gap in the streaming error surface. When the thinking stream is interrupted or the signature retry path fails, the agent should surface an explicit error rather than silently completing with no response. Marking this as a bug to investigate further.

AnilMaktala avatar Sep 21 '26 13:09 AnilMaktala

Same symptom, but the cut-off lands at a fixed ~330 s

I'm seeing what looks like the same failure as this issue, with one difference: the cut-off time isn't random. It lands at roughly 330 seconds every time.

What happens

  • Model: claude-opus-5.5 with adaptive thinking.
  • On long planning steps, the model is still thinking when the response stream closes at about 330 s.
  • The response contains only thinking. There is no text, no tool call, and no error, and the turn simply ends.
  • If I ask it to continue, the model starts its reasoning over and hits the same limit again. The last two rows below are one such retry.

Measurements (2026-11-17, UTC)

There were 12 cut-offs across two sessions. Duration is measured from request start to stream close.

Stream closed Duration Thinking length
04:52:52 331 s 51,291 chars
04:58:25 332 s 49,742 chars
05:54:41 329 s 48,071 chars
06:00:09 329 s 46,305 chars
06:52:20 336 s 47,439 chars
07:11:16 329 s 49,930 chars
07:19:26 331 s 49,603 chars
07:25:00 334 s 51,012 chars
07:30:53 329 s 53,242 chars
07:36:36 343 s 41,662 chars
08:44:53 332 s 51,737 chars
08:50:23 330 s 54,691 chars
  • My logs also show responses ending in the same window (329–365 s) on 2026-11-13 and 2026-11-14.
  • The longest normal response in these sessions took 316 s. In logs covering 2026-11-09 to 2026-11-17, no completed response ran longer than 366 s.

Why this looks related

The maintainer comment above mentions the thinking stream being interrupted and the agent finishing silently instead of showing an error. A duration this consistent suggests a limit on how long a single response can run, rather than random interruptions.

  1. Is there a limit of about 5.5 minutes on a single response?
  2. If so, could the stream end with an explicit error or stop reason when the limit is hit? Then a retry wouldn't spend another 5.5 minutes reaching the same cut-off.

glud123 avatar Nov 17 '26 09:11 glud123