From 9f7cf1a6283de876cd7483f469fa1f5ac9a7a694 Mon Sep 17 00:00:00 2001 From: MartinWie Date: Tue, 3 Feb 2026 20:06:40 +0100 Subject: [PATCH] fix: always fall back to native clipboard after OSC52 OSC52 may report success but not actually work in some terminals. Previously, the code would early-return if OSC52 returned true, skipping the native clipboard method (osascript on macOS). This change removes the early return so both methods are attempted, ensuring clipboard copy works reliably across all terminal configurations. --- packages/opencode/src/cli/cmd/tui/util/clipboard.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/opencode/src/cli/cmd/tui/util/clipboard.ts b/packages/opencode/src/cli/cmd/tui/util/clipboard.ts index 5c27a26cd039..ad1f86e3070c 100644 --- a/packages/opencode/src/cli/cmd/tui/util/clipboard.ts +++ b/packages/opencode/src/cli/cmd/tui/util/clipboard.ts @@ -148,8 +148,9 @@ export namespace Clipboard { export async function copy(text: string): Promise { const renderer = rendererRef.current if (renderer) { - const copied = renderer.copyToClipboardOSC52(text) - if (copied) return + // Try OSC52 but don't early return - always fall back to native method + // OSC52 may report success but not actually work in all terminals + renderer.copyToClipboardOSC52(text) } await getCopyMethod()(text) }