Skip to content

fix(opencode): honor cli runtime for command routing#962

Closed
snvtac wants to merge 1 commit into
backnotprop:mainfrom
snvtac:snvtac/947-opencode-cli-runtime-last
Closed

fix(opencode): honor cli runtime for command routing#962
snvtac wants to merge 1 commit into
backnotprop:mainfrom
snvtac:snvtac/947-opencode-cli-runtime-last

Conversation

@snvtac

@snvtac snvtac commented Jun 24, 2026

Copy link
Copy Markdown

Summary

  • route OpenCode runtime selection through a shared helper so runtime: "cli" is an explicit first-class CLI path
  • avoid reading bundled HTML for CLI submit_plan, keeping source checkouts and CLI-only workflows independent of embedded assets
  • add OpenCode plugin hook coverage for /plannotator-last, /plannotator-annotate, /plannotator-review, and CLI submit_plan without bundled HTML

Issue

Fixes #947

Verification

  • bun test apps/opencode-plugin/*.test.ts
  • PATH="$PWD/apps/hook/node_modules/.bin:$PWD/packages/ui/node_modules/.bin:$PATH" BUN_INSTALL_CACHE_DIR="$PWD/../bun-cache" bun run typecheck
  • bun test
  • git diff --check
  • bun build embedded.ts --outfile dist/embedded.js --target bun --external @opencode-ai/plugin && bun build index.ts --outfile dist/index.js --target node (run from apps/opencode-plugin with the system Bun binary)

@backnotprop

Copy link
Copy Markdown
Owner

Closing this. #947 wasn't a routing bug, it was a frontend crash (same as #949), already fixed in 0.21.1. The runtime change doesn't touch it. Both paths served the same broken page.

Also, runtime: "cli" is a debug switch, not something users should set. Happy to take the resolveRuntimeExecutionMode cleanup as its own refactor if you want. Thanks.

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.

plannotator last renders blank page in manual workflow mode (OpenCode)

2 participants