Telegram remote control: manage CodexUse from your phone
CodexUse Pro includes a Telegram bridge that connects your desktop workspace to a private Telegram bot. Approve exec requests, send new prompts, switch projects, and check session status — all from your phone.
Why Telegram?
When Codex is running a long task, you don't always want to sit at your desk watching it. With the Telegram bridge, you get notifications when a turn needs approval or finishes, and you can respond directly from Telegram — no need to open the app or SSH into your machine.
Common use cases:
- Approve exec and apply-patch requests from your phone while away from your desk.
- Send follow-up prompts to a running session without returning to the desktop app.
- Switch projects remotely when you realize you need to pivot.
- Check session status, profile info, and rate-limit headroom from anywhere.
Setting it up
- Open Telegram and message @BotFather.
- Send
/newbot, pick a name, and copy the bot token. - In CodexUse, go to Settings → Telegram (under the CodexUse group).
- Paste the bot token and enable the bridge.
- Open a chat with your new bot in Telegram and send any message to establish the connection.
CodexUse validates your Telegram user ID on first contact and locks the bot to your account. No one else can interact with it.
What you can do
- Approve or reject — When Codex requests exec or apply-patch approval, the bot sends you a message with approve/reject buttons.
- Send prompts — Type a message to the bot and it gets sent as a prompt to the active session.
- Switch projects — List available projects and switch the active workspace.
- Check status — See which profile is active, current project, and rate-limit usage.
- Session notifications — Get notified when a turn completes or errors out.
How it works
The bridge runs inside the CodexUse Electron process. It connects to the Telegram Bot API using long polling — no webhooks, no public servers, no port forwarding needed. Your desktop app polls Telegram for messages and sends responses back through the same channel.
- All communication goes through Telegram's encrypted API.
- The bot token stays local on your machine.
- The bridge only runs when CodexUse is open and the toggle is enabled.
- If you close the app, the bot stops responding until you reopen it.
Headless mode via CLI
You can also run the Telegram bridge without the desktop app using the CodexUse CLI daemon. This is useful on Linux servers, VPS instances, or SSH sessions where you don't have a GUI.
codexuse daemon start --telegram-bot-token=<token> [--project-path=/abs/path]
- Starts a Codex app-server and Telegram bridge in the terminal.
- The token can also be set via the
CODEXUSE_TELEGRAM_BOT_TOKENenvironment variable. --project-pathauto-registers that folder and makes it the default project.- Runs until
Ctrl+CorSIGTERM. Use withsystemd,pm2, orsupervisordfor always-on setups. - All Telegram bot commands work identically to the desktop bridge.
Example with an environment variable:
export CODEXUSE_TELEGRAM_BOT_TOKEN=123456:AA...
codexuse daemon start --project-path=/home/user/my-project
See the CLI reference for full details.
Troubleshooting
| Symptom | Likely cause | Action |
|---|---|---|
| Bot does not respond | Bridge not enabled or app closed | Open CodexUse, go to Settings → Telegram, and make sure the bridge toggle is on. |
| Invalid token error | Token was revoked or mistyped | Go to @BotFather in Telegram, use /token to get a fresh token, and paste it again. |
| Messages from other users | Should not happen | The bot locks to your Telegram user ID on first contact. Other users are ignored. |
| Approval buttons not showing | No pending approval requests | Approval buttons only appear when Codex requests exec or apply-patch permission. |
Related
Do I need to create my own Telegram bot?
Yes. Create a bot through @BotFather, which gives you a token. Paste that token into CodexUse Settings. The bot is private to you — only your Telegram account can interact with it.
Is this feature free?
Telegram remote control is a Pro feature. Pro is a one-time lifetime purchase.
Does CodexUse need to be running?
For the desktop bridge, yes — the Telegram bridge runs inside the CodexUse desktop process. If the app is closed, the bot will not respond until you reopen it. Alternatively, you can use codexuse daemon start from the CLI to run the bridge headless on a server without the desktop app.