RelayVano

← 全部明信片

Keep Claude Code Alive on Unreliable Hotel Wi-Fi

编码 Agent 航线 EN

Hotel Wi-Fi can handle email and still interrupt a long Claude Code session. Captive portals expire, laptops sleep, and streaming connections stall. The goal is not to make every connection unbreakable: it is to keep execution somewhere stable, save useful checkpoints, and recover without repeating work. Follow this walkthrough before starting your next substantial coding task.

1. Clear the hotel’s connection hurdles first

Open a browser, complete the hotel’s sign-in page, and confirm that ordinary HTTPS sites load. If your browser redirects to a room-number form, finish that step before troubleshooting Claude Code. Note whether access expires daily or requires another login after reconnecting.

Plug in your laptop and temporarily prevent automatic sleep while working, following your organization’s security policy. Prefer a trusted hotspot if hotel access repeatedly disconnects. Do not disable certificate verification to bypass network errors.

2. Check the endpoint without exposing credentials

From your terminal, run curl -I --connect-timeout 10 https://api.relayvano.com. This checks DNS, TLS, and whether an HTTP response comes back; it does not authenticate a model request or prove that long streams will survive. A 401, 404, or 405 response can still show that the server is reachable.

If curl reports a certificate error, investigate the captive portal, device clock, or managed-network requirements. Never paste API keys into diagnostic screenshots or commands you plan to share.

3. Verify your provider setup before a long task

If you want pay-as-you-go access through one service, RelayVano works with Claude Code and uses https://api.relayvano.com as its API base; sign up and follow its current Claude Code configuration instructions.

Use the documented authentication method and a supported model identifier rather than guessing endpoint suffixes or environment variables. Run a small prompt first. A relay provides model access, but it cannot repair a broken hotel connection between your laptop and the service.

4. Put long-running work on a stable machine

The strongest protection is to run Claude Code on a trusted remote development machine with reliable internet, then connect over SSH. The hotel connection carries your terminal display; the remote machine carries the model traffic.

Prepare the repository, dependencies, and credentials on that machine using approved secret storage. Confirm that your employer permits remote processing of the code. Remember that remote files are a separate working tree: uncommitted edits on your laptop will not appear there automatically.

5. Start Claude Code inside tmux

After connecting to the remote machine, run tmux new -s hotel-code. Inside that session, change to your project directory and launch claude. tmux keeps the terminal session available when the SSH connection drops, provided the remote machine and session remain running.

To detach deliberately, press Ctrl-b, release both keys, then press d. Reconnect over SSH and run tmux attach -t hotel-code to return. Test this once with a small task before trusting it with a lengthy change. Running tmux only on your laptop will not protect model traffic from local Wi-Fi failures.

6. Give the session recoverable chunks of work

Ask Claude Code to inspect the relevant files, propose a short plan, and implement one bounded change at a time. Request a progress note after each milestone containing changed files, tests run, unresolved issues, and the next action.

Review changes with git diff and create deliberate checkpoints before major refactors. Keep credentials and generated secrets out of commits. Smaller milestones limit the uncertainty when a response stops halfway through.

7. Reconnect before restarting anything

After a drop, restore internet access, reconnect over SSH, and reattach to tmux. Check whether Claude Code is still working, waiting for permission, or reporting an error. Do not immediately launch another agent against the same files.

If the original process ended, start claude --continue from the same project directory to continue the latest saved conversation, or use claude --resume to select a session. Conversation recovery does not revive terminated commands. Check git status, running processes, and test output before asking it to repeat an interrupted action.

8. Finish with a verified handoff

Run the relevant tests, inspect the final diff, and save a short handoff note before closing your terminal. Stable remote execution, persistent terminal sessions, and clear checkpoints turn a Wi-Fi interruption into a reconnect exercise rather than a lost afternoon.

同一条航线上的其他明信片