Skip to content

fix(opencode): stop MCP SSE error reconnect loops - #39697

Merged
rekram1-node merged 1 commit into
devfrom
mcp-sse-loop
Jul 30, 2026
Merged

fix(opencode): stop MCP SSE error reconnect loops#39697
rekram1-node merged 1 commit into
devfrom
mcp-sse-loop

Conversation

@rekram1-node

Copy link
Copy Markdown
Collaborator

Summary

  • treat JSON-RPC error responses over MCP Streamable HTTP SSE as completed requests
  • prevent the MCP SDK transport from resuming an already-completed error stream
  • add a regression test covering a resumable SSE request returning Method not found

This ports the focused fix from #39671 to the dev branch. The upstream fix is modelcontextprotocol/typescript-sdk#1390.

Checks

  • bun test ./test/mcp/transport.test.ts (from packages/opencode)
  • bun typecheck (from packages/opencode)
  • bun install --frozen-lockfile --ignore-scripts

@rekram1-node
rekram1-node merged commit c1ee3c6 into dev Jul 30, 2026
10 checks passed
@rekram1-node
rekram1-node deleted the mcp-sse-loop branch July 30, 2026 16:26
DevFlex-AI added a commit to bolt-builder/bolt-cli that referenced this pull request Jul 30, 2026
fix(opencode): stop MCP SSE error reconnect loops (anomalyco#39697)
luismgluis pushed a commit to luismgluis/opencode-lm that referenced this pull request Jul 30, 2026
Up to c1ee3c6 fix(opencode): stop MCP SSE error reconnect loops (anomalyco#39697).

Conflicts resolved:
- .github/workflows/publish.yml — accept delete (fork cleanup).
- packages/app/src/components/help-button.tsx — kept fork HelpButton stub
  (return null to suppress floating opencode.ai link); kept upstream
  TabsInfoPopup unchanged below.
- packages/app/src/context/settings.tsx — kept fork 'settings.v5'
  persistence namespace and showCustomAgents: true default.
- packages/app/src/components/prompt-input.tsx — REVERTED to HEAD. Upstream
  refactored agent/model selector into a new ModelSelectorPopover
  component and restructured the JSX around it. The fork keeps the
  parallel v2 layout with ComposerAgentControl + ComposerModelControl
  helpers (used by the v2 composer region + plan agent orange theming).
  Reverting matches the strategy from the previous merge on
  session-composer-region.tsx — accept losing the architectural refactor
  to preserve fork behavior.
- packages/app/src/pages/home.tsx — REVERTED to HEAD. Upstream extracted
  the inline Home into a controller-based NewHome pattern
  (home-controller, home-projects-controller, home-sessions-controller,
  etc.). The fork keeps the inline Home component with server-synced
  projects, useSavedProjects, saveProjectsToServer, plan agent styling,
  and other UX customizations. Reverting matches the same strategy as
  session-composer-region.tsx and prompt-input.tsx.

New orphaned upstream files in tree (unused but harmless):
- packages/app/src/components/prompt-input-v2.tsx
- packages/app/src/components/prompt-input/* submodule
- packages/app/src/pages/home/home-*.ts/x (8 controller files)
- packages/session-ui/src/v2/components/prompt-input/*

These were added by upstream's controller-extraction refactors and remain
in the tree but are not referenced by the (reverted) fork files. Same
situation as session-composer-region-controller.ts after the previous
merge.
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