You are on the train. You just realized the API endpoint for the new feature is missing input validation. With ZCode’s remote control, you pull out your phone, open Telegram, type a message to your ZCode bot, and a coding agent starts working on validation before you reach the office.
This is not a concept demo. It works today. ZCode is the only coding agent that offers remote control via messaging apps, and Telegram is the best-supported option for international users.
This tutorial covers the complete setup: connecting Telegram to ZCode, what commands you can send, real use cases, and the limitations you should know about.
If you have not installed ZCode yet, start with our setup guide. If you want the full picture of what ZCode does, read the complete overview.
Why Remote Control Matters
Terminal coding agents like Claude Code and MiMo Code require you to be at your terminal. You type a command, the agent works, you review, you type another command. You must be present.
ZCode’s Goal system already decoupled you from step-by-step interaction. Define a Goal, approve a plan, and the agent works through checkpoints semi-autonomously. Remote control extends this further: you do not even need to be at your computer to start, monitor, or steer tasks.
Practical scenarios:
- Start a task from your phone before sitting at your desk
- Monitor a long-running Goal during lunch
- Approve a checkpoint from the couch
- Get notified when something completes or fails
- Add instructions to a running Goal while commuting
Prerequisites
Before setting up remote control, you need:
- ZCode installed and working on your computer (see setup guide)
- An active GLM Coding Plan subscription
- A Telegram account
- Your computer running (ZCode must be open for remote control to work)
Important: Your computer must be on and ZCode must be running. Remote control sends commands to your running ZCode instance. It is not a cloud service.
Step 1: Enable Remote Control in ZCode
- Open ZCode on your computer
- Go to Settings (gear icon or Cmd+,)
- Navigate to “Remote Control” section
- Toggle “Enable Remote Control” to ON
- Select “Telegram” as your platform
You will see a QR code and a bot token displayed.
Step 2: Connect Telegram
You have two connection methods:
Method A: QR Code (Easier)
- Open Telegram on your phone
- Go to the ZCode bot (it will be shown on screen, or search for the bot name displayed in ZCode)
- Start a chat with the bot
- Send the command
/connect - The bot asks you to scan a QR code or enter a pairing code
- In ZCode on your desktop, the pairing code is displayed next to the QR code
- Enter the code in Telegram
- ZCode confirms the connection
Method B: Manual Token (If QR Fails)
- In ZCode’s Remote Control settings, click “Show Pairing Token”
- Copy the alphanumeric token
- Open Telegram, find the ZCode bot
- Send
/connect YOUR_TOKEN_HERE - ZCode confirms the connection
Once connected, you will see “Telegram: Connected” in ZCode’s Remote Control panel with your Telegram username displayed.
Step 3: Configure Notifications
By default, all notifications are enabled. Customize in Settings > Remote Control > Notifications:
- Goal completed: Sends a message when any Goal finishes successfully
- Checkpoint waiting: Alerts you when the agent pauses at a checkpoint and needs approval
- Errors: Notifies you when a Goal fails or encounters an unrecoverable error
- Progress updates: Periodic updates on long-running Goals (configurable interval)
Recommendation: Enable “Goal completed” and “Errors” at minimum. “Checkpoint waiting” is useful if you run Goals that require manual approval between steps.
Step 4: Test the Connection
From your phone, send a message to the ZCode bot:
/status
You should receive a reply showing:
- ZCode version
- Current project
- Active Goals (if any)
- Connection status
If you get a response, everything is working.
What You Can Do from Telegram
Start a New Goal
Send a message with your Goal description:
/goal Add input validation to the POST /users endpoint. Validate email format, require name field, enforce password minimum 8 characters. Return 400 with specific error messages for each validation failure.
ZCode generates a plan and sends it back to you in Telegram:
Plan for: Add input validation...
1. Identify existing endpoint handler
2. Add validation middleware
3. Define validation rules
4. Add error response formatting
5. Write tests for validation cases
Reply 'approve' to execute, 'edit' to modify, or 'reject' to cancel.
Reply with approve and the agent starts working.
Check Goal Progress
/progress
Returns the current state:
Goal: Add input validation...
Status: Executing
Step: 3/5 (Define validation rules)
Last checkpoint: Step 2 completed successfully
Approve a Checkpoint
When the agent pauses at a checkpoint and sends you a notification:
Checkpoint reached (Step 2/5):
- Created validation middleware at src/middleware/validate.ts
- Added express-validator dependency
Changes: 2 files modified, 1 file created
Reply 'continue' to proceed, 'details' for full diff, or 'pause' to stop.
Reply continue to approve and move to the next step.
Add Instructions Mid-Goal
If you want to adjust a running Goal:
/adjust Also add rate limiting to this endpoint, 100 requests per minute per IP
The agent incorporates your adjustment into the remaining steps.
Pause or Cancel
/pause
Pauses the current Goal at the next checkpoint. Work in progress completes, but the next step does not start.
/cancel
Stops the Goal entirely. Completed work remains in your project (it is not reverted automatically).
List Recent Goals
/goals
Shows your last 10 Goals with their status (completed, active, failed, paused).
Get Full Diff
At any checkpoint or after completion:
/diff
ZCode sends a summary of all file changes. For large diffs, it sends the most important changes and a file count.
Real-World Use Cases
Morning Kickoff
You wake up, check your phone, remember you need test coverage for the new API routes. Before getting out of bed:
/goal Write comprehensive unit tests for all endpoints in src/routes/api/v2/. Cover happy paths, error cases, and edge cases. Use the existing Jest configuration.
By the time you shower and make coffee, it is done or nearly done.
Monitoring During Meetings
You started a large refactoring Goal before a meeting. During the meeting (when it gets boring), check progress:
/progress
See that it is on step 7 of 12. Everything proceeding fine. Focus back on the meeting.
Quick Fix from Anywhere
A teammate messages you: “The /products endpoint returns 500 when category is null.” From your phone:
/goal Fix the null category bug in the GET /products endpoint. Add a null check for the category parameter and default to returning all products when category is not provided. Add a test case for this scenario.
The fix ships before you reach your computer.
End-of-Day Cleanup
Leaving the office but want to run linting and formatting overnight:
/goal Run the linter across the entire src/ directory. Fix all auto-fixable issues. For issues that cannot be auto-fixed, create a TODO comment with the rule name.
Limitations
Remote control is powerful but not unlimited:
Your Computer Must Be Running
ZCode is a desktop app. Remote control sends commands to your running instance. If your computer is off or ZCode is closed, remote messages queue but do not execute until you restart.
Complex Diffs Are Hard to Review on Phone
A 500-line diff is unreadable in a Telegram message. For complex Goals, you may want to approve blindly and review properly when you return to your desk, or use /pause to delay review-heavy steps.
No File Upload/Download
You cannot send files to ZCode through Telegram or receive full file contents. You get summaries and diffs. For full file access, you need to be at your computer.
Network Dependency
Remote control requires both your computer and your phone to have internet access. If your computer loses connection, the link breaks until it reconnects.
Single User
Remote control connects to one Telegram account per ZCode instance. You cannot have multiple people controlling the same ZCode installation via different Telegram accounts. (Team plan has different collaboration mechanisms.)
Security Considerations
Anyone with access to your Telegram account can control ZCode. Treat your Telegram account as a security perimeter:
- Enable two-factor authentication on Telegram
- Use a strong password
- Lock your phone
- Consider using a dedicated Telegram account for ZCode
- Review the bot’s command history periodically
Alternative Platforms: WeChat and Feishu
Telegram is the best option for international users, but ZCode also supports:
WeChat: Setup is similar but uses WeChat’s mini-program or official account interface. Better for users in China where Telegram may be inaccessible.
Feishu (Lark): Integrated as a Feishu bot. Better for teams already using Feishu for workplace communication. Supports shared bot instances for team awareness.
The functionality is identical across platforms. Only the connection setup differs.
Disconnect and Troubleshooting
Disconnecting Telegram
In ZCode: Settings > Remote Control > Disconnect
Or from Telegram: send /disconnect to the bot.
Bot Not Responding
- Verify ZCode is running on your computer
- Check internet connection on both computer and phone
- Try
/statusto see if the connection is alive - Disconnect and reconnect if needed
Messages Delayed
Remote control uses websocket connections. If messages are delayed:
- Check for network congestion
- Restart ZCode to re-establish the connection
- Some corporate networks block websocket connections
Lost Pairing
If your connection drops and will not reconnect:
- In ZCode, disconnect the current pairing
- Restart ZCode
- Re-pair following the setup steps above
Combining Remote Control with SSH Development
An advanced pattern: ZCode connected to a remote server via SSH, controlled via Telegram.
Setup:
- Configure SSH connection in ZCode (see setup guide)
- Open a remote project
- Configure Telegram remote control
Now you can start Goals on a remote server from your phone. The execution happens on the remote machine. You control from Telegram. Your local computer serves as the bridge.
This is powerful for:
- Managing staging environments from mobile
- Running compute-heavy tasks on powerful remote machines
- Keeping development off your laptop entirely
FAQ
Do I need a special Telegram account for ZCode?
No. Your regular Telegram account works. You chat with the ZCode bot in a normal conversation. However, for security, consider using an account with two-factor authentication enabled.
Can I control multiple ZCode instances from one Telegram account?
Not currently. One Telegram account pairs with one ZCode instance. If you run ZCode on multiple computers, each needs a separate Telegram account or you need to switch the pairing.
Does remote control work when my laptop is in sleep mode?
No. Your computer must be awake with ZCode running. If your machine sleeps, remote messages queue until it wakes. On macOS, you can configure “Prevent automatic sleeping when display is off” in Energy settings if you want 24/7 availability.
What happens if I send a Goal but my computer crashes mid-execution?
Completed checkpoints are saved. When you restart ZCode, the Goal shows as “interrupted.” You can resume from the last checkpoint or cancel it.
Is there a mobile app for ZCode instead of using Telegram?
Not as of July 2026. Remote control through messaging apps is the mobile story. A dedicated mobile app may come later, but Telegram provides a functional interface today.