Skip to content

Message live agent sessions

Hansard can let live local Codex and Claude Code sessions exchange text. The same-project mode is selected by default during new setup, requires no skill or /link command, and creates a durable relationship after the first successful exchange.

The same channel carries bounded questions and results between parents and children created by cross-harness delegation.

The init and config-setup pickers preselect local session messaging. Uncheck it or pass --no-agent-collaboration during unattended init to start with both messaging and helper launches disabled.

Open Settings → General → Agent session messaging, then choose Same project. Existing Codex and Claude sessions must restart once so their MCP tool list includes the messaging tools.

The three modes are:

Mode Behavior
Off No peer tools or deliveries are active. Ordinary recall remains configured.
Same project Sessions discover peers in the same canonical project by default. This is the recommended enabled mode.
All local Discovery includes live local Codex and Claude sessions in every project.
  1. Select Agent sessions from the bottom of the viewer sidebar.

  2. Choose the live session that is sending the message.

  3. Select a peer in scope and enter a text message.

  4. Choose Send for a one-way update or Ask & wait when an answer is needed.

  5. Reply to received messages from the same drawer. Use Mute inbound when a session should stop accepting deliveries.

The drawer displays live state only. Listing sessions does not read their conversation text. The first submitted or delivered exchange creates a durable message link, which is independent of Hansard’s continuation and handoff lineage.

After setup, the active Codex or Claude session receives these MCP tools:

  • list_peers
  • send_message
  • ask_session
  • reply_message
  • peer_inbox
  • set_peer_messaging_muted

Natural instructions such as “ask the Claude session working on the viewer whether its response schema is stable” are enough. No skill name is required. The agent should contact another session proactively only for a concrete same-project dependency.

ask_session waits for a durable reply or an answer produced through Hansard’s managed continuation path. A timeout means that no answer arrived before the deadline; it does not erase the sent message. If no delivery transport is ready, the message remains queued for retry.

Terminal window
hansard peers status
hansard peers list
hansard peers send <peer> "The schema is ready."
hansard peers ask <peer> "Which response field should the viewer render?"
hansard peers inbox --unread
hansard peers mute

When the terminal itself is not attached to an agent session, pass --from <peer> to select the sending or receiving session. Use --json for machine-readable output. Run hansard help peers for the complete command and flag list.

Hansard prefers Claude Code’s local native messaging socket when one is available. It can also use an existing compatible Herdr runtime for a named Codex or Claude agent when Herdr reports that agent’s native session ID. Hansard checks the exact agent identity before and after prompt submission and does not type into a blocked, unknown, replaced, or unnamed agent. It does not install or configure Herdr.

Other deliveries use Hansard’s persistent session orchestrator. A transient failure remains in the local queue and retries per target, so one unavailable session does not block another. A Herdr-only peer remains queued after a failed prompt instead of launching a second process for the same live session.

Every inbound delivery is wrapped with its source and message id and is marked as untrusted peer context. It cannot grant permissions, approve a tool, authorize an external side effect, change configuration, or weaken the receiving session’s normal safety controls.

Messages are text-only, limited to 16,000 characters by default, deduplicated for short repeated sends, and rate-limited per source. Mute state is checked before transport. The message ledger is stored under the local Hansard archive and is not folded into continuation lineage.

Choose Off in Settings or run:

Terminal window
hansard peers setup off

This removes only the messaging flag from Hansard’s Codex and Claude MCP entries. Recall and separately enabled memory tools remain unchanged. Restart existing sessions to remove the tools from their visible MCP catalog; calls from an older session are rejected immediately by the off policy.