Skip to content

Unable to choose models when using opencode attach http://<tailscale-ip>:port #25826

Description

@kevinher7

Description

Although I can perfectly use opencode in this attach session (with the default Big Pickle model), once I try to change models I get the following error (see the end of the issue)

  • I can correctly models both at the "host" computer (via ssh and then manually running opencode) and also from the "attached" computer (via just running opencode normally)

  • In my current setup, the "host" is running NixOS (configuration here if useful) while the "attached" computer is running MacOS Tahoe (26.3) with an M1 chip

TypeError: undefined is not an object (evaluating 'G().length')
    at when (/$bunfs/root/src/index.js:886:12786)
    at <anonymous> (/$bunfs/root/src/index.js:882:75617)
    at h_ (/$bunfs/root/src/index.js:882:64605)
    at T9 (/$bunfs/root/src/index.js:882:64369)
    at i_ (/$bunfs/root/src/index.js:882:63287)
    at h_ (/$bunfs/root/src/index.js:882:64605)
    at T9 (/$bunfs/root/src/index.js:882:64369)
    at i (/$bunfs/root/src/index.js:882:58249)
    at I0 (/$bunfs/root/src/index.js:882:75663)
    at q4 (/$bunfs/root/src/index.js:882:60979)
    at h_ (/$bunfs/root/src/index.js:882:64605)
    at T9 (/$bunfs/root/src/index.js:882:64369)
    at v_ (/$bunfs/root/src/index.js:882:62385)
    at <anonymous> (/$bunfs/root/src/index.js:886:12760)
    at q4 (/$bunfs/root/src/index.js:882:60979)
    at h_ (/$bunfs/root/src/index.js:882:64605)
    at T9 (/$bunfs/root/src/index.js:882:64369)
    at v_ (/$bunfs/root/src/index.js:882:62385)
    at q4 (/$bunfs/root/src/index.js:882:60979)
    at h_ (/$bunfs/root/src/index.js:882:64605)
    at T9 (/$bunfs/root/src/index.js:882:64369)
    at v_ (/$bunfs/root/src/index.js:882:62385)
    at <anonymous> (/$bunfs/root/src/index.js:882:119577)
    at h_ (/$bunfs/root/src/index.js:882:64605)
    at T9 (/$bunfs/root/src/index.js:882:64369)
    at a8 (/$bunfs/root/src/index.js:882:57794)
    at W (/$bunfs/root/src/index.js:882:119564)
    at h_ (/$bunfs/root/src/index.js:882:64605)
    at T9 (/$bunfs/root/src/index.js:882:64369)
    at a8 (/$bunfs/root/src/index.js:882:57794)
    at f (/$bunfs/root/src/index.js:882:119173)
    at <anonymous> (/$bunfs/root/src/index.js:883:132017)
    at q4 (/$bunfs/root/src/index.js:882:60979)
    at h_ (/$bunfs/root/src/index.js:882:64605)
    at T9 (/$bunfs/root/src/index.js:882:64369)
    at v_ (/$bunfs/root/src/index.js:882:62385)
    at <anonymous> (/$bunfs/root/src/index.js:882:75752)
    at h_ (/$bunfs/root/src/index.js:882:64605)
    at T9 (/$bunfs/root/src/index.js:882:64369)
    at nQ (/$bunfs/root/src/index.js:882:66222)
    at r_ (/$bunfs/root/src/index.js:882:67177)
    at VL0 (/$bunfs/root/src/index.js:882:66517)
    at J5 (/$bunfs/root/src/index.js:882:66413)
    at K (/$bunfs/root/src/index.js:883:12459)
    at replace (/$bunfs/root/src/index.js:883:133350)
    at onSelect (/$bunfs/root/src/index.js:994:17337)
    at trigger (/$bunfs/root/src/index.js:905:20001)
    at a (/$bunfs/root/src/index.js:928:5864)
    at onKeyDown (/$bunfs/root/src/index.js:928:7391)
    at <anonymous> (/$bunfs/root/src/index.js:936:4249)
    at <anonymous> (/$bunfs/root/chunk-2mmvm5jr.js:80:40856)
    at emitWithPriority (/$bunfs/root/chunk-2mmvm5jr.js:3:32993)
    at processParsedKey (/$bunfs/root/chunk-2mmvm5jr.js:3:32057)
    at handleStdinEvent (/$bunfs/root/chunk-2mmvm5jr.js:100:5104)
    at <anonymous> (/$bunfs/root/chunk-2mmvm5jr.js:100:4973)
    at drain (/$bunfs/root/chunk-2mmvm5jr.js:32:6460)
    at drainStdinParser (/$bunfs/root/chunk-2mmvm5jr.js:100:4945)
    at <anonymous> (/$bunfs/root/chunk-2mmvm5jr.js:100:2763)
    at emit (node:events:95:22)
    at addChunk (internal:streams/readable:264:47)
    at readableAddChunkPushByteMode (internal:streams/readable:242:18)
    at internalRead (native:38:40)
    at processTicksAndRejections (native:7:39)...

Plugins

None I believe

OpenCode version

1.14.35

Steps to reproduce

  1. Configure opencode in home manager via the following
{ config, lib, ... }:
{
  programs.opencode = {
    enable = true;
    # tui.themes = "nord";
  };

  systemd.user.services.opencode-web = {
    Unit = {
      Description = "OpenCode Web Service";
      After = [ "network.target" ];
    };

    Service = {
      ExecStart = "${lib.getExe config.programs.opencode.package} serve --hostname 0.0.0.0 --port 4096";
      WorkingDirectory = "/home/uribo/nixos-config";
      Restart = "always";
      RestartSec = 5;
      # TODO: add EnvironmentFile with sops-nix password
    };

    Install = {
      WantedBy = [ "default.target" ];
    };
  };
}
  1. Ensure both hosts have tailscale running and then attach using `opencode attach http://:4096

  2. Attempt to change models via /models

  3. Get the error with the screen in the screenshot section

Screenshot and/or share link

Image

Operating System

macOS 26.3 and NixOS (25.11 stable)

Terminal

Ghostty

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions