Skip to content

bug+feat: spinner freeze during tool execution + better spinner style with animated dots #51

@VforVitorio

Description

@VforVitorio

Bug: spinner freezes during tool execution

model.act() calls tool functions synchronously inside the coroutine. The asyncio event loop is fully blocked during the tool call — the keepalive task cannot run. Affects list_files, run_shell, read_file, etc.

The asyncio keepalive only helps during prefill (HTTP await). Cannot move model.act() to a background thread without event loop mismatch (AsyncTaskManager is bound to the main loop).

Consolidates #39.

Feat: better spinner style

Replace the current static thinking… text with:

  1. Animated dots cycling on the text: thinking.thinking..thinking... → repeat (every ~0.3 s via the keepalive tick)
  2. State machine labels that reflect what the model is actually doing (see issue feat: dynamic status label in spinner — thinking / working / finishing #45)
  3. Spinner style — consider circleHalves (◐◓◑◒) or keeping dots but with full ACCENT violet on both the spinner char and the text

Steps to reproduce freeze

  1. Run lmcode with a model loaded
  2. Ask: lista los archivos de src
  3. Observe spinner freezes while list_files executes

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions