DEV Community

Cover image for Bringing Claude's "Dispatch" Experience to Gemini and OpenCode
Onur Cinar
Onur Cinar

Posted on

Bringing Claude's "Dispatch" Experience to Gemini and OpenCode

Claude’s "Dispatch" feature nailed the mobile-to-desktop UX. Being able to pull out your phone, delegate a heavy refactoring task to your local machine, and monitor its progress asynchronously is a massive quality-of-life upgrade.

But if your daily drivers are CLI-native AI tools like Gemini or OpenCode, you might feel locked out of that seamless remote workflow. Because these tools run in your terminal rather than a proprietary desktop app, they lack a native mobile bridge.

You don't have to abandon your favorite CLI tools to get that experience. By combining Tailscale and the modern terminal multiplexer Zellij, you can build a universal "Dispatch" layer.

The best part? You aren't just sending a fire-and-forget command. You get the exact same interactive, conversational experience on your phone as you do sitting at your mechanical keyboard.

Here is how to set up your own sovereign, mobile-to-local AI command center.


The Missing Link: Zellij Web + Tailscale

The core magic of Claude Dispatch is simply a secure, persistent, remotely accessible session. We can replicate this entirely using open-source infrastructure.

To bridge the gap between your smartphone browser and your local desktop terminal, we need two components:

  1. Tailscale: This creates a secure overlay network. We will use Tailscale to safely pipe a local port out to your devices.
  2. Zellij: This is the crucial piece. Zellij is a Rust-based terminal multiplexer with a robust Web Client. Unlike SSH apps, which can be clunky on mobile, Zellij renders a fully responsive terminal UI directly in your mobile browser.

Setting Up Your "Dispatch" Server

On your primary development machine—where your code, compilers, and AI tools live—you need to prepare the web session. Zellij takes privacy seriously, so the web client requires an authentication token and binds strictly to localhost by default.

1. Create the Authentication Token

Before starting the web UI, generate your secure login token:

zellij web --create-token
Enter fullscreen mode Exit fullscreen mode

Make sure to copy and save the outputted token. You will need it to authenticate when you connect from your smartphone.

2. Start the Zellij Web Server

Next, start the web server and specify the port you want to use:

zellij web --port 4000
Enter fullscreen mode Exit fullscreen mode

3. Expose the Port via Tailscale

Because Zellij is safely listening only on localhost, you cannot reach it from your phone yet. Instead of exposing this to the public internet, we use Tailscale Serve to proxy that local port exclusively to your private Tailnet.

Run this in a new terminal tab:

tailscale serve --bg --https=4000 localhost:4000
Enter fullscreen mode Exit fullscreen mode

The Remote Workflow in Action

The real power of this setup is the seamless handoff. You don't need to craft complex, single-shot prompt strings. The interaction is identical to typing directly into your desktop CLI.

Imagine you are deep into building a Go project. You are sitting at your desk, iterating on some validation logic with OpenCode or Gemini open in your terminal. You realize you need to leave the house, but the task isn't done.

Here is how the dispatch workflow plays out:

1. The Mobile Handoff

While waiting in line for coffee, you open Chrome or Safari on your phone and navigate to your Tailscale URL (https://my-dev-box.domain.ts.net:4000).

After pasting in your authentication token, you are instantly dropped right back into your active desktop terminal. You see the exact same interactive AI prompt you were looking at on your monitor moments ago.

2. Chat and Dispatch

Because you are in a live, interactive session, you just talk to the CLI naturally. You type into your phone:

"I need to head out for a bit. Can you run the tests for the checker package, figure out why the struct validation is failing, and apply the fix?"

The AI acknowledges the request and begins its loop—reading your local files, executing go test, and analyzing the output.

3. Detach and Walk Away

This is the "Dispatch" moment. You simply close your mobile browser tab and put your phone in your pocket.

Because Zellij is managing the session natively on your local hardware, the AI continues to run uninterrupted. It has full access to your local environment to do the heavy lifting.

4. Asynchronous Monitoring

Check back 20 minutes later. Reopen the URL on your phone, and your terminal state is exactly how you left it.

If the AI successfully refactored the code and the tests are green, the output is waiting for you. If it ran into a file-permission error, or if OpenCode paused to ask, "Do you want me to commit these changes?", the interactive prompt is right there in your mobile browser, patiently waiting for your reply.

5. The Seamless Return to Desktop

When you finally get back home, the magic of Zellij really shines. You don't have to sync anything, pull down remote cloud changes, or wonder what the AI did while you were gone. You simply sit down at your physical monitor, attach to the running Zellij session, and pick up exactly where you left off. The AI's responses, the shell history, and the code changes are all right there waiting for you.


Why This Approach Scales

Retrofitting your existing AI workflow with Zellij and Tailscale doesn't just mimic Claude Dispatch; it arguably surpasses it for power users.

  • Agnostic Architecture: You aren't locked into one provider's ecosystem. You can use this exact workflow for Gemini, OpenCode, or any future terminal-based AI.
  • Frictionless UI: You don't need a dedicated mobile app or complex SSH key management on your phone. Any modern web browser becomes a window into your live terminal.
  • Unrestricted Environment: Your AI operates natively. It has full, unrestricted access to your actual development environment—your local databases, Docker containers, and raw file system—without needing to sync cloud workspaces.

By adding this networking layer, you transform your standard interactive CLIs from desktop-bound tools into true asynchronous agents that travel with you, keeping you in the loop wherever you are.

Top comments (0)