# Terminal support

> Which terminal apps Hansard finds agents in, and which ones it can bring forward, show live, start agents in, and type messages into.

Hansard works with agents in any terminal. The **Running** view and
`hansard ps` find each agent from the process tree, whatever terminal it runs
in. What else Hansard can do with an agent depends on the terminal: bring its
tab forward, show it live in Hansard, start new agents there, or type your
words into it.

Opening terminal apps and bringing them forward work on macOS only.

| Terminal             | Detected in Running | State and latest action | Bring to front                          | Live terminal in Hansard        | Start agents there                      | Type messages into the agent  |
| -------------------- | ------------------- | ----------------------- | --------------------------------------- | ------------------------------- | --------------------------------------- | ----------------------------- |
| Hansard terminal     | Yes                 | Yes                     | Opens in Hansard                        | Yes                             | **Hansard terminal** in **Start agent** | Claude Code only              |
| Hansard conversation | Yes                 | Yes                     | Opens in Hansard                        | Not a terminal                  | `--in app`                              | Yes, as its next turn         |
| cmux                 | Yes                 | Yes                     | The exact tab, when cmux allows Hansard | No                              | `--in cmux`                             | Yes, when cmux allows Hansard |
| tmux                 | Yes                 | Yes                     | No                                      | Yes, on the default tmux server | No                                      | Yes                           |
| Terminal             | Yes                 | Yes                     | The app                                 | No                              | `--in terminal`                         | Claude Code only              |
| iTerm2               | Yes                 | Yes                     | The app                                 | No                              | `--in iterm`                            | Claude Code only              |
| Ghostty              | Yes                 | Yes                     | The app                                 | No                              | `--in ghostty`                          | Claude Code only              |
| Warp                 | Yes                 | Yes                     | The app                                 | No                              | No                                      | Claude Code only              |
| WezTerm              | Yes                 | Yes                     | The app                                 | No                              | No                                      | Claude Code only              |
| kitty                | Yes                 | Yes                     | The app                                 | No                              | No                                      | Claude Code only              |
| Alacritty            | Yes                 | Yes                     | The app                                 | No                              | No                                      | Claude Code only              |
| Hyper                | Yes                 | Yes                     | The app                                 | No                              | No                                      | Claude Code only              |
| Tabby                | Yes                 | Yes                     | The app                                 | No                              | No                                      | Claude Code only              |
| VS Code              | Yes                 | Yes                     | The app                                 | No                              | No                                      | Claude Code only              |

To bring an agent's app forward, choose **Show in** followed by the app's
name in the agent's row menu on the [Running](https://www.hansard.dev/guides/running-agents/)
view. A project page's **Show tab** does the same for an agent in cmux. To
watch an agent live, use Running's **Terminals** display. Agents in other
editors and apps, such as Cursor, Windsurf, Zed, and the Claude, ChatGPT, and
Codex desktop apps, come forward the same way.

A **Hansard terminal** is one of the app's own terminals, such as **Resume in
terminal** or the workspace pane's **Terminal** tab. A **Hansard
conversation** is an agent the app runs in the conversation view.

## How Hansard names the terminal

Hansard names the nearest terminal app above the agent in the process tree.
An agent in tmux reads as tmux, even when tmux runs inside another terminal
app. Hansard also recognizes GNU screen, SSH sessions, Windows Terminal, GNOME
Terminal, Konsole, xterm, the Cursor, Windsurf, Zed, and JetBrains editors,
and the Claude, ChatGPT, and Codex desktop apps.

## State and latest action

Every row gets a state, whatever its terminal. Claude Code reports whether it
is working, waiting for you, or idle. Hansard's own runs and an agent's status
reports add **Needs you** for approvals, questions, and blocked work. Other
agents count as working while they use CPU.

The latest action, such as **Editing src/cart.ts** or **Running npm test**,
comes from the Claude Code and Codex transcripts on this computer. See
[Running agents](https://www.hansard.dev/guides/running-agents/).

## Start agents in a terminal

On a project's page, select **Start agent** and choose where it **Opens in**:
**Hansard conversation**, **Hansard terminal**, or one of cmux, Terminal,
iTerm2, and Ghostty when it is installed. From the CLI:

```sh
hansard coordinator start codex --in ghostty \
  --brief "Fix the flaky retry test"
```

`--in` takes `cmux`, `terminal`, `iterm`, `ghostty`, or `app`. When cmux is
running, it is the default. cmux opens a new tab in the current workspace
without moving your focus. Terminal, iTerm2, and Ghostty open as each app's
settings decide. `app` needs a first message. See
[Projects and coordinators](https://www.hansard.dev/guides/projects/#start-and-message-the-projects-agents).

## Type messages into an agent

When you send words to an agent from a project's page, or with
`hansard coordinator send`, Hansard takes the first path that reaches it:

1. An agent running as a Hansard conversation gets them as its next turn.
2. An agent in a cmux tab or a tmux pane gets them pasted as its own turn,
   then Return. An agent waiting at an approval or a question is not typed
   into, since the keys would answer it. The words wait until it leaves the
   prompt.
3. A Claude Code agent in any other terminal gets them through Claude Code's
   own inbox for messages from other sessions, as its next turn.
4. Any other agent gets a Hansard message, which it reads the next time it
   checks its Hansard inbox.

A Codex agent receives typed words only in cmux or tmux. Each send reports
**read**, **delivered**, **queued**, or **failed**. A Claude Code session can
hold an inbox message until you accept it there, and the send then reads
**queued**. To skip that step, turn on **Accept messages in Claude Code** on
setup's **Your agents** page.

## Let cmux accept Hansard

While cmux's **Socket Control Mode** is **cmuxOnly**, cmux lets only programs
started inside it control its tabs. That refuses the Hansard app, its
terminals, and the watcher. Hansard then cannot type into a cmux tab, start an
agent there, or select an agent's tab. **Show in cmux** only brings cmux
forward, and the project page's receipt says cmux refuses Hansard. In cmux, open **Settings → Automation** and set **Socket
Control Mode** to **password**, with a saved password, or to **allowAll**.
Claude Code agents in cmux get your words through their own inbox either way.

## Hansard's own terminal

Hansard's terminals run on macOS, Linux, and Windows. Press `Shift+Enter` or
`Option+Enter` to start a new line in an agent's prompt, as in a native
terminal. The terminal never scrolls sideways as you type. A Hansard terminal
keeps running when you leave its conversation, and the conversation shows it
again when you return.

Drop files on a Hansard terminal to paste their paths, quoted for the shell.
A browser that keeps file paths private shows a notice instead. Paste a
screenshot to save it and paste its path, which Claude Code and Codex read as
an image. Hansard deletes saved screenshots after a day.

## Take over a conversation running elsewhere

A Claude Code or Codex conversation can still be running in another terminal
app when you resume it in Hansard. Two running copies both write to the same
transcript, and they drift apart. So when you select **Resume in Hansard** or
**Resume in terminal** under **Actions → Continue conversation**, or send a
message from the composer, Hansard first stops the other copy:

- A copy waiting at its prompt stops at once.
- For a copy that is working or waiting for an approval, Hansard asks first
  and says what the copy is doing, such as **Running npm test**. **Stop and
  continue here** stops it. **Cancel** keeps it and sends nothing.

The other app's tab stays open and shows the exited CLI. Hansard cannot close
another app's tab.

**Take over conversations running elsewhere**, under **Running elsewhere** in
**Settings → Handoff & helpers**, is on by default. To keep both copies
running, turn it off or run
`hansard config set orchestrate.takeOverElsewhere false`. When it is off, or
you keep a copy, the conversation's header says where it also runs, such as
**Also running in cmux (idle)**. Select
**Actions → Continue conversation → Take over** to stop that copy later. A
fork or a handoff starts a new conversation, so it stops nothing. On the
[Running](https://www.hansard.dev/guides/running-agents/) view, a conversation with two copies
stays one row, marked with the number of copies.

## Continue in another terminal app

To move a conversation from Hansard to another terminal app on a Mac, select
**Actions → Continue conversation → Continue in another terminal** and choose
cmux, Terminal, iTerm2, or Ghostty. Hansard ends its own copy the way the CLI
ends itself, then opens the CLI's resume command in that app. When cmux
refuses Hansard, the dialog offers **End here and copy the command** instead.
Hansard remembers the last app you chose on this device.
