cli: pair QR code encodes localhost link when server listens on 0.0.0.0
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- cli, networking
Línea de trabajo
Empieza por el comando opencode pair y sigue cómo selecciona la URL para el código QR cuando muestra tanto enlaces de loopback como de LAN. El issue proporciona una configuración reproducible y una solución alternativa con --url; compara esas salidas para encontrar el punto donde se selecciona la URL. Se considera terminado cuando el QR predeterminado codifica un enlace accesible desde otro dispositivo de la LAN.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 213k
- Forks
- 28.4k
- Merge medio
- 8 h 51 min
- PR fusionados (30 d)
- 289
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de anomalyco/opencode
-
reproduced
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
anomalyco/opencode#55369 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
reproduced
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
anomalyco/opencode#55351 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 72/100
anomalyco/opencode#55285 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
opencode on clean macos zsh .export path not working because it append and it fails because no ~/.zshrc filePosiblemente ocupada @fihaaade la tomó hace 1 día. Abiertoreproduced
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
anomalyco/opencode#55068 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
mcp: allowing an MCP tool by its documented name hides it; the bare name must be allowed tooAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
anomalyco/opencode#54919 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de anomalyco/opencode
Issues similares
-
enhancement good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
OWASP/cve-lite-cli#1335 ·
Los mantenedores suelen responder en 1 día
-
Windows: main-screen mouse tracking requires WT_SESSION, so it never enables inside herdr panesAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 66/100
code-yeongyu/senpi#3353 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Channels status: needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
mastra-ai/mastra#27093 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
enhancement needs-triage ui
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día