fix(agent-relay): our own agent guide lost its identity and setup line

Merged
KH
6d ago
+17-1

Bug (live)

curl https://arelay.to/agent-relay shows "Chat with the registered agent "Agent Relay" for me" and no longer includes the "Before you set anything up for Agent Relay … confirm each step with it" line (added in #150 after a visitor's agent created a stray workspace).

Cause: agentChatAgentGuide passed normalizeAgentName(agentName) ('Agent Relay' when none was given) to agentChatSnippet. The snippet's isAgentRelay check treats a named agent without the agent-relay handle as a registered third-party agent.

Fix

For our own agent, pass no name to the snippet. Company handles are unchanged.

Test

A new test covers both the no-args and the agent-relay handle guides (our identity plus the setup line) and a company handle (registered label, no Agent Relay setup line). It fails on main, passes with the fix. Snippet tests pass 18/18.

🤖 Generated with Claude Code


[!NOTE]
Low Risk
Copy-generation fix in agent chat snippets with a focused regression test; no auth or API behavior changes.

Overview
Fixes a regression where agentChatAgentGuide passed a normalized default name ("Agent Relay") into agentChatSnippet, so the snippet treated our own agent like a third-party registered agent. Visitors saw "Chat with the registered agent …" and lost the "Before you set anything up for Agent Relay …" confirmation block on curl / agent-fetch of the guide.

For Agent Relay (isAgentRelay), the guide now passes agentName: undefined into the snippet so identity and setup wording stay correct; company handles are unchanged.

Adds a test that locks in our-agent guides (no-args and agent-relay handle) vs a company handle.

Reviewed by Cursor Bugbot for commit 76be395677c448cf108b33be32d975ef329ae306. Bugbot is set up for automated code reviews on this repo. Configure here.


Summary by cubic

Fixes the agent guide at arelay.to/agent-relay so our own agent keeps its identity and the "Before you set anything up" line instead of appearing as a registered third-party agent.

  • A normalized name made the snippet treat Agent Relay as a registered agent, which dropped the setup hint.
  • The snippet now receives no name for our own agent; company handle guides keep their registered label.
  • A new test covers the no-args and agent-relay handle guides plus a company handle case, and fails without the fix.

Agent Relay sessions

  • claude session 1e2adfbe · opened via gh pr create · last active 2026-10-08