Remocode
Telegram Remote7 min read

Using Via Mode With Claude Code: Complete Walkthrough

Detailed walkthrough of using Remocode's via mode with Claude Code. Covers Ink app detection, smart typing, retry behavior, permission handling, and real-world workflows.

via-modeclaude-codewalkthroughink-apptutorialremocode

Claude Code and Via Mode: A Natural Pairing

Claude Code is one of the most capable AI coding agents available. It reads your codebase, proposes changes, writes code, runs tests, and iterates on feedback. The main friction point is its permission model — Claude asks for approval frequently, and each unanswered question stalls progress.

Via mode eliminates this friction by giving you a bidirectional connection from Telegram. This walkthrough covers every aspect of using via mode specifically with Claude Code.

How Remocode Detects Claude Code

When you enter via mode on a terminal running Claude Code, Remocode automatically detects it as an Ink-based application. Ink is the React-like framework that powers Claude Code's terminal UI, with its syntax-highlighted code blocks, diff views, and interactive prompts.

This detection triggers several Claude Code-specific behaviors:

  • ANSI and UI chrome stripping — Claude Code's terminal UI includes colored borders, status bars, and formatted code blocks. Remocode strips the ANSI codes, control characters, and UI decoration, delivering clean readable text to your Telegram chat.
  • Smart typing — Instead of dumping keystrokes directly, Remocode sends text, waits 1 second, then sends Enter. This gives Claude Code's Ink renderer time to process and display the input correctly.
  • Graduated retry — If Claude Code does not produce output after your input, Remocode retries at 8, 18, and 28 seconds. Claude sometimes takes a while to process complex requests, and the retry system handles this without requiring manual intervention.

Starting a Session

Name your Remocode terminal something memorable. For this example, we will use "claude":

via claude

You immediately start receiving Claude Code's output. If Claude is in the middle of generating code, you see the output as it streams. If Claude is waiting for input, you see the prompt.

Handling Permission Prompts

Claude Code's most common interaction pattern is the permission prompt. It shows you a proposed file edit or shell command and asks for approval. In via mode, these appear as text in your Telegram chat.

For simple approvals, just type:

yes

or

y

Remocode sends this to Claude Code using the smart typing system. Claude receives it, processes it, and continues working.

For rejections:

no

Claude will ask for alternative instructions or move on to the next task.

Providing Complex Instructions

Via mode is not limited to yes/no responses. You can send full instructions:

Refactor the getUserById function to use async/await instead of callbacks, and add proper error handling with custom error types

Remocode sends this entire message to Claude Code. The smart typing system handles the text-then-Enter sequence, and the retry system ensures Claude receives it even if there is a processing delay.

Reading Code Diffs

When Claude proposes file edits, it shows a diff view in the terminal. Via mode strips the Ink formatting but preserves the diff content. You will see added and removed lines, though without the color coding of the native terminal. This is usually sufficient to approve or reject changes from your phone.

For complex diffs that need careful review, consider using !reply to get the AI response in a cleaner format, or wait until you are at your desk.

Using Escape Commands

While Claude Code is processing, you might want to check things without sending input to Claude:

  • `!status` — Get an AI-generated summary of what Claude has accomplished. Useful for long sessions where the streamed output has been voluminous.
  • `!peek` — Check if there is unsubmitted input. If you sent a response but Claude did not react, peek tells you if the text is stuck in the buffer.
  • `!submit` — Send a standalone Enter if peek shows text waiting to be submitted.
  • `!reply_5` — Get the last 5 Claude responses without the via mode streaming noise.

Troubleshooting Common Issues

Claude seems to ignore input: Wait for the retry system (up to 28 seconds). If still no response, use !peek to check the buffer, then !submit if needed.

Output is garbled: This can happen during Claude's UI transitions (switching between views). Wait a few seconds for the output to stabilize.

Too much output: Claude can be verbose. If the streaming messages are overwhelming, exit via mode with !exit and use reply_3 instead for a focused view.

Real-World Session Example

  • Start Claude Code with: "Add pagination to the /api/users endpoint."
  • Leave your desk. From your phone: via claude
  • See Claude analyzing the route file. It asks: "Should I also add pagination to /api/posts?" Type: "yes, use the same pattern"
  • Claude proposes edits to three files. You scan the diffs, type: "looks good"
  • Claude runs tests. A test fails. You see the error in the stream. Type: "the test is using the old response format, update the assertion"
  • Claude fixes the test. All tests pass. You type !exit and continue your day.

The entire interaction took 3 minutes of phone time for what would have required sitting at your desk for 20 minutes of mostly waiting.

Ready to try Remocode?

Start with a 7-day Pro trial — no credit card required. Download now and start coding with AI from anywhere.

Download Remocodefor macOS

Related Articles