Skip to content

fix: keep v2 sync status read-only - #1

Open
iHildy wants to merge 8 commits into
jvacek:feat/v2-dual-supportfrom
iHildy:ian/pr81-safe-v2-commands
Open

iHildy wants to merge 8 commits into
jvacek:feat/v2-dual-supportfrom
iHildy:ian/pr81-safe-v2-commands

Conversation

@iHildy

@iHildy iHildy commented Sep 23, 2026

Copy link
Copy Markdown

Why

In PR #81, OpenCode v2 treats session.synthetic output from /sync-status as a new prompt. In a packed-plugin smoke test, the model then called opencode_sync with command: init without a user request to initialize. A separate check showed resume: false prevents that follow-up but leaves the result outside the visible transcript.

Change

  • Keep all opencode_sync tool operations available on v2, including status, init, and link.
  • Do not register /sync-* slash commands on v2 until there is a safe, visible command result channel. V1 slash commands remain available.
  • Rewrite v1 slash-command hints in v2 tool results to show the equivalent opencode_sync arguments.
  • Update README and v2 docs to describe the difference.

Verification

  • bun run check, bun test (202 pass), bun run build.
  • Packed the branch and loaded it in an isolated OpenCode v2.0.13 profile. The plugin appears in plugin list, while command.list contains no sync-* commands.
  • In a live v2 session, opencode_sync with { "command": "status" } returned visible tool content and made no configuration change.
  • The two-instance v1 model-driven test reached plugin startup but stopped before sync-init because the available free model rejected API use; an OpenAI OAuth retry failed token refresh with 401. No sync logic was exercised in those runs.

This PR is based on the exact head of PR #81, so the diff against that branch is limited to this safety fix.

Test User and others added 4 commits September 22, 2026 19:27
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