cli: pair QR encodes custom JSON payload instead of plain connect URL
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- cli, networking
調査の方向性
opencode pair コマンドから始め、loopback と LAN の両方のリンクを出力するときに、QR コード用の URL がどのように選択されるかを追ってください。issue には再現可能な設定と --url を使った回避策が示されています。それらの出力を比較して、選択箇所を見つけてください。デフォルトの QR コードが、LAN 上の別のデバイスからアクセスできるリンクをエンコードすれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
When the background service listens on all interfaces (hostname 0.0.0.0), opencode pair prints two one-time links (loopback and LAN IP) but the QR code encodes the 127.0.0.1 link, which can never be reached from another device — so scanning it with a phone on the same network always fails.
Environment
- opencode version: v2.0.27 (latest channel)
- OS: Darwin 25.6.0 (darwin arm64), macOS MacBook Pro
- Terminal: Ghostty (TERM_PROGRAM=ghostty, TERM=xterm-ghostty, COLORTERM=truecolor)
- Shell: /bin/zsh
- Install/channel: latest release
- Active plugins: none found in config
Reproduction
opencode service set hostname 0.0.0.0thenopencode service start.- Run
opencode pair. - Observe the output: two links are printed — one to
http://127.0.0.1:<port>/auth/connect/...and one tohttp://<lan-ip>:<port>/auth/connect/.... - Scan the QR code with a phone on the same LAN (or decode it).
Expected Behavior
The QR code should encode the link reachable from other devices — i.e., the LAN IP link when bound to 0.0.0.0. At minimum, it should not encode the loopback address, which is unreachable by definition from any remote device.
Actual Behavior
The QR encodes http://127.0.0.1:<port>/auth/connect/.... Scanning it with a phone opens a page on the phone itself and fails; the user must manually retype the second printed URL to pair.
Sample output (token redacted):
Open a link to connect. Links work once and expire in 5 minutes.
http://127.0.0.1:49374/auth/connect/MG_...
http://192.168.x.x:49374/auth/connect/MG_...
Additional Context
- Consistently reproducible whenever the service is bound to a non-loopback hostname.
- Workaround that confirms intent:
opencode pair --url http://<lan-ip>:<port>prints only the LAN link, and the QR then encodes it correctly — so the fix likely just needs the default QR payload to prefer the non-loopback link when multiple are printed.
- 主要言語
- TypeScript
- スター
- 213k
- フォーク
- 28.4k
- 平均マージ
- 8時間 32分
- マージ済み PR(30日)
- 253
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
anomalyco/opencode のほかの issue
-
app: keybinds match the produced character, so Ctrl+F and other letter shortcuts fail on non-Latin layouts対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンreproduced
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
anomalyco/opencode#55676 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
tui: NumPad End/Home ignored under kitty keyboard protocol (Windows Terminal reports KP_END 57424)対応中かも @argszero が 1 日前に担当しました。 オープンreproduced
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
anomalyco/opencode#55533 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
pending close triaging
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
anomalyco/opencode#55392 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
anomalyco/opencode#55383 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
web: second Firefox tab never connects to /api/event - Cache-Control: no-cache lets Firefox's HTTP cache block concurrent SSE requests対応中かも @zonemeen が 1 日前に担当しました。 オープンreproduced
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
anomalyco/opencode#55369 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
anomalyco/opencode の issue をすべて見る
似ている issue
-
area:ui effort:S enhancement priority:P2
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
QuantumNous/new-api#7839 ·
メンテナーはふだん 1 日以内に返信
-
good first issue maintenance
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
dark-princezz/stellar-hooks#1010 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
interledger/rhyza#352 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信