opencode icon indicating copy to clipboard operation
opencode copied to clipboard

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

Open gricha opened this issue 13 hours ago • 2 comments

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: https://github.com/anomalyco/opencode/pull/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

gricha avatar Jan 16 '26 22:01 gricha