Skip to content

feat(provider-switch): choose the destination from a provider picker #756

Closed

Description

@Juliusolsson05

Problem

The session-level Switch Provider command still advances to the next provider in registry order. That interaction was tolerable with two providers because there was only one destination, but after OpenCode support it hides valid choices behind repeated destructive transcript conversions and makes the command appear Claude/Codex-only.

Current behavior

Running Switch Provider immediately selects the next declared target and starts translation. The user cannot choose Claude, Codex, or OpenCode explicitly.

Expected behavior

Running Switch Provider opens a keyboard- and pointer-accessible destination picker, consistent with the new-agent provider chooser. It captures the command-target session, shows every declared switch target except the current provider, and performs exactly one conversion after selection.

Acceptance criteria

  • Claude, Codex, and OpenCode destinations are derived from the provider capability registry.
  • The current provider is shown as context but is not selectable as a destination.
  • The picker targets the session captured when the command ran, including Dispatch command targeting.
  • Arrow keys, Enter, Escape, hover, and click work consistently with existing pickers.
  • Closing without selection does not mutate the session.
  • Switching retains existing progress, errors, empty-session behavior, MCP metadata, and pane placement.
  • Behavioral tests cover target enumeration, captured-session routing, selection, and cancellation.

Activity

  1. Juliusolsson05 commented on Sep 3, 2026

    @Juliusolsson05
    OwnerAuthor

    Scope clarification from the existing new-agent contract: when OpenCode is a valid destination, the picker will expose both OpenCode (structured HTTP/SSE) and OpenCode Terminal (managed native TUI) as separate rows backed by the same provider transcript adapter. The chosen runtime flavor is carried only into the replacement spawn; it is not modeled as a duplicate provider kind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions