Agents using other terminals

Every terminal has a connecto command. With it, an agent can see the other terminals in the project, ask them things, and be told when they answer.

You do not have to teach it to them. Each agent is told about the command when its terminal starts, so you can simply write: "open a Codex terminal and have it review this diff".

The commands

CommandWhat it does
connecto listThe terminals in this project and what each is doing.
connecto send <id>Types a message into another terminal. The message is read from standard input.
connecto send <id> --askAsks a question. Prints a request id; the answer is delivered to the asking agent when the other one finishes.
connecto result <request>Just the final reply to a request.
connecto read <id>Everything on that terminal's screen and scrollback.
connecto keys <id> <key>…Presses keys there, for example esc down enter.
connecto watch <id>
connecto unwatch <id>
Be woken on every event in that terminal: it began, finished, was interrupted, needs the user, or exited.
connecto add claude|codex|shell [--name <text>]Opens a new terminal, as a child of this one.
connecto start <id>Starts a terminal that is not running.
connecto close <id>Stops a terminal and moves it to the history.

Driving a shell terminal

A shell terminal is your login shell, not an agent, so it has no turns. Run a command in it with connecto send shell '<one command line>' (one line per send; use ; or && to join commands) and look at the result with connecto read shell, waiting a moment for a slow command. connecto keys shell ctrl-c interrupts it. send --ask, watch and result are refused for a shell, with a message that says to use send and read.

Asking and getting an answer

send --ask is the one that makes agents a team. The asking agent sends its question and ends its turn. It does not wait, sleep or poll. When the other agent finishes, Connecto wakes the asker with the reply already in its context, labelled as another agent's words.

connecto add codex --name "review the diff"

connecto send codex-4 --ask <<'EOF'
Review the migration in db/2031_orders.sql. Is anything unsafe
to run on a table with live writes?
EOF

The new terminal appears in the sidebar under the one that opened it, so you can watch the reviewer work and step in at any point.

What you should know

Text on a screen can steer an agent. An agent that reads another terminal reads whatever is there, including text that came from a web page or a file. Treat the reach of one agent as the reach of all the terminals it can drive.

Exit codes

CodeMeaning
0Done.
1Refused, for example because Connecto is paused.
2The command was written wrongly.
3Connecto could not be reached.
4There is no result yet.