Skip to content

fix(cli): Keep 'Thinking...' indicator visible after checkpoint saves - #5302

Merged
marius-kilocode merged 1 commit into
mainfrom
fix/cli-processing-indicator-5251
Jan 23, 2026
Merged

fix(cli): Keep 'Thinking...' indicator visible after checkpoint saves#5302
marius-kilocode merged 1 commit into
mainfrom
fix/cli-processing-indicator-5251

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

Summary

Fixes #5251 - CLI doesn't show any indication stuff is happening after checkpoints.

Problem

After a checkpoint is saved in the CLI, the "Thinking..." indicator would disappear even though the task was still processing. This left users with no visual feedback for up to 30 seconds, making it appear the CLI was waiting for input when it was actually working.

Solution

Added a new isProcessingAtom that detects when the task is processing but not actively streaming:

  • Returns true when the last message is checkpoint_saved
  • Returns true when the last message is api_req_started with a cost (indicating the API call finished but response processing hasn't started)

The StatusIndicator component now shows "Thinking..." for both isStreaming and isProcessing states.

Changes

  • cli/src/state/atoms/ui.ts: Added isProcessingAtom to detect processing gaps
  • cli/src/ui/components/StatusIndicator.tsx: Updated to show indicator during processing
  • cli/src/ui/components/__tests__/StatusIndicator.test.tsx: Added test for the bug scenario

Testing

  • Added test that reproduces the exact bug scenario (checkpoint_saved followed by api_req_started with cost)
  • All 2079 CLI tests pass

@changeset-bot

changeset-bot Bot commented Jan 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 84dff1d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@kilocode/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@kilo-code-bot

kilo-code-bot Bot commented Jan 22, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

This PR adds a new isProcessingAtom to fill the gap when isStreamingAtom returns false but the task is still running. The implementation is clean and well-documented.

Key observations:

  • The logic correctly identifies processing states after checkpoint_saved and completed api_req_started messages
  • Proper error handling with try/catch and debug logging for JSON parsing
  • Tests cover the main scenarios: checkpoint saved, completion result, and tool approval states
  • No security concerns in this UI state management code
Files Reviewed (4 files)
  • .changeset/cli-processing-indicator.md - Changeset for patch release
  • cli/src/state/atoms/ui.ts - New isProcessingAtom derived atom
  • cli/src/ui/components/StatusIndicator.tsx - Integration of isProcessingAtom
  • cli/src/ui/components/__tests__/StatusIndicator.test.tsx - 3 new test cases

@marius-kilocode
marius-kilocode merged commit 292c885 into main Jan 23, 2026
12 checks passed
@marius-kilocode
marius-kilocode deleted the fix/cli-processing-indicator-5251 branch January 23, 2026 09:55
slamj1 pushed a commit to slamj1/kilocode that referenced this pull request May 16, 2026
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
jliounis pushed a commit to jliounis/kilocode that referenced this pull request May 18, 2026
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI doesn't show any indication stuff is happening

2 participants