Skip to content

Bug: attach --dir works incorrectly when using with remote server #8981

Closed

Description

@gricha

Description

opencode attach --dir does not work correctly when you try to use it with a remote server. It performs client side validation of whether a directory is valid in the context of local machine which breaks when you want to pass that flag to the server.

For instance, from my local machine, you cannot run
opencode attach http://docs:4096 --dir /home/workspace/perry

if my $HOME is different locally.

Proposed minimal fix: #8969

Plugins

none

OpenCode version

1.1.24

Steps to reproduce

Set up remote server over tailnet/somehow accessible

Try to attach with a directory that doesn't exist on the local machine. Example:
opencode attach http://docs:4096 --dir /home/workspace/perry

Screenshot and/or share link

No response

Operating System

Ubuntu 24.04

Terminal

Ghostty

Activity

  1. github-actions commented on Jan 16, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. gricha commented on Jan 16, 2026

    @gricha
    ContributorAuthor

    Fixed in #8969 - created an issue because it labeled my PR.

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions