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 codemode on legacy MCP entries by tneemo · Pull Request #59126 · anomalyco/opencode

Conversation

@tneemo

@tneemo tneemo commented Oct 26, 2026 •
edited by opencode-agent Bot
Loading

Uh oh!

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

Copy link
Copy Markdown

Issue for this PR

Closes #59115

Type of change

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

What does this PR do?

A legacy mcp.<name> entry is decoded with ConfigMCPV1.Info and rebuilt by ConfigMigrateV1.migrateMcp. The V1 local and remote schemas had no codemode field, so the decode stripped it, and migrateMcp didn't copy it. codemode: false was dropped with no diagnostic and the server stayed wrapped by Code Mode. The same key under mcp.servers.<name> already worked.

This adds an optional codemode boolean to both V1 schemas and copies it in both migrateMcp branches. When the key is omitted it stays unset, so McpCodeModeDefaultsPlugin still applies its defaults.

How did you verify your code works?

  • New tests in packages/core/test/config/normalization.test.ts cover local and remote legacy entries with codemode: false, and with the key omitted. Without the fix, the two codemode: false cases fail (Expected: false, Received: undefined).
  • bun run test test/config test/v1-migration.test.ts in packages/core: 294 pass, 0 fail.
  • bun run test in packages/core: 6523 pass, 365 skip, 0 fail.
  • bun run typecheck:tsc in packages/core passes.
  • oxlint on the touched directories reports 0 warnings and 0 errors.

Screenshots / recordings

Not a UI change.

Checklist

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

Added by the opencode bot (AI-generated).

Public API: legacy mcp.<name> entries now honour codemode, matching mcp.servers.<name> (backwards compatible)

Sorry, something went wrong.

Uh oh!

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

All reactions
@tneemo
fix(core): keep codemode on legacy MCP entries
b7903ce
Copilot AI balanced review requested due to automatic review settings October 26, 2026 01:53
Copilot AI reviewed Oct 26, 2026

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

Sorry, something went wrong.

Uh oh!

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

All reactions
opencode-agent[bot]
opencode-agent Bot reviewed Oct 26, 2026
View reviewed changes

@opencode-agent opencode-agent 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.

Looks good. I called ConfigNormalize.normalize in both checkouts. On the base, a legacy mcp.<name> local or remote entry loses codemode: false and reports no diagnostic. With this change it is kept. Leaving the key out still leaves it unset, so McpCodeModeDefaultsPlugin still applies its defaults. An invalid legacy value such as "no" now gets the same 'malformed' diagnostic as the mcp.servers.<name> shape. I couldn't run opencode debug config from source: its background server fails with Cannot find module 'react/jsx-dev-runtime' on the base too. The new normalization tests and typecheck:tsc pass.

Public API: the legacy flat mcp.<name> config shape now accepts and honours the existing codemode key, the same way mcp.servers.<name> already does. This is backwards compatible: configs without the key behave as before. Nothing else changes.

No blocking concerns.

Sorry, something went wrong.

Uh oh!

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

All reactions
@rekram1-node
rekram1-node enabled auto-merge (squash) October 26, 2026 16:57
@rekram1-node
rekram1-node disabled auto-merge October 26, 2026 16:57
@rekram1-node
rekram1-node merged commit 9ed37f8 into anomalyco:dev Oct 26, 2026
15 checks passed

Uh oh!

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

@tneemo
tneemo deleted the fix/legacy-mcp-codemode branch October 26, 2026 19:37
@mradwankhalil mradwankhalil mentioned this pull request Oct 27, 2026
config: codemode: false is silently dropped from legacy mcp.<name> entries #59115
Closed
@amrkmn amrkmn mentioned this pull request Oct 27, 2026
opencode 2.2.0 amrkmn/homebrew-tap#1182
Closed
1 task
@github-actions github-actions Bot mentioned this pull request Oct 28, 2026
Tool release: OpenCode 2 v2.2.0 (was v2.1.4) agent-sh/agnix#1737
Closed
This was referenced Oct 29, 2026
chore(upstream): порт v2.2.1 — 71 в порт, 67 на решение gpt-mem/opencode-mem#219
Open
chore(upstream): порт v2.2.2 — 27 в порт, 88 на решение gpt-mem/opencode-mem#220
Open
@BeppeTemp BeppeTemp mentioned this pull request Nov 6, 2026
MCP clients hide Cartographer's tools behind code mode / tool search, so the agent does not use the KB on its own BeppeTemp/cartographer#1714
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@opencode-agent opencode-agent[bot] opencode-agent[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.

config: codemode: false is silently dropped from legacy mcp.<name> entries

Uh oh!

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

3 participants

@tneemo @rekram1-node
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 01402792 — 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.