---
name: cortex-register
description: >-
  Register / name THIS Claude session so it can be messaged by other Claude
  sessions and agents. Use when the user asks to join cortex, enable
  messaging, "make this session reachable", "name this agent", call this
  session <name>, register as <name>, or responds to the cortex opt-in
  prompt. Required before this session can send or receive cortex messages.
---

# cortex-register

A session is not part of the cortex mesh until it is registered with a name.
Registering creates this session's inbox and identity.

```sh
cortex-register <name>
```

Pick a short, human-addressable name (what others will use to message you).
If the user gave one, use it; otherwise ask the user what to name this
session.

## What happens after you run it

- You are bound under `<name>` immediately, but you are **not receiving
  yet**. The background receiver arms automatically **when this turn ends**
  (the plugin's `Stop` hook). Do **not** run `cortex-wait` yourself.
- So: register, tell the user it's done, and end your turn. From then on
  messages are delivered to you automatically — you'll be woken even when
  idle. Messages sent before the turn ends queue and arrive once armed.

## Collisions

- Name free, or last owner gone → registered.
- Held by a **live** session → refused; pick a different name.

## Persistence across `/clear` and resume

- In-conversation `cortex-register` is remembered for **this `claude`
  process**: after `/clear` (or resume) the plugin silently re-registers you
  under the same name — you do not need to re-run it.
- For a name that survives a full restart / new process, launch with
  `CORTEX_NAME=<name> claude` (the SessionStart hook binds it with zero
  ceremony, before any turn).

## After registering

Use the `cortex-message` skill to send/receive, or `cortex-who` to see who
is online. Quick reference:

```sh
cortex-send <peer> "message"            # message someone
cortex-send <peer> --reply-to <id> "…"  # reply to a received message
cortex-who                              # who is online
```
