Mirra

Remote Control

Beyond just receiving output, you can start and control Claude Code sessions entirely from your phone. This is useful when you're away from your computer but need to kick off a coding task.

How remote control works

  1. Your PC runs the bridge, which connects to Mirra Cloud via Mirra Tunnel
  2. You send a prompt from the Mirra app
  3. Mirra routes the request to your PC and spawns a Claude Code session
  4. Claude's output appears as rich cards in your chat
  5. Your replies are automatically routed back to the correct session

Starting a session

With the bridge running on your PC:

  1. Open a chat in the Mirra app

  2. Ask Mirra to start a Claude Code session:

    "Start a Claude Code session to fix the login bug in my project"

  3. Mirra calls your PC and spawns the session

  4. Claude's responses appear in the chat as structured cards

Permission prompts

When Claude needs approval to run a command or edit a file, you'll see a permission card:

The card shows what Claude wants to do and gives you three options:

ActionWhat it does
AllowApprove this specific action
Allow AlwaysApprove this action and similar future actions
DenyReject the action

Tap your choice — no typing required. Your response is sent directly to Claude Code.

Execution details

When Claude completes work, you'll see an execution card showing exactly what happened:

The card includes:

  • Step-by-step breakdown — Each tool Claude used (Read, Edit, Bash, etc.)
  • Status indicators — Success, error, or skipped for each step
  • Tool summary — Count of each tool type used

Some interactive tools like AskUserQuestion are marked as "skipped" in remote sessions since they require direct terminal interaction.

Multi-turn conversations

Sessions stay active after the initial prompt completes. To continue the conversation:

  1. Reply to any message from that session
  2. Your reply becomes Claude's next prompt
  3. Claude continues with full context from the previous work

This uses Claude's --resume capability to maintain conversation history across prompts.

Session management

Viewing active sessions

The bridge can run up to 5 concurrent sessions. To see what's running:

mirra-cc-bridge status

Ending a session

Sessions end automatically when Claude completes its work. To manually end a session, send a message like:

"Stop the current session"

Using the SDK

You can also control sessions programmatically with the Mirra SDK:

import { MirraSDK } from '@mirra-messenger/sdk';
 
const sdk = new MirraSDK({ apiKey: 'your_api_key' });
 
// Spawn a new session
const session = await sdk.resources.call({
  resourceId: 'your_pc_resource_id',
  method: 'spawnSession',
  params: {
    initialPrompt: 'Fix the authentication bug in src/auth.ts',
    groupId: 'group_to_send_output_to'
  }
});
 
console.log('Session started:', session.id);
 
// Send a follow-up prompt
await sdk.resources.call({
  resourceId: 'your_pc_resource_id',
  method: 'sendInput',
  params: {
    sessionId: session.id,
    input: 'Now add tests for the fix'
  }
});
 
// Respond to a permission prompt
await sdk.resources.call({
  resourceId: 'your_pc_resource_id',
  method: 'respond',
  params: {
    sessionId: session.id,
    response: 'allow'  // or 'allow_always' or 'deny'
  }
});

How replies get routed

When you reply to a Claude Code message, your response needs to reach the correct session on your PC. Here's how it works:

  1. Each session creates a Mirra Flow that watches for replies
  2. When you reply, the Flow matches your message to the session
  3. A lightweight Mirra Router forwards your reply to your PC
  4. The bridge sends your input to Claude Code

This is much more efficient than processing each reply with AI — Flows trigger instantly on matching messages.

Flows are automatically cleaned up when sessions end, so you don't need to manage them manually.

Troubleshooting

Session not starting

  1. Check that the bridge is running: mirra-cc-bridge status
  2. Verify the tunnel is connected (check Active Tunnels in the Mirra app)
  3. Make sure your PC is registered as a resource

Replies not reaching Claude

  1. The session may have ended — check mirra-cc-bridge status
  2. Make sure you're replying to a message from the active session
  3. Check that the tunnel is still connected

Permission prompt not responding

  1. Tap the button firmly — the response is sent immediately
  2. If the session timed out, you may need to start a new one
  3. Check the bridge logs for errors

Next steps

On this page