GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(core): keep MCP prompts when a refresh fails by Tarquinen · Pull Request #62266 · anomalyco/opencode

Conversation

@Tarquinen

@Tarquinen Tarquinen commented Nov 6, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Issue for this PR

Closes #50918

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

If an MCP server says its prompts changed and the follow-up prompts/list fails, all of that server's prompts vanish from the command list, while the server still shows as connected. A failed refresh now keeps the previous prompts, the same way tools already work. If the very first listing fails, there are still no prompts. Same approach as #50920 by @feiiiiii5.

How did you verify your code works?

Ran opencode serve with a local MCP server whose second prompts/list fails. On dev its prompt disappeared from the command list after the refresh; on this branch it stays. Typecheck and the MCP tests pass.

Visual

<svg xmlns="http://www.w3.org/2000/svg" width="240" height="72" viewBox="0 0 240 72" fill="none" font-family="ui-monospace,Menlo,monospace" font-size="12">
  <style>
    .ping{animation:ping 4s ease-in-out infinite;opacity:0}
    @keyframes ping{0%,20%{opacity:0}35%,60%{opacity:.6}75%,100%{opacity:0}}
    @media (prefers-reduced-motion:reduce){.ping{animation:none;opacity:0}}
  </style>
  <rect x="1" y="1" width="238" height="70" rx="10" stroke="currentColor" stroke-opacity=".2"/>
  <text x="16" y="26" fill="currentColor" fill-opacity=".5">/commands</text>
  <text x="16" y="50" fill="currentColor">/flaky:greet</text>
  <g class="ping">
    <text x="130" y="26" fill="currentColor">list_changed</text>
    <text x="130" y="50" fill="currentColor">list failed</text>
    <path d="M118 44l6 6m0-6l-6 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
  </g>
</svg>

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Tarquinen
fix(core): keep MCP prompts when a refresh fails
6631393
opencodejr[bot]
opencodejr Bot reviewed Nov 6, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix works. I ran the #50918 reproduction on the base and on this branch. A prompts/list_changed followed by a failing prompts/list wipes the server's prompts to [] on the base while it still shows connected. With this change, greet stays and the 'failed to list MCP prompts' warning is still logged. The MCP tests pass apart from one process-cleanup timeout, which fails the same way on the base. tsc -b for packages/core is clean.

A failed refresh now skips both the state update and mcp.prompts.changed, which matches refreshTools. The first listing after connect still starts from [], and stop still sends the change event on teardown, so reconnects aren't affected.

The public API is unchanged.

No concerns.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Tarquinen
Tarquinen merged commit c72ce6c into dev Nov 7, 2026
16 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@Tarquinen
Tarquinen deleted the mcp-prompts-keep branch November 7, 2026 11:31
autonull pushed a commit to autonull/opencode_spacegraph that referenced this pull request Nov 7, 2026
@Tarquinen me
fix(core): keep MCP prompts when a refresh fails (anomalyco#62266)
e66bbd3
AbizardShafwan pushed a commit to AbizardShafwan/opencode that referenced this pull request Nov 9, 2026
@Tarquinen Abizard Sulaiman
fix(core): keep MCP prompts when a refresh fails (anomalyco#62266)
7c87fd0
@shuv1337 shuv1337 mentioned this pull request Nov 9, 2026
chore(sync): merge upstream dev for 2.2.6-shuv.2 shuv1337/shuvcode#479
Merged
@amrkmn amrkmn mentioned this pull request Nov 10, 2026
opencode 2.2.7 amrkmn/homebrew-tap#1224
Closed
1 task
This was referenced Nov 10, 2026
feat: opencode release v2.2.7 sprisa/opencode-server#85
Merged
Tool release: OpenCode 2 v2.2.7 (was v2.2.6) agent-sh/agnix#1823
Closed
@scottames-github-bot scottames-github-bot Bot mentioned this pull request Nov 16, 2026
chore(deps): update ⬆️ mise-packages scottames/dots#1166
Merged
1 task
@mkobit mkobit mentioned this pull request Nov 18, 2026
Update opencode from 2.2.6 to 2.2.7 mkobit/dotfiles#1099
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@opencodejr opencodejr[bot] opencodejr[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

MCP prompts/list failure wipes the cached prompt list and announces it as empty

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@Tarquinen
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.