Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Local copy writes the clipboard natively and via OSC 52 at once, racing the terminal (macOS)

オープン 初心者向け
#59,052 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
cli

調査の方向性

宛先「all-available」を使うTUIのクリップボード書き込みを見つけ、クリップボードサービスがローカルセッションとリモートセッションで「best-available」をどのように扱うかを確認してください。OSC 52をSSH向けに維持しながら、同時にローカルへ書き込まないようTUIのコピー動作を変更してください。ローカルで繰り返しコピーしてもAlacrittyの警告が表示されず、リモートコピーでは引き続きOSC 52が使われることが完了の条件です。

索引モデルが issue の本文から書いたものです。

説明

Description

Since upgrading from 1.18.30 to 2.1.4, copying text in the TUI often makes Alacritty show:

[WARN] Unable to store text in clipboard: NSPasteboard#writeObjects: returned false

The TUI's clipboard write uses destination: "all-available", which starts the in-process host write and emits OSC 52 at the same moment. Locally, the terminal then writes the same pasteboard concurrently, and one of the two writes is rejected. The text still lands, but the terminal shows the warning.

1.18.30 also did both, but OSC 52 went first and the native write was a spawned osascript, so the two never overlapped.

The clipboard service already has "best-available" (host first, OSC 52 only if the host write fails or the session is remote). Using that for TUI copies would keep OSC 52 for SSH, where it's needed, and avoid the double write locally.

Plugins

@tarquinen/opencode-dcp, plus two local plugins (none touch the clipboard)

OpenCode version

2.1.4 (Homebrew)

Steps to reproduce
  1. Run opencode in Alacritty on macOS (default terminal.osc52 = "OnlyCopy"), not over SSH.
  2. Select text to copy, a few times.
  3. Alacritty intermittently shows the warning above.
Operating System

macOS 27.0.1

Terminal

Alacritty 0.17.0

主要言語
TypeScript
スター
221k
フォーク
29.6k
平均マージ
5時間 22分
マージ済み PR(30日)
531

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

anomalyco/opencode のほかの issue

anomalyco/opencode の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。