opencode
opencode copied to clipboard
opencode run --attach <server>
With the creation of opencode serve and opencode attach for connecting with TUI
It would be awesome to have opencode run attachable to a headless opencode server.
That would be great to reduce a lot the mcp servers cold boot time that happen at every opencode run to only the first query
Thanks to every people working on opencode, seeing a new release always light up my day
This issue might be a duplicate of existing issues. Please check:
- #3166: Add
--sessionflag toattachcommand - This was already implemented and closed, adding session support to the attach command which is similar to your request for attachable run command - #3165: Add
--sessionflag toattachcommand to continue session via already running headless server - Another duplicate of the same functionality that was implemented
While these issues focused on the attach command with session support, your request for opencode run --attach <server> to reduce MCP server cold boot time appears to be a related but distinct feature request for making the run command work with existing servers rather than starting fresh each time.
Feel free to ignore if none of these address your specific case.
hey thanks!
Adding headless support should be easy here, we have an example for how to do it in another cmd/*.ts file (since opencode can attach)
@rekram1-node check #3889
already did :)