Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@marius-kilocode
Copy link
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
Copy link

changeset-bot bot commented Jan 22, 2026

🦋 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

@kiloconnect
Copy link
Contributor

kiloconnect bot commented Jan 22, 2026

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

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

3 participants