From bcc84fd11eb20002403bf93fa6e31afb62bd1284 Mon Sep 17 00:00:00 2001 From: Michael Ramos Date: Tue, 13 Jan 2026 05:26:52 -0800 Subject: [PATCH] fix: remove agent_cycle from review to prevent wrong agent switch session.prompt with agent parameter handles the switch correctly Co-Authored-By: Claude Opus 4.5 --- apps/opencode-plugin/index.ts | 12 +----------- apps/opencode-plugin/package.json | 2 +- package.json | 2 +- packages/server/package.json | 2 +- 4 files changed, 4 insertions(+), 14 deletions(-) diff --git a/apps/opencode-plugin/index.ts b/apps/opencode-plugin/index.ts index 0845dc8..1fdb60e 100644 --- a/apps/opencode-plugin/index.ts +++ b/apps/opencode-plugin/index.ts @@ -103,19 +103,9 @@ Do NOT proceed with implementation until your plan is approved. const shouldSwitchAgent = result.agentSwitch && result.agentSwitch !== 'disabled'; const targetAgent = result.agentSwitch || 'build'; - if (shouldSwitchAgent) { - // Switch TUI display to target agent - try { - await ctx.client.tui.executeCommand({ - body: { command: "agent_cycle" }, - }); - } catch { - // Silently fail - } - } - // Use noReply: true to ensure message is created before we return // (same pattern as submit_plan tool to avoid race conditions) + // Note: We don't call agent_cycle here - session.prompt with agent handles the switch try { await ctx.client.session.prompt({ path: { id: sessionId }, diff --git a/apps/opencode-plugin/package.json b/apps/opencode-plugin/package.json index 265ef2d..40cb35f 100644 --- a/apps/opencode-plugin/package.json +++ b/apps/opencode-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@plannotator/opencode", - "version": "0.5.5", + "version": "0.5.6", "description": "Plannotator plugin for OpenCode - interactive plan review with visual annotation", "author": "backnotprop", "license": "BSL-1.1", diff --git a/package.json b/package.json index 98eb68f..867c814 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "plannotator", - "version": "0.5.5", + "version": "0.5.6", "private": true, "description": "Interactive Plan Review for Claude Code - annotate plans visually, share with team, automatically send feedback", "author": "backnotprop", diff --git a/packages/server/package.json b/packages/server/package.json index 2128b3d..1935da0 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,6 +1,6 @@ { "name": "@plannotator/server", - "version": "0.5.5", + "version": "0.5.6", "private": true, "description": "Shared server implementation for Plannotator plugins", "main": "index.ts", -- knotmirror 0.0.1