--- # claudbg-0yk4 title: 'TUI: session message count always shows 0' status: completed type: bug priority: normal created_at: 2026-03-31T23:45:03Z updated_at: 2026-04-01T05:49:51Z --- In the TUI session list, the message count column always shows 0. The message count is not being populated from the database or computed correctly for the TUI. ## Summary of Changes In `src/tui/run.rs`: after building the session list from disk discovery, open the DB and query `session_id, COALESCE(project_path, ''), message_count` from the sessions table. Use `tokio::task::block_in_place` to run the async DB query from the synchronous TUI startup. Populate `msg_count` on each `SessionListItem` from the DB result.