Skip to main content

clear_resume_failed

Function clear_resume_failed 

Source
pub fn clear_resume_failed(
    mstore: &Arc<Store>,
    event_bus: &Option<Arc<EventBus>>,
    block_id: &str,
)
Expand description

Clear session:resume_failed — the counterpart to mark_resume_failed, called when a resume attempt ultimately resolves as Resumed, or when a fresh spawn carries AgentMux’s record of the conversation forward (persistent/resume_retry.rs’s carry_continuation).

mark_resume_failed fires from the stderr reader the instant the CLI says “No conversation found”, which is before persistent/resume_retry.rs’s retry_after_resume_failure runs its recovery scan. In the common case that scan finds the real, live on-disk session and resumes it (live-confirmed in docs/status/STATUS_STALE_RESUME_LIVE_REPRO_AND_FIX_PLAN_2026_08_23.md §2), the conversation was NOT lost — but nothing cleared the flag, so the pane kept showing “Couldn’t resume the previous conversation — started a new one” while the agentmux_session_outcome divider in the same transcript said resumed. Two disclosure surfaces contradicting each other is worse than either alone, so the flag now tracks the resolved outcome.

Skips both the write and the broadcast when the flag isn’t currently set — a Resumed outcome is the overwhelmingly common case and almost never follows a failure, so the no-op path must not spam waveobj:update on every ordinary resume.