Skip to content

Fix: command palette resume uses the focused pane's actual provider - #411

Merged
Juliusolsson05 merged 1 commit into
mainfrom
fix/opencode-palette-resume
Jul 6, 2026
Merged

Juliusolsson05 merged 1 commit into
mainfrom
fix/opencode-palette-resume

Conversation

@Juliusolsson05

Copy link
Copy Markdown
Owner

Bug

The command palette's resume flow determined the provider in three places with focusedProvider === 'codex' ? 'codex' : 'claude' — a binary negation that silently collapsed every non-codex kind to Claude. Now that OpenCode is a registered provider (phase 7, #408):

  • the resume picker for an opencode-focused pane listed Claude sessions (listSessionsForCwd), and
  • resuming spawned a Claude pane (replaceSession / resume descriptor)

…even though the picker header already displayed "resume opencode" — a visible inconsistency.

Fix

Derive one resumeProvider from the focused pane's real kind (guarded by isAgentProviderKind; terminal/unknown fall back to DEFAULT_PROVIDER) and use it at all three sites. An opencode pane now correctly lists opencode sessions (empty today — opencode has no offline session listing yet, #406 blocker 1 — the honest result, versus wrongly showing Claude sessions) and resumes into an opencode pane.

Verification

  • tsc -p tsconfig.node.json → 0 · tsc --noEmit -p tsconfig.web.json → 0
  • electron-vite build ✓ · npm test → 170/170

🤖 Generated with Claude Code

The palette's resume flow determined the provider three ways with
`focusedProvider === 'codex' ? 'codex' : 'claude'` — a binary negation
that silently collapsed every non-codex kind to Claude. Now that OpenCode
is a registered provider (phase 7, #408), an opencode-focused resume
picker listed CLAUDE sessions (listSessionsForCwd), and resuming spawned a
CLAUDE pane — even though the picker header already read "resume opencode".

Derive one `resumeProvider` from the focused pane's real kind (guarded by
isAgentProviderKind; terminal/unknown fall back to DEFAULT_PROVIDER) and
use it at all three sites. An opencode pane now correctly lists opencode
sessions (empty today — opencode has no offline session listing yet,
#406 blocker 1 — which is the honest result, versus wrongly showing Claude
sessions) and resumes into an opencode pane.

Verified: tsc node+web 0; build ok; 170/170 tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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