OpenCode 1: a response no longer waits for the sidebar update

Draft
AN
4h ago
+198-85

Sticky, fallback/API-key and main completions awaited writeCurrentSidebarState (account reload + sidebar write) before returning the response. Now detached, ordered by request sequence so a late older write can't overwrite a newer state, failures logged once with a fixed message, and flushed within the dispose grace. Baseline test failed with 'Sticky response waited for the sidebar account reload'.


Summary by cubic

Makes OpenCode 1 route sidebar updates async so a response no longer waits for the sidebar write (account reload + state file write) to finish before returning.

  • Applies to sticky, fallback/API-key, and main completions.
  • Orders detached writes by request sequence so a late older write can't overwrite a newer sidebar state.
  • Logs write failures once with a fixed message and flushes pending writes within the dispose grace period.