Skip to content

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

Closed
antauth-alfonso[bot] wants to merge 2 commits into
mainfrom
fix/oc1-sidebar-detach
Closed

antauth-alfonso[bot] wants to merge 2 commits into
mainfrom
fix/oc1-sidebar-detach

Conversation

@antauth-alfonso

@antauth-alfonso antauth-alfonso Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

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.

Written for commit c1d6071. Summary will update on new commits.

View guided diff Turn on auto-fix

Keep route attribution ordered across detached account reloads and drain pending route writes within the existing advisory shutdown grace. Extend the sticky model-reselection test with a held reload and stale-write race, and explicitly wait in sidebar assertions that used to rely on fetch completion.
@antauth-alfonso

Copy link
Copy Markdown
Author

Squash-merged to main as 635c126.

@antauth-alfonso antauth-alfonso Bot closed this Nov 18, 2026
@ualtinok
ualtinok deleted the fix/oc1-sidebar-detach branch November 18, 2026 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant