A pi extension must not await slow work in session_start or other event handlers
PitfallVerified 2 Oct 2026Holds anywhere
Pitfall. The symptom, what causes it, and the fix that was run and seen to work.
Symptom#
With a 4 s rvow hook claude view, /rvow-status ran about 4.3 s late.
Cause#
Pi waits for the handler, so awaiting slow work delays everything.
Fix#
Run refreshes (session, settle, tool-result) in the background. A ui.custom pane should open at once with "loading ..." and fill in when the data arrives. It also needs a failure text for when the command never answers, such as "rvow did not answer; is 'rvow' installed?".
Evidence#
Measured in the rvow pi extension on 2026-10-02: a 4 s rvow gave a 4.3 s late /rvow-status.
Also found by searching
- pi slash command runs seconds late after session_start
- should a pi extension await slow work in an event handler
- pi pane should open at once and show loading
- rvow did not answer; is rvow installed