Remote control with /rc

Run /rc and your session shows up in Telegram or Discord. Text it from your phone and it answers there, live, as it writes. Your session is still on your laptop. The chat is just another way in, so you can walk away and keep going from your pocket.

Basic usage

/rc # Picker: platform, setup, permission mode /rc status # Whether it is on, which platform, which mode /rc default # Connect, asking before each new tool /rc auto-accept # Connect, editing files on its own /rc yolo # Connect with permissions bypassed /rc off # Disconnect /rc off clear # Disconnect and delete the bot's messages /rc telegram off # Disconnect one platform by name

Run bare /rc the first time. The picker covers setup.

  1. Message @BotFather, send /newbot, paste the token it returns.
  2. Message @userinfobot, send /start, paste the number it returns. That account is the only one allowed to drive the session.
  3. Open your new bot and send it /start.

Step 3 is required. A bot cannot open a Telegram chat, so until you message it there is nowhere for it to reply. The picker checks and tells you if the chat does not exist yet.

  1. Create an application at discord.com/developers, add a bot, copy its token. Turn on Message Content Intent on the same page, or every message reaches the bot empty.
  2. Under OAuth2 → URL Generator, tick the bot and applications.commands scopes, then the View Channels, Send Messages, Create Public Threads and Send Messages in Threads permissions. Open the generated URL and authorize the bot into your server.
  3. In the Discord app, turn on Developer Mode (gear by your name → Developer). Right-click yourself for your user ID, right-click the channel the bot should post in for its channel ID.

Credentials go to ~/.commandcode/auth.json under remoteControl, one entry per platform, written with owner-only permissions.

The chat runs the session in the session's own permission modes, under the names /mode and shift+tab use.

ModeFrom the chat
defaultAsks before each new tool. Approve and Deny are buttons.
accept editsEdits files on its own. Asks before running commands.
yoloNever asks.

The mode belongs to the remote session. Disconnecting restores the mode the terminal had before.

Anything without a leading slash is a prompt. These commands work:

CommandDoes
/modelAvailable models as buttons. Tap to switch.
/effortReasoning effort for the current model.
/compactCompact the conversation history.
/clearStart a new conversation.
/statusSession, model, permission mode.
/stopInterrupt the current turn.
/helpThis list.

Any other slash command is refused rather than treated as a prompt.

One message, one answer. A message sent while an answer is streaming is queued and marked ⏳ Queued in the chat, then runs as its own turn when the current one ends.

The terminal shows the chat's traffic. A relayed message appears in the feed as a ❯ turn, and shows in the Queued (n) panel while it waits. A turn started at the keyboard is mirrored into the chat.

A permission keyboard answers only the request it was posted for. Tapping a prompt that was already answered at the terminal refuses and removes it.

Telegram allows one poller per bot token, so a second session offers to take the bot over and the losing session is told. Discord opens a thread per session, so several sessions can share one bot.

/rc off stops the bot and leaves the chat history alone. /rc off clear also deletes the bot's own messages, which Discord and Telegram allow for 48 hours. Your messages stay either way.

Ending the session disconnects it and posts a sign-off in the chat.