Running coding agents (Claude Code, Codex, Cursor)

Genie is built to be a command center for AI coding agents. You can run multiple agents simultaneously on the same canvas, each in its own terminal node, and they can even interact with the canvas itself.

Written By Deva

Last updated About 2 months ago

Supported Agents

AgentCLI CommandDescription

Claude Code

claude

Anthropic's AI coding agent with file and directory operations

Codex

codex

OpenAI's coding agent

Cursor Agent

cursor-agent

Cursor editor's agentic mode

Shell

(plain shell)

A standard terminal β€” no agent, just a PTY

Each agent must be installed on your system separately. Genie launches them via their CLI commands.


Spawning an Agent

Via Command Palette

  1. Press ⌘K to open the Command Palette.

  2. Select the agent you want (Claude Code, Codex, Cursor, or Shell).

  3. The agent node appears at the center of your viewport.

Via Voice

Hold βŒ₯ (Option) and say:

  • "spawn claude" β€” New Claude Code terminal

  • "spawn codex" β€” New Codex terminal

  • "spawn cursor" β€” New Cursor Agent terminal

  • "spawn shell" β€” New plain terminal

Default Agent

You can set a default agent in Settings β†’ General. When you say just "spawn" without a name, Genie uses your default.


How Agent Terminals Work

Each agent runs in a real pseudo-terminal (PTY) with full ANSI/VT100 rendering. This means:

  • You see the same output as you would in a regular terminal β€” colors, progress bars, interactive prompts.

  • Copy and paste works normally (⌘C / ⌘V).

  • Standard terminal signals work: βŒƒC (interrupt), βŒƒD (EOF).

Agent Status Indicator

The footer of each agent node shows the current status:

  • Idle β€” Agent is waiting for input

  • Thinking β€” Agent is processing your request

  • Running β€” Agent is executing a tool or command

  • Done β€” Agent completed the task

  • Exited β€” Agent process has ended

Auto-Trust Gates

When you launch Claude Code or Codex for the first time in a directory, they normally ask you to trust the folder before proceeding. Genie automatically acknowledges these trust dialogs, so your agents are immediately ready to chat β€” no manual clicking required.


The Canvas-Control Bridge

This is what makes Genie unique: agents running inside terminal nodes can manipulate the canvas itself. An agent can spawn new nodes, open browsers, rearrange the layout, or read the state of the entire workspace.

Three Ways to Use the Bridge

1. rexctl CLI β€” Shell command syntax

rexctl state --json # Read full canvas state rexctl create_node note --x 100 --y 80 # Add a note at position rexctl organize # Auto-layout all nodes 

2. rex MCP Server β€” MCP tools injected into every terminal Agents that support MCP (like Claude Code) automatically get access to canvas control tools:

  • rex_state β€” Read canvas state

  • rex_spawn β€” Create new agent terminal

  • rex_prompt β€” Send text to a named node

  • rex_organize β€” Auto-layout nodes

3. Socket IPC β€” Unix domain socket for direct programmatic access The bridge communicates over /tmp/rex-*.sock using a JSON wire protocol.

Bridge Commands (Full List)

CommandWhat It Does

state

Read full canvas JSON (nodes, positions, focus, selection)

spawn

Create a new agent terminal

run_shell

Run a command in a new terminal node

prompt

Send text or a command to a named node

focus

Focus a specific node or window

organize

Auto-layout all nodes

create_node

Add a note, browser, studio, or other node at a position

move

Reposition an existing node

create_shape

Draw a shape (rectangle, arrow, text, etc.)

open_browser

Open a URL in a browser node

delete

Remove a node

voice

Dispatch a voice command

switch_canvas

Switch to a different canvas

navigate

Change a browser node's URL

refresh

Reload a browser or dev-server node

Environment Variables

Every spawned terminal node automatically gets these environment variables:

  • $REX_SOCKET β€” Path to the bridge socket

  • $REXCTL β€” Path to the rexctl CLI binary + usage guide

  • $REX_AGENT_GUIDE β€” Full reference of all bridge verbs

This means agents like Claude Code can discover and use bridge commands without any manual setup.


Multi-Agent Workflows

Since every agent runs in its own node, you can easily set up multi-agent workflows:

  • Agent A researches a bug, writes its findings to a note node.

  • Agent B reads the note and implements the fix.

  • Agent A opens a browser to the PR and reviews the diff.

Agents can communicate through the bridge β€” one agent can prompt another with instructions, or state to see what other agents are doing.


Tips

  • Name your agents. Give nodes meaningful names so you can target them with voice commands: "tell Claude to run the tests."

  • Use Fleet View (via Command Palette) to see all your terminal nodes at once in a grid layout.

  • Check agent status in the footer β€” if an agent says "Exited," you'll need to spawn a new one.

  • Bridge is optional. Agents work perfectly fine without using bridge commands β€” the bridge is an extra superpower for automation.