Skip to content

[FEATURE]: Support for --dir with opencode run for both local and remote sessions #12444

@BlankParticle

Description

@BlankParticle

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

The attach command supports --dir to specify the working directory, but run doesn't have this option when using --attach.

It would be useful to have --dir on run for both:

  • Local runs: change to that directory before starting
  • Remote runs with --attach: pass the directory to the remote server

Example usage:

opencode run --dir /path/to/project "do something"
opencode run --attach http://localhost:4096 --dir /path/to/project "do something"

I already made the PR before realising I needed the issue, #12443

Metadata

Metadata

Assignees

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussion

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions