1.1 KiB
| title | status | type | priority | created_at | updated_at |
|---|---|---|---|---|---|
| TUI session select panics: Handle::block_on called from within async context | completed | bug | normal | 2026-03-31T22:15:18Z | 2026-03-31T22:16:16Z |
When selecting a session in the TUI, a panic occurs because load_transcript_for_session (and load_transcript_for_agent) calls tokio::runtime::Handle::current().block_on() from within the tokio::main async context. block_on cannot be called from within an async context — the thread is already driving async tasks.
Root cause: transcript.rs lines 487-489 and 528-530 use Handle::current().block_on() which panics when the calling thread is already inside a tokio runtime (as it is, since main.rs uses #[tokio::main]).
Fix: Wrap both block_on calls with tokio::task::block_in_place(), which tells the multi-thread scheduler to move other tasks off the current thread before blocking.
Summary of Changes
Replaced with in both and (transcript.rs).
signals the tokio multi-thread scheduler to move other tasks off the current OS thread before blocking it, which is required when blocking from synchronous code called within an async context.