Remote access
Remote access lets another device, such as a phone, use Korev on your Mac.
The other device must be on a Tailscale network. Korev joins that network as its own device, so the Mac's Tailscale app can be on a different network. See How Korev uses Tailscale.
Turn it on
- Open Settings → Remote access.
- Turn on Remote access.
- The first time, click Sign in next to Tailscale, and sign in with the account your phone uses. Korev shows up in that network as
korev-<your Mac's name>. - Click Show code and scan the code with the Korev app. See Use Korev from your phone.
| Setting | Default | Meaning |
|---|---|---|
| Remote access | Off | Start the remote access server |
| Port | 7420 | The port the server listens on. It must be from 1024 to 65535. Korev restarts the server when you change it. |
How Korev uses Tailscale
Your Mac can have two Tailscale devices, and they are separate:
- The Mac's Tailscale app. It connects the whole Mac to one network.
- Korev's own device,
korev-<your Mac's name>. Korev runs it inside the app. It joins the network that you sign in to in Settings → Remote access.
The two devices can be on different networks. The Mac does not need the Tailscale app at all.
For example, the Mac's Tailscale app is on your employer's network, so you can reach work servers. You sign Korev in to your personal network, and your phone is on your personal network too. Then:
- The phone reaches Korev on your Mac.
- Your employer's network does not see Korev.
- The phone does not reach your employer's network.
Korev's device accepts connections only on the remote access port. It passes each connection to the server, which listens on 127.0.0.1. Other ports on the Mac stay closed to the network.
The pairing code has the address of Korev's device, not the address of the Mac's Tailscale app. So Korev shows the code only after you sign in.
Korev keeps its Tailscale sign-in in ~/Library/Application Support/Korev/tailscale. Its address stays the same when Korev restarts, so paired phones keep working.
Use a different Tailscale account
- Turn off Remote access.
- Delete
~/Library/Application Support/Korev/tailscale. - Turn on Remote access, click Sign in next to Tailscale, and sign in with the other account.
- Scan the new pairing code on each phone. Korev's address changes, so the old code does not work.
Pairing code
The pairing code is a QR code that holds this JSON:
{ "url": "http://100.101.102.103:7420", "token": "<token>" }Anyone who has the code can use Korev on your Mac. Do not share it.
Token
Every request must send Authorization: Bearer <token>. Korev makes the token the first time remote access starts. It is in ~/Library/Application Support/Korev/remote-token, and only your user can read the file.
To disconnect every device, click Revoke all in Settings → Remote access. Korev makes a new token, and each device must scan the new pairing code.
Calls
POST /call runs one Korev method. The request body is JSON:
{ "method": "transcript", "args": ["<session id>"] }The response is { "result": ... }. If the method fails, the response is { "error": "..." } with status 500. An unknown method, or a method that a remote device may not call, gets status 404.
A remote device can call only these methods:
getState, transcript, send, stop, respondPermission, newSession, closeSession, updateSession, createWorkspaces, archiveWorkspace, listBranches, listPullRequests, listIssues, slashCommands, changes, fileDiff, rangeChanges, listFiles, readFile, prStatuses, prThreads, createPr, fixChecks, resolveConflicts, mergePr, repoIcon, createAskChat, deleteAskChat.
The arguments for each method are the same as in KorevApi in korev-desktop/src/shared/api.ts.
Events
GET /events is a Server-Sent Events stream. Korev sends these events:
| Event | Data |
|---|---|
state | The full app state. Korev sends it again after each change. |
chat | { sessionId, item }. Korev sends the full chat item again each time it changes. |
toast | { title, tone } |
Connected devices
A device counts as connected while its /events stream is open. While remote access is on, a phone icon shows next to Settings at the bottom of the sidebar. The icon is green and shows a count when one or more devices are connected. It is red if the server did not start. Hold the pointer on the icon to see the device names, or click it to open Settings → Remote access.
To give a device a name, send the X-Korev-Device header on /events, for example X-Korev-Device: My iPhone. If a device sends no name, Korev shows its IP address.
An agent waits for an answer to a permission prompt, a question or a plan only while its turn runs. Send respondPermission before the turn ends.
Phone notifications
Korev sends a notification to your phone when an agent finishes or needs your input while the Korev window is not in focus. This is the same rule as for Mac notifications.
Korev phone app
A phone that is paired with the Korev app gets these notifications with no setup. The app asks for permission to show notifications the first time it connects. Tap a notification to open its workspace.
The Mac sends each notification through Expo's push service, which passes it to Apple or Google. The message holds the workspace name and the chat title. When you click Revoke all, Korev also stops sending notifications to all paired phones.
To make a client of your own get these notifications, send registerPushToken with an Expo push token (ExponentPushToken[...]) to /call. Send unregisterPushToken with the same token to stop them.
ntfy
Without the Korev app, Korev can send its notifications to your phone through ntfy.
- Install the ntfy app on your phone and subscribe to a topic. Pick a long topic name that nobody can guess.
- In Settings → General → Phone notifications, enter the topic URL, for example
https://ntfy.sh/<topic>.
On the public ntfy.sh server, anyone who knows the topic name can read its messages. Each message has the workspace name and the chat title. To keep them private, run your own ntfy server, for example on your Tailscale network.