---
title: "My agents can message my coding sessions now, and back"
description: "I was the relay between my agents and my Claude Code sessions.. now agents show up as native peers and either side can message the other."
url: "https://michael.zazon.us/notes/my-agents-can-message-my-coding-sessions-now-and-back"
published: "2026-10-27T12:00:00-04:00"
kind: "build-log"
subject: "ai-agents"
tags: ["agents","claude"]
---
There was a point where work repeatedly stalled because of.. me. The only way for the host session to get a message to my agent was for me to post a message in Slack from my account, which the agent couldn't tell from me actually typing it. And there was no way at all for the agent to get a message to the session. So I was copying messages by hand between them, and anything that needed both sides to work was waiting on me. I realized I was the integration layer between two pieces of software that I run.

I wanted to do this in a more Claude Code native way. [Claude Code](https://docs.anthropic.com/en/docs/claude-code/overview) already has a list of agents that sessions can see and message. So how could I get my agents on that list? Also, if the peer is on that list, I don't run into the Slack problem where all the messages appear to be from me.

## Agents on the peer list

This way, the agents show up as regular peers in Claude Code's own list of agents. The session messages the agent the same way it would message another session, and the agent responds. The session doesn't need to know much about it at all.. no containers, no Slack, just a name on a list (which took me a moment to appreciate). Under the hood, the [NanoClaw](https://github.com/qwibitai/nanoclaw) host starts one small stand-in process for each allowed agent and registers it as a peer using the agent's name. The agents themselves reply through the host-messaging tool. (You can read more about NanoClaw and why I run it in the background in [Why I dropped OpenClaw for a smaller agent runtime](https://michael.zazon.us/notes/why-i-dropped-openclaw-for-a-smaller-agent-runtime).)

[Diagram: A session sends an NDJSON frame to the stand-in over a Unix socket; the stand-in checks the registry, hands off over IPC, and the agent replies through an MCP tool](https://michael.zazon.us/notes/my-agents-can-message-my-coding-sessions-now-and-back)

## Who sent this?

The Slack experience taught me that the key question on arrival is: who *actually* sent this? I realized the claimed name is worthless.. a message can assert any name it wants. So I grab the sender from the session registry. Containers can't touch the registry, so an agent can't pretend to be another one. Now every message includes its true sender, something my old Slack posts never managed.

> [!note] Don't trust the claimed name
> A message can assert any name it wants. I take the sender from the session registry. Containers can't touch the registry.

I wanted proof, so I made my work pass some acceptance gates, one of which was a spoof test. It passed: the sender stayed the real sender. I also capped it at 30 messages an hour per agent, so no one agent can spam my sessions with traffic.

## It works while the agent is asleep

My favorite thing is what happens when I stop the agent. Since these agents run in containers, they aren't always up. So if an agent is stopped, is the peer any good? I have a stand-in that lives on the host, outside the container, so even if the agent is stopped, it still gets the message. I tested it, and it answered in about 16 seconds. The session doesn't know the difference between an agent that's sleeping and any other peer on the list.

## Sessions and agents, no middleman

This is a real game changer because now sessions and agents can coordinate without me in the middle. A session can ask an agent directly, and the agent can come back to the session on its own, so I'm not holding up work waiting for me to carry it. I've already rolled this out to five agents, including Otto and Sentinel.

This fits right into how I already work.. I'm used to running [several Claude Code sessions at a time](https://michael.zazon.us/notes/running-six-to-nine-claude-code-sessions-at-once), and I run my agents [like a small team](https://michael.zazon.us/notes/running-an-agent-fleet-like-a-small-team), where they propose and I rule. The sessions and agents were already on either side of me, so taking the hand-copying out of the loop keeps all the decisions with me but finally gets rid of my job as the human text courier. And I get it done with a sender I can actually trust every time.

Next up.. more agents on the list.