# Coordinate

Everything you can do from the command line, an agent can do too. The rules are the same: read the screen before you steer.

Canonical URL: https://ohputer.com/router/docs/coordinate

## JSON output

Add `--json` for structured output, and `{"ok":false,"error":...}` on failure. `policy`, `reclaim`, `devices iroh` and `daemon install` print JSON either way. Inside a session, `OH_SESSION_ID`, `OH_PROJECT`, `OH_PROFILE_ID`, `OH_CONTROL_SOCKET` and `OH_EVENT_SOCKET` tell an agent where it is.

**Read before steering**

```sh
oh-router ps --json
oh-router inspect term_01a2b3c4d5e6 --json
```

## The agent skill

The [skill bundle](https://ohrouter.com/integrations/oh-router.json) carries `skills/oh-router/SKILL.md` and its license. It teaches Claude Code, Codex and other coding agents, including Cursor, to list sessions, inspect one and steer it through the screen guard. OH Router itself runs only Claude Code, Codex and shell sessions.

## Fleet messages

`oh-router fleet list` lists live agents on paired installations. Address one by peer, host, session and start time, which stays unique when session IDs repeat.

**Read and message an agent on another machine**

```sh
oh-router fleet list --json
oh-router fleet inspect --peer rem-build-box --host HOST_UUID --session term_01a2b3c4d5e6 --started-at 1795000000
oh-router fleet send --peer rem-build-box --host HOST_UUID --session term_01a2b3c4d5e6 --started-at 1795000000 --message-id MESSAGE_UUID --text "The API change is merged; rebase"
oh-router fleet receipt --peer rem-build-box --host HOST_UUID --session term_01a2b3c4d5e6 --started-at 1795000000 --message-id MESSAGE_UUID
```

A message is up to 16 KiB and carries a UUID reserved before anything is typed, so a retry with the same ID is delivered once. The receipt says whether the agent’s CLI received the text. `--text-stdin` reads the message from stdin.

## Grants

Each installation has its own signing key. A paired machine gets nothing until you grant it. `fleet trust` grants a device you added; `fleet trust-incoming --host UUID` grants an installation that added you. Grants change only from your own terminal, never from inside a supervised session.

| Flag | Lets the other side |
| --- | --- |
| `--inspect` | Read conversations |
| `--send` | Send messages |
| `--activity` | Read device activity, including excerpts of submitted prompts |
| `--sign-in` | Sign profiles in on this device |
| `--schedules` | Manage recurring tasks. |

## Activity

`oh-router devices activity` reads this machine’s private event feed: failures, routing holds and missing confirmations. `fleet activity --peer ID --host UUID` reads a granted peer’s. `--before` pages back.

## Editor chat

Editor integrations can open a native Claude Code or Codex chat for a project on the local socket. `oh-router chat capabilities` checks support; `chat status` and `chat stop` take the chat ID, its start time and the project folder.
