Public release 1.24.0Checked: 26 October 2026Release notes

Discord and Telegram Remote Control

Use bots to create terminals, send commands, read output, receive agent notifications, and get screenshots. Since 1.20, Discord session threads map conversations to terminals.

Set access boundaries before connecting

Bot messages can execute terminal commands, so use a chat or channel restricted to trusted people. Test one read and input in a disposable workspace, and keep bot tokens out of screenshots, examples, and reports. The desktop app, integration, and network must remain available; broker persistence does not keep the bot online after app quit.

For a live terminal view and phone keyboard input, browser pairing is another connection path and does not require a Discord or Telegram bot.

Phone browser operation

Telegram setup

  • Create a bot with @BotFather using /newbot and copy its token.
  • Start a conversation with your bot and obtain that conversation’s chat ID.
  • In Settings > Remote Control > Telegram, enter the bot token and chat ID and enable the integration and Remote Control. Only the configured chat can control the terminals.
Telegram BotFather tutorial

Discord setup

  • Create an application in the Discord Developer Portal and get its bot token.
  • Invite it to your server with bot and applications.commands scopes. In the target text channel, allow View Channel, Send Messages, Read Message History, Embed Links, Attach Files, Create Public Threads, and Send Messages in Threads.
  • Enable Message Content Intent in the Bot settings for ordinary messages and thread replies. Termdock requests Guilds and GuildMessages as well. Without Message Content, slash commands still work, but direct text input and session threads are unavailable.
  • In Settings > Remote Control > Discord, enter the bot token, guild (server) ID, and channel ID. Enable the integration and Remote Control. Restrict access to the configured channel because its messages can run terminal commands.

A thread for each session

The first session push creates a Discord thread under the configured channel. Ordinary messages in that thread go to its terminal without a session number. Replies do not automatically subscribe you to every agent output; use /watch if you want ongoing updates.

If Message Content is unavailable or the channel cannot host a thread, pushes fall back to the main channel. A thread left over from an app restart may no longer be attached; Termdock reports this and creates a new thread on the next session push.

Use /attach in Telegram or the Discord main channel to send ordinary messages to a chosen session; /detach stops this mode. Text beginning with / is reserved for commands, so use /send to pass a slash-prefixed prompt to an agent.

Commands

Both bots support the commands below. Use the session number or ID from /list. Discord /key uses the named option keyname.

/ws
/new [workspace]
/list
/send <session> <content>
/read <session> [lines] [raw]
/watch <session>
/unwatch <session>
/key <session> <key>
/kill <session>
/snap [session]
/attach <session>
/detach
  • /ws lists workspaces; /new creates a terminal in the selected workspace; /list lists sessions.
  • /send sends text, /read reads output (default 50 lines), and /key sends special keys such as enter, tab, esc, or ctrl+c.
  • /watch starts output or prompt notifications; /unwatch stops them. /kill closes a session on either platform.
  • /snap returns a session screenshot as an image. Without a session it captures the app window. Screens and output reads also support LAN and SSH sessions.

Proactive agent messages

Enable push notifications in Remote Control settings and connect a provider. An agent or script can notify you when work finishes or needs a decision. Inside Termdock, notify uses $TERMDOCK_SESSION_ID automatically; outside it, pass --session explicitly.

termdock notify "The review needs your decision"
termdock notify "Starting the build" --session <id> --title "Build review" --json

With a session and a thread-capable Discord connection, notification delivery selects Discord. Without such a thread connection, it uses connected remote providers. Without a session, it sends to connected remotes. --title applies only when the first Discord thread is created; Telegram ignores it.

Messages are limited to 4000 trimmed characters and six sends per minute per session. A non-zero CLI exit means delivery failed; read stderr rather than retrying in a loop.

Notification HTTP API

Prompt buttons and boundaries

Detected terminal choices can produce clickable Discord buttons or Telegram inline keyboards. Check the session and prompt before responding. Screenshots and output can contain sensitive data; share only in trusted channels.

Telegram messages have a 4096-character limit and inline callback data a 64-byte limit. Discord messages have a 2000-character limit and up to five prompt buttons. Long pushed text is split into messages.

Use terminals directly in a phone browser

Verify one round trip

  1. Send /list in the configured chat or channel and confirm its sessions match the desktop.
  2. Use /read <session>, then /send a recognizable, harmless command to a test terminal. Replace <session> with an actual ID or number from /list.
  3. Check that only the intended terminal ran it, then test /snap or /watch. /kill ends a session; it is not a connectivity test.
  4. After enabling push, send one termdock notify test and verify its chat, channel, or thread. One-click CLI installation is currently macOS-only.

If the bot is online but does not respond

  • Telegram: verify the configured chat ID and start a conversation with the bot in that chat.
  • Discord: verify guild/channel IDs, channel permissions, and Message Content Intent. If only slash commands work, inspect Message Content before recreating the bot.
  • Thread input fails: an app restart can leave an old thread unmapped. Read the notice and have that session push again to create a new thread.
  • Push not delivered: check Remote Control, push enablement, and provider connection, then read CLI stderr. Reconcile uncertain delivery instead of looping retries.
  • Output and screenshots may contain credentials or private files. Inspect them before sharing; masking is not a guarantee.