Repository navigation
feat(cli): pair remotely through OpenTunnel - #53837
Merged
Merged
Conversation
3 of 6 tasks
2 of 6 tasks
This was referenced Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #
Type of change
What does this PR do?
Lets the background service be reached remotely through OpenTunnel, and adds
opencode pair --remote.remoteservice setting (opencode service set|get|unset remote). Enabling it creates the OpenTunnel tunnel in the foreground first, so the restarted service only has to reattach; if creation fails, the setting stays off.remoteis on, the service attaches the tunnel in a background fiber after it starts serving, so startup never waits on it. The SDK reconnects through network failures; a rejected token or failed certificate stops it with one logged error. The tunnel closes with the service scope.urlsin/api/infowhile connected.packages/serveronly gains an optional getter for extra URLs onstart(); it knows nothing about OpenTunnel. No protocol or core changes.opencode pair --remoteenables remote if needed, waits for the tunnel, and prints only the tunnel's one-time connect link, with the QR code pointing only at the tunnel address.Depends on
@opentunnel/client@0.2.0, which was released for this on the same Effect version (4.0.0-rc.112), so there is one Effect copy in the lockfile.bunfig.tomlexempts@opentunnel/*from the minimum release age like our other first-party packages.How did you verify your code works?
bun run checkpasses.remotesetting (packages/cli/test/service.test.ts) and tunnel URLs appearing in and leaving/api/info(packages/server/test/process.test.ts).Screenshots / recordings
N/A (CLI output only).
Checklist
— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊