Skip to content

messaging skill 0.2.0: works with a relay init core, uses the fixed-route probe commands - #195

Merged
khaliqgant merged 7 commits into
mainfrom
feat/messaging-skill-relay-init-core
Oct 31, 2026
Merged

khaliqgant merged 7 commits into
mainfrom
feat/messaging-skill-relay-init-core

Conversation

@kjgbot

@kjgbot kjgbot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

What

messaging-agents-on-the-relay 0.2.0 now works with any Agent Relay core on the computer: the desktop app's, or the one relay init starts. Before, it assumed a signed-in, registered desktop and taught relay socket-request.

  • MCP tools first. If the session has list_relay_agents and send_relay_message from the server named exactly agent-relay-sessions (the name the core uses, hosted_mcp::SERVER_NAME), the skill uses those and skips the socket steps. A same-named tool from a ChatGPT connector (agent_relay_in_chatgpt.send_relay_message), a server named agent-relay, or any other connector never counts. agent-relay is excluded because it is also the name of the local relay mcp server, Capy's relay-events server and the ChatGPT plugin. This step comes from the core's source and the real configs; it was not run end to end.

  • Finding the route. The skill uses the commands the session was handed, when they are agent-relay-probe relay … commands. Otherwise it reads the exact probe and socket from the files the core writes: Claude Code's permissions.allow in ~/.claude/settings.json, or Codex's ~/.codex/rules/agent-relay.rules. The fallback is the core's pointer file ~/.agentworkforce/desktop/relay-socket plus the known probe paths, including the desktop's space-free link and ~/.agentworkforce/relay/bin/agent-relay-probe. No sign-in is needed.

  • Commands. First it tries the fixed-route subcommands from the security fix (relay branch fix/codex-rules-fixed-routes): relay agents --socket …, relay whoami --socket … and relay send --socket … --to|--address|--channel … [--reply-to …] --body …. The words must be literal: absolute paths, no pipes or variables, and the socket single-quoted. That is the form Codex's prefix rules and Claude's permission rules match, so the commands run without a prompt. - Older-core fallback. Today's desktop app (agent-relay-probe 2026.10.67) has no relay agents, relay send or relay whoami, and fails with unrecognized subcommand. On that error the skill falls back to the 0.1 route that works there today (step 5):

    • PROBE relay socket-request --socket 'SOCKET' --method GET --path /agents
    • printf '%s' '<msg>' | PROBE relay socket-request … --method POST --path '/send?to=NAME' (that probe has no --body; the skill uses --body when --help lists it)
    • curl --unix-socket on Linux, or in Claude Code when there is no probe, as 0.1 did

    This route may ask for approval, the same as desktop users see today. "Update Agent Relay" is now a note, not the only option. The probe search also covers the desktop's ~/.local/bin/agent-relay-probe copy and Contents/Helpers/Agent Relay Helper.

  • Route rule. Apart from the agent-relay-sessions tools above, it never uses the "Agent Relay in ChatGPT" connector or any other cloud connector. If the local route fails, the skill says so and stops.

  • The peer-safety rules, the long-message advice and the failure table are kept. The table is updated for "unrecognized subcommand" (older core), approval prompts, and a new session that is not on the relay yet.

  • README. Codex 0.163 loads global skills from ~/.agents/skills as well as $CODEX_HOME/skills, verified with codex app-server skills/list in an isolated HOME. So npx skills add -g --agent codex works. Messaging no longer needs the desktop skill.

  • prpm: skill 0.2.0, agent-relay-setup collection 1.1.5.

Coordination

  • relay feat/init-installs-relay-skill (feat(init): install the Agent Relay messaging skill for every injected tool relay#2032) makes relay init install this skill, pinned to this branch's head commit 7615fcf. After this PR merges, the pin there must move to the merge commit.
  • Security fix fix/codex-rules-fixed-routes. The skill depends on its relay agents / relay send / relay whoami. A core older than that release prints unrecognized subcommand, and the skill then uses the socket-request route in step 5. Please keep these subcommand names and the --socket position stable.
  • relay #2029 gives Codex a session-start note. On its current head that note still names relay socket-request … --method GET --path /agents. Once it is rebased on the security fix it should name relay agents --socket … and relay send --socket … --to <name> --body …, which is what this skill says. The skill says to run the handed commands only when they are probe commands.
  • Gap found (not in this PR). On the security-fix probe, Claude Code's SessionStart context still hands Claude curl --unix-socket … http://relay/agents and /send. Its own permissions.allow rules allow only the probe commands, so the curl asks for approval. In two fresh Claude sessions, Claude acted on that hint before the skill could. That context should name the probe commands.
  • Not changed: the copies under plugins/grok/agent-relay and plugins/claude/agent-relay-channel, and the older "Codex does not load ~/.agents/skills" notes in the desktop, sessions and subscribing skills. Those are a follow-up.

Verified

Against the real desktop app, read-only (agent-relay-probe 2026.10.67; ~/.local/bin/agent-relay-probe is byte-identical to Contents/Helpers/Agent Relay Helper):

  • relay --help lists only read and socket-request among the session commands, and relay agents gives error: unrecognized subcommand 'agents'.
  • socket-request --help has no --body.
  • relay socket-request --socket '<real>/run/relay.sock' --method GET --path /agents returned the roster.
  • Nothing was sent from the real desktop identity.

Against an isolated relay init core (macOS, isolated HOME, security-fix probe build 1193cb7fb):

  • Codex 0.163, fresh session, no prior Relay message, asked "Who else is on Agent Relay? Send a DM to alice". It read the skill, then ran <probe> relay agents --socket '<…>/relay.sock' and <probe> relay send --socket '<…>' --to alice --body '…'. There was no approval prompt and no connector. ok:true, and the CLI showed alice's inbox holding the message. A new thread in Codex 0.166 did the same; its first try got not_a_relay_session before the thread had joined, and it reported that honestly instead of switching route.
  • Claude Code 2.1, manual permission mode. Claude first followed the core's curl hint (see Gap above). After it was declined and Claude was told to use the skill, it read settings.json (one file-read prompt, because the file is outside the project), then ran relay agents and relay send with no prompt. Alice received the message.
  • After the fallback commit (ac9fb90), in a fresh Codex 0.166 session:
    • The new path still runs with no prompt: relay agents, then relay send --address alice@direct --body … returned ok:true. The thread's first turn got not_a_relay_session before it had joined, and the retry succeeded.
    • Asked to use step 5, Codex ran socket-request --method GET --path /agents and the printf … | socket-request --method POST --path '/send?to=alice' pipe. Each asked for approval once, as expected, and alice's inbox showed "fallback route test".

🤖 Generated with Claude Code


Agent Relay sessions

  • claude session 8ab900cc · opened via gh pr create · last active 2026-10-31

kjgbot and others added 4 commits October 30, 2026 16:43
…oute probe commands

The skill assumed a signed-in Agent Relay Desktop and taught
`relay socket-request`, which Codex prefix rules cannot constrain. It now
works with any Agent Relay core on the computer (the desktop app's or the
one `relay init` starts): it finds the session socket from the core's
pointer file and the probe from the Codex rules file or the known install
paths, then lists agents and sends with `relay agents`, `relay send` and
`relay whoami`, written literally so Codex's sandbox rules and Claude
Code's permission rules run them without asking. It names the cloud
connectors it must never use as a route and keeps the peer-safety rules.

README: Codex 0.163 loads global skills from ~/.agents/skills as well as
$CODEX_HOME/skills, so `npx skills add -g --agent codex` works.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ks for approval

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…iles

A discovery shell script with variables asks for approval in Claude Code.
The core already writes the exact probe and socket into Claude Code's
permissions.allow and Codex's agent-relay.rules, so the skill reads them
with the file-reading tool, which asks for nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bce6330a-921f-4540-88fd-aa21082dd027
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

2 flags not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

@greptile-apps

greptile-apps Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The PR changes how installed messaging instructions reach local Agent Relay peers.

Confirm the MCP sender and workspace before merging.

Fix All in CodexFindings

  1. P1 Messages use the wrong sender ▶
Fix with agent prompt
### Issue 1
skills/messaging-agents-on-the-relay/SKILL.md:19-23
If `agent-relay-sessions` is installed but no session note supplies `join_relay`, this section tells the agent to send through it without checking the sender or workspace. The setup skill documents this as a cloud server whose OAuth messages use the agent name approved at consent, not necessarily this local session's identity. An existing connection can therefore send as another agent or into another workspace.

Keep the socket route unless the MCP connection's sender and workspace have been confirmed to match this session.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Updates the messaging skill to work with desktop and relay init cores.

  • Agents can message peers through any local Agent Relay core.
  • Older desktop cores still have a local route for messaging peers.
  • Codex users can follow the README’s updated global skill install guidance.

Reviews (4) · Last reviewed commit: "messaging skill: use the agent-relay-ses..." · Reviewed by Greptile

kjgbot and others added 3 commits October 30, 2026 17:18
…ores

The installed desktop app (agent-relay-probe 2026.10.67) has no relay
agents, send or whoami. On "unrecognized subcommand" the skill now uses the
0.1 route that works there: relay socket-request for GET /agents and
POST /send with the body on stdin, or curl where 0.1 used it. That route
may ask for approval, as it does today. Updating Agent Relay is now a note,
not the only option, and the no-cloud-connector rule covers both routes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s, quoting, reply hints)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ion has them

Only the server named agent-relay-sessions counts, which is the name the
core uses. A same-named tool from a ChatGPT or other cloud connector, or from
a server named agent-relay, never does. The socket and socket-request routes
are unchanged for sessions without those tools.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@khaliqgant
khaliqgant merged commit 410a9de into main Oct 31, 2026
3 checks passed
@khaliqgant
khaliqgant deleted the feat/messaging-skill-relay-init-core branch October 31, 2026 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants