You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support Cursor models in OpenCode V2, including private models, exact variants, images, and OAuth login. OpenCode should manage history, permissions, tools, and compaction.
Use beta for the V2-only package and keep main as the existing release line. Publish reviewed 3.0.0-beta.N versions under the npm beta tag. The channel name identifies V2 compatibility, not a lower quality bar.
Current status
Hey @makeittech, #33 and #35 have merged into beta. I closed #34 as superseded because its changes are included in #35.
The merged V2 implementation includes 4932ff9 in beta (#35). It targets released @opencode/*2.0.6 and the provider/model API. OpenCode owns history, permissions, tools, and compaction while the adapter preserves the live Cursor catalog and exact variants.
This update keeps incomplete catalog discovery retryable instead of caching a partial inventory as complete. It also derives checkpoint occupancy without double-counting generated output and keeps terminal Run counters in provider metadata. Cursor receives the SDK's MCP tool-family allowlist, native shell streams complete, unsupported exec requests receive explicit replies, and native StrReplace stays declined.
npm run verify passed locally with 95 tests and the pinned-host acceptance gate; the check on #35 passed. Bounded live host-tool checks passed with Composer and Grok. In a separate synthetic Grok 4.7 500K run, OpenCode recorded one completed automatic compaction followed by a real shell call that verified a nonce from an earlier tool result (exit 0 and the expected final reply). That establishes post-compaction tool continuation for this bounded run, not a general reliability rate. An earlier tool-less turn was not reproduced, so its precise cause remains unverified. The acceptance report records the earlier checks; instruction priority with images and live opaque-reasoning replay still need verification.
Please keep this issue open through the remaining release checks and npm beta publication. Code review in #35 is complete.
Thanks for picking this up in #32, @makeittech. I pulled the current upstream refs and compared them with 3af03f6. The native V2 transport is largely intact, and preserving V1 through the ./v1 export makes sense.
I think this issue should remain open for now. There is no beta release on npm yet, and the planned release acceptance is not complete.
I also noticed that #32 said it must not merge into main yet, but it was merged there. origin/main and origin/beta currently contain identical trees. Was that intentional?
Before publishing 3.0.0-beta.2, I think these regressions need attention:
The CI workflow that ran npm run verify was removed. The release workflow now runs only the legacy smoke tests and build, skipping the V2 tests, package validation, and V2 loader smoke test.
The release workflow cannot advance 3.0.0-beta.2 to 3.0.0-beta.3. Its default bump produces 3.1.0, while a patch bump attempts arithmetic on 0-beta.2.
A dry run still commits, tags, and pushes changes.
BridgePool now spawns untracked overflow workers after reaching its configured maximum. Its kill() path also stops notifying active readers, which can leave V2 requests waiting during transport shutdown. The regression tests for these cases were removed.
OPENCODE_CURSOR_DEFAULT_CONTEXT_WINDOW and OPENCODE_CURSOR_DEFAULT_MAX_TOKENS remain documented, but the implementation now ignores them and uses hardcoded values.
I recommend fixing these before publishing the beta. I can prepare a narrow follow-up PR against the new dual-version layout if that would help.
Thanks @CasualDeveloper! This is exactly the direction I'd like to take.
I accidentally merged #32 into main while preparing the V2 work - wrong target on my side. I'm reverting that from main and preserving the V2 state on a new beta branch instead.
@makeittech I opened #34 as a small follow-up to your non-blocking observations on #33. It documents the reviewed manual -beta.N bump and exact-artifact release flow, and clarifies why the constants test intentionally launches Bun through process.execPath.
I left the permissive Number() parsing unchanged because strict decimal-only configuration is not currently required. The full local npm run verify gate and the upstream verify check are green.
@makeittech I amended #35 to 116fdfe because it had no review activity. The OpenCode id stays the stable catalog name, such as grok-4.6, and each variant sends Cursor's exact wire id. Please keep this issue open. Review is still in #35.
@makeittech I amended #35 to b368f25. In addition to stable wire ids for third-party models, it fixes grouping for Cursor's live parameter spellings (reasoning_effort and thinking flags) so they group into variants on one model rather than splitting into separate models. Please keep this issue open.
Activity
feat(plugin)!: port to OpenCode V2 beta
feat(plugin)!: port to OpenCode V2 beta
feat(plugin)!: port to OpenCode V2 beta
feat(plugin)!: use native Cursor transport on OpenCode V2
CasualDeveloper commentedon Aug 24, 2026
Thanks for picking this up in #32, @makeittech. I pulled the current upstream refs and compared them with
3af03f6. The native V2 transport is largely intact, and preserving V1 through the./v1export makes sense.I think this issue should remain open for now. There is no beta release on npm yet, and the planned release acceptance is not complete.
I also noticed that #32 said it must not merge into
mainyet, but it was merged there.origin/mainandorigin/betacurrently contain identical trees. Was that intentional?Before publishing
3.0.0-beta.2, I think these regressions need attention:npm run verifywas removed. The release workflow now runs only the legacy smoke tests and build, skipping the V2 tests, package validation, and V2 loader smoke test.3.0.0-beta.2to3.0.0-beta.3. Its default bump produces3.1.0, while a patch bump attempts arithmetic on0-beta.2.BridgePoolnow spawns untracked overflow workers after reaching its configured maximum. Itskill()path also stops notifying active readers, which can leave V2 requests waiting during transport shutdown. The regression tests for these cases were removed.OPENCODE_CURSOR_DEFAULT_CONTEXT_WINDOWandOPENCODE_CURSOR_DEFAULT_MAX_TOKENSremain documented, but the implementation now ignores them and uses hardcoded values.I recommend fixing these before publishing the beta. I can prepare a narrow follow-up PR against the new dual-version layout if that would help.
sdziupin commentedon Aug 24, 2026
Thanks @CasualDeveloper! This is exactly the direction I'd like to take.
I accidentally merged #32 into main while preparing the V2 work - wrong target on my side. I'm reverting that from main and preserving the V2 state on a new beta branch instead.
So the structure will be:
main: OpenCode V1 / plugin 2.x maintenance
beta: OpenCode V2 / plugin 3.x beta
Your proposed separation makes much more sense, especially while the V2 plugin API is still moving.
Once beta is in place, please feel free to target the V2 work there. Thanks for coordinating this and for the work!
CasualDeveloper commentedon Aug 25, 2026
Thanks @makeittech. I opened #33 against
betawith the release, CI, bridge-capacity, and configuration fixes discussed above.The full local
npm run verifygate passes, and the upstreamverifycheck is green. The PR is ready for review:#33
CasualDeveloper commentedon Sep 1, 2026
@makeittech I opened #34 as a small follow-up to your non-blocking observations on #33. It documents the reviewed manual
-beta.Nbump and exact-artifact release flow, and clarifies why the constants test intentionally launches Bun throughprocess.execPath.I left the permissive
Number()parsing unchanged because strict decimal-only configuration is not currently required. The full localnpm run verifygate and the upstreamverifycheck are green.feat: replace beta with a V2-only host-owned Cursor adapter
feat: replace beta with a V2-only host-owned Cursor adapter
feat: replace beta with a V2-only host-owned Cursor adapter
feat: replace beta with a V2-only host-owned Cursor adapter
feat: replace beta with a V2-only host-owned Cursor adapter
feat: replace beta with a V2-only host-owned Cursor adapter
feat: replace beta with a V2-only host-owned Cursor adapter
feat: replace beta with a V2-only host-owned Cursor adapter
CasualDeveloper commentedon Sep 22, 2026
@makeittech I amended #35 to
116fdfebecause it had no review activity. The OpenCode id stays the stable catalog name, such asgrok-4.6, and each variant sends Cursor's exact wire id. Please keep this issue open. Review is still in #35.feat: replace beta with a V2-only host-owned Cursor adapter
CasualDeveloper commentedon Sep 22, 2026
@makeittech I amended #35 to
b368f25. In addition to stable wire ids for third-party models, it fixes grouping for Cursor's live parameter spellings (reasoning_effortandthinkingflags) so they group into variants on one model rather than splitting into separate models. Please keep this issue open.feat: replace beta with a V2-only host-owned Cursor adapter
feat: replace beta with a V2-only host-owned Cursor adapter
feat: replace beta with a V2-only host-owned Cursor adapter
feat: replace beta with a V2-only host-owned Cursor adapter
feat: replace beta with a V2-only host-owned Cursor adapter
feat: replace beta with a V2-only host-owned Cursor adapter
fix: track Cursor SDK 1.0.37 protocol and catalog