Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

chore(agents): one @macro mention, aimed by the agents rollout (#6907)

Wolf Mermelsteinac83a9094573
diff --git a/apps/web/src/features/channel/Input/tests/input-slots.test.tsx b/apps/web/src/features/channel/Input/tests/input-slots.test.tsx
index a5b0e30232..150a825733 100644
--- a/apps/web/src/features/channel/Input/tests/input-slots.test.tsx
+++ b/apps/web/src/features/channel/Input/tests/input-slots.test.tsx
@@ -12,6 +12,7 @@ import { Portal } from 'solid-js/web';
import { beforeEach, describe, expect, it, vi } from 'vitest';
const editorMocks = vi.hoisted(() => ({
+ agentsEnabled: false,
cursorEnabled: false,
clear: vi.fn(),
focus: vi.fn(),
@@ -99,6 +100,9 @@ vi.mock('@core/codex/flag', () => ({
vi.mock('@core/cursor/flag', () => ({
useCursorAgentsAccess: () => () => editorMocks.cursorEnabled,
}));
+vi.mock('../../use-chat-v3-agents-flag', () => ({
+ useChatV3AgentsFlag: () => () => editorMocks.agentsEnabled,
+}));
// Several service clients in StaticMarkdown's import graph build websocket
// connections at module scope, which jsdom cannot do. Stub the builder so
@@ -325,6 +329,8 @@ vi.mock('@queries/messages/typing', () => ({
usePostTypingUpdateMutation: () => ({ mutate: vi.fn() }),
}));
+import { MACRO_AGENT_PRINCIPAL_ID } from '@core/constant/macroAgent';
+import { MACRO_NEW_PRINCIPAL_ID } from '@core/constant/macroNew';
import { cursorMentionUser } from '../../macroAi';
import { ThreadReplyChannelInput } from '../../Thread/ThreadReplyChannelInput';
import { createInputAttachmentTracker } from '../attachment-tracker';
@@ -356,6 +362,7 @@ function render(ui: () => JSX.Element) {
describe('Input slots', () => {
beforeEach(() => {
+ editorMocks.agentsEnabled = false;
editorMocks.cursorEnabled = false;
editorMocks.clear.mockClear();
editorMocks.focus.mockClear();
@@ -423,6 +430,31 @@ describe('Input slots', () => {
);
});
+ it('offers a single Macro mention, aimed by the agents rollout', () => {
+ render(() => <ChannelInput input={baseInput} />);
+ expect(
+ editorMocks.mentionUsers?.().filter((user) => user.name === 'Macro')
+ ).toEqual([
+ {
+ id: MACRO_AGENT_PRINCIPAL_ID,
+ name: 'Macro',
+ email: 'Macro',
+ },
+ ]);
+
+ editorMocks.agentsEnabled = true;
+ render(() => <ChannelInput input={baseInput} />);
+ expect(
+ editorMocks.mentionUsers?.().filter((user) => user.name === 'Macro')
+ ).toEqual([
+ {
+ id: MACRO_NEW_PRINCIPAL_ID,
+ name: 'Macro',
+ email: 'Macro',
+ },
+ ]);
+ });
+
it('hides Cursor outside its rollout, including supplied bot entries', () => {
render(() => (
<ChannelInput
diff --git a/apps/web/src/features/channel/macroAi.ts b/apps/web/src/features/channel/macroAi.ts
index 6823f25d1c..f29df01b87 100644
--- a/apps/web/src/features/channel/macroAi.ts
+++ b/apps/web/src/features/channel/macroAi.ts
@@ -18,10 +18,7 @@ import {
MACRO_CODER_NAME,
MACRO_CODER_PRINCIPAL_ID,
} from '@core/constant/macroCoder';
-import {
- MACRO_NEW_NAME,
- MACRO_NEW_PRINCIPAL_ID,
-} from '@core/constant/macroNew';
+import { MACRO_NEW_PRINCIPAL_ID } from '@core/constant/macroNew';
import type { IUser } from '@core/user/types';
// Re-export the shared Macro identity under the names used in this package.
@@ -36,16 +33,20 @@ export { isMacroCoderId } from '@core/constant/macroCoder';
export { isMacroNewId } from '@core/constant/macroNew';
/**
- * A synthetic [`IUser`] entry so Macro appears in the channel `@`-mention
+ * The single synthetic [`IUser`] entry for Macro in the channel `@`-mention
* typeahead. The mention rides the existing user-mention machinery and is
* re-tagged as a bot mention at send time (see `authoredMentions`). `email` is set
* to the display name so the typeahead shows just "Macro". The id uses the
* canonical `bot|<uuid>` principal form so persisted mention content matches
* bot sender/participant ids.
+ *
+ * Which Macro answers is the rollout's business, not the mentioning user's:
+ * under chat-v3 `@macro` opens an agent session, otherwise it gets the classic
+ * in-channel reply. Only ever one entry, named "Macro" either way.
*/
-export function macroAiMentionUser(): IUser {
+export function macroMentionUser(agentSessions: boolean): IUser {
return {
- id: MACRO_AGENT_PRINCIPAL_ID,
+ id: agentSessions ? MACRO_NEW_PRINCIPAL_ID : MACRO_AGENT_PRINCIPAL_ID,
name: MACRO_AGENT_NAME,
email: MACRO_AGENT_NAME,
};
@@ -53,7 +54,7 @@ export function macroAiMentionUser(): IUser {
/**
* A synthetic [`IUser`] entry so Macro Coder appears in the channel
- * `@`-mention typeahead, exactly like [`macroAiMentionUser`]. Mentioning it
+ * `@`-mention typeahead, exactly like [`macroMentionUser`]. Mentioning it
* opens a sandboxed coding-agent session rather than a chat reply.
*/
export function macroCoderMentionUser(): IUser {
@@ -64,19 +65,6 @@ export function macroCoderMentionUser(): IUser {
};
}
-/**
- * A synthetic [`IUser`] entry so macro(new) appears in the channel
- * `@`-mention typeahead, exactly like [`macroAiMentionUser`]. Mentioning it
- * opens an agent session on the in-process runtime rather than a chat reply.
- */
-export function macroNewMentionUser(): IUser {
- return {
- id: MACRO_NEW_PRINCIPAL_ID,
- name: MACRO_NEW_NAME,
- email: MACRO_NEW_NAME,
- };
-}
-
/**
* The Cursor bot as a synthetic mention user, exactly like
* [`macroCoderMentionUser`]. Mentioning it opens an agent session served by
diff --git a/apps/web/src/features/channel/use-agent-mention-users.test.ts b/apps/web/src/features/channel/use-agent-mention-users.test.ts
new file mode 100644
index 0000000000..5907c3879b
--- /dev/null
+++ b/apps/web/src/features/channel/use-agent-mention-users.test.ts
@@ -0,0 +1,87 @@
+import {
+ MACRO_AGENT_NAME,
+ MACRO_AGENT_PRINCIPAL_ID,
+} from '@core/constant/macroAgent';
+import { MACRO_NEW_PRINCIPAL_ID } from '@core/constant/macroNew';
+import type { IUser } from '@core/user/types';
+import { createRoot, createSignal } from 'solid-js';
+import { beforeEach, describe, expect, it, vi } from 'vitest';
+import { useAgentMentionUsers } from './use-agent-mention-users';
+
+const flags = vi.hoisted(() => ({
+ agents: (): boolean => false,
+ cursor: (): boolean => false,
+}));
+vi.mock('@core/constant/featureFlags', () => ({
+ enableChatV3Agents: { key: 'enable-chat-v3-agents' },
+ enableCursorAgents: { key: 'enable-cursor-agents' },
+}));
+vi.mock('@app/lib/analytics/posthog', () => ({
+ useFeatureFlag: (flag: { key: string }) => () => ({
+ enabled:
+ flag.key === 'enable-chat-v3-agents' ? flags.agents() : flags.cursor(),
+ }),
+}));
+
+function macroEntries(users: IUser[]): IUser[] {
+ return users.filter((user) => user.name === MACRO_AGENT_NAME);
+}
+
+describe('useAgentMentionUsers', () => {
+ beforeEach(() => {
+ flags.agents = () => false;
+ flags.cursor = () => false;
+ });
+
+ it('offers the classic Macro bot as the only Macro entry without the rollout', () => {
+ createRoot((dispose) => {
+ const users = useAgentMentionUsers(() => []);
+ expect(macroEntries(users())).toEqual([
+ {
+ id: MACRO_AGENT_PRINCIPAL_ID,
+ name: MACRO_AGENT_NAME,
+ email: MACRO_AGENT_NAME,
+ },
+ ]);
+ dispose();
+ });
+ });
+
+ it('points the same entry at the agent bot within the rollout', () => {
+ createRoot((dispose) => {
+ const [enabled, setEnabled] = createSignal(false);
+ flags.agents = enabled;
+ const users = useAgentMentionUsers(() => []);
+ expect(macroEntries(users()).map((user) => user.id)).toEqual([
+ MACRO_AGENT_PRINCIPAL_ID,
+ ]);
+ setEnabled(true);
+ expect(macroEntries(users()).map((user) => user.id)).toEqual([
+ MACRO_NEW_PRINCIPAL_ID,
+ ]);
+ dispose();
+ });
+ });
+
+ it('keeps one Macro entry when the other Macro bot is already in the list', () => {
+ createRoot((dispose) => {
+ flags.agents = () => true;
+ const users = useAgentMentionUsers(() => [
+ {
+ id: MACRO_AGENT_PRINCIPAL_ID,
+ name: 'Macro',
+ email: 'Macro',
+ },
+ {
+ id: MACRO_NEW_PRINCIPAL_ID,
+ name: 'macro(new)',
+ email: 'macro(new)',
+ },
+ ]);
+ expect(macroEntries(users()).map((user) => user.id)).toEqual([
+ MACRO_NEW_PRINCIPAL_ID,
+ ]);
+ dispose();
+ });
+ });
+});
diff --git a/apps/web/src/features/channel/use-agent-mention-users.ts b/apps/web/src/features/channel/use-agent-mention-users.ts
index 297c24e1ef..e77db72f22 100644
--- a/apps/web/src/features/channel/use-agent-mention-users.ts
+++ b/apps/web/src/features/channel/use-agent-mention-users.ts
@@ -1,10 +1,6 @@
import { isClaudeBotId } from '@core/constant/claudeAgent';
import { isCodexBotId } from '@core/constant/codexAgent';
import { isCursorBotId } from '@core/constant/cursorAgent';
-import {
- enableChatV3Agents,
- isFeatureEnabled,
-} from '@core/constant/featureFlags';
import { useCursorAgentsAccess } from '@core/cursor/flag';
import type { IUser } from '@core/user/types';
import { uniqueByKey } from '@core/util/compareUtils';
@@ -16,10 +12,10 @@ import {
isMacroAiId,
isMacroCoderId,
isMacroNewId,
- macroAiMentionUser,
macroCoderMentionUser,
- macroNewMentionUser,
+ macroMentionUser,
} from './macroAi';
+import { useChatV3AgentsFlag } from './use-chat-v3-agents-flag';
/**
* Built-in agent entries shared by every message composer. Account setup does
@@ -27,30 +23,30 @@ import {
* thread when setup is needed, so replies link to Settings → Harness rather
* than the entry disappearing. The built-in Cursor entry follows the Cursor
* rollout flag. Mentions are re-tagged as bot mentions at send time.
+ *
+ * Macro gets exactly one entry. Both Macro bots are dropped from the incoming
+ * list first, so a stray participant or channel-bot row cannot put a second
+ * "Macro" in the menu; the rollout then decides which id that one entry
+ * carries.
*/
export function useAgentMentionUsers(
users: Accessor<IUser[]>,
enabled: Accessor<boolean> = () => true
): Accessor<IUser[]> {
const canUseCursor = useCursorAgentsAccess();
+ const canUseAgents = useChatV3AgentsFlag();
return () => {
if (!enabled()) return users();
const base = users().filter(
- (user) => canUseCursor() || !isCursorBotId(user.id)
+ (user) =>
+ (canUseCursor() || !isCursorBotId(user.id)) &&
+ !isMacroAiId(user.id) &&
+ !isMacroNewId(user.id)
);
- if (
- isFeatureEnabled(enableChatV3Agents) &&
- !base.some((user) => isMacroCoderId(user.id))
- ) {
+ if (canUseAgents() && !base.some((user) => isMacroCoderId(user.id))) {
base.unshift(macroCoderMentionUser());
}
- if (
- isFeatureEnabled(enableChatV3Agents) &&
- !base.some((user) => isMacroNewId(user.id))
- ) {
- base.unshift(macroNewMentionUser());
- }
if (canUseCursor() && !base.some((user) => isCursorBotId(user.id))) {
base.unshift(cursorMentionUser());
}
@@ -60,9 +56,7 @@ export function useAgentMentionUsers(
if (!base.some((user) => isClaudeBotId(user.id))) {
base.unshift(claudeMentionUser());
}
- if (!base.some((user) => isMacroAiId(user.id))) {
- base.unshift(macroAiMentionUser());
- }
+ base.unshift(macroMentionUser(canUseAgents()));
return uniqueByKey(base, (user) => user.id);
};
}
diff --git a/apps/web/src/features/channel/use-chat-v3-agents-flag.ts b/apps/web/src/features/channel/use-chat-v3-agents-flag.ts
index fa48af2f41..124cbd93f0 100644
--- a/apps/web/src/features/channel/use-chat-v3-agents-flag.ts
+++ b/apps/web/src/features/channel/use-chat-v3-agents-flag.ts
@@ -4,7 +4,8 @@ import type { Accessor } from 'solid-js';
/**
* Whether the AI agents surfaces are enabled: the Macro Coder `@`-mention
- * entry and the folded agent-session view in channels. Reactive, so the
+ * entry, the folded agent-session view in channels, and whether `@macro`
+ * opens an agent session instead of the classic reply. Reactive, so the
* gated surfaces appear once PostHog answers rather than only on remount.
*/
export function useChatV3AgentsFlag(): Accessor<boolean> {
diff --git a/apps/web/src/lib/core/constant/featureFlags.ts b/apps/web/src/lib/core/constant/featureFlags.ts
index c56267ebce..dd789aa6ca 100644
--- a/apps/web/src/lib/core/constant/featureFlags.ts
+++ b/apps/web/src/lib/core/constant/featureFlags.ts
@@ -657,8 +657,10 @@ export const enableActivityFeed = defineFlag({
default: onInDev,
});
-// AI agents: the Macro Coder mention entry and the folded agent-session view
-// in channels. Override with VITE_ENABLE_CHAT_V3_AGENTS.
+// AI agents: the Macro Coder mention entry, the folded agent-session view in
+// channels, and which bot the single `@macro` mention targets — the agent
+// session when on, the classic in-channel reply when off.
+// Override with VITE_ENABLE_CHAT_V3_AGENTS.
export const enableChatV3Agents = defineFlag({
key: 'enable-chat-v3-agents',
env: 'ENABLE_CHAT_V3_AGENTS',
diff --git a/apps/web/src/lib/core/constant/macroNew.ts b/apps/web/src/lib/core/constant/macroNew.ts
index 50132c5d63..690e995199 100644
--- a/apps/web/src/lib/core/constant/macroNew.ts
+++ b/apps/web/src/lib/core/constant/macroNew.ts
@@ -1,26 +1,21 @@
/**
- * Identity for the first-party "macro(new)" system bot. Mirrors
- * `bot_id::MACRO_NEW_BOT_ID` on the backend. Deliberately a distinct bot from
- * Macro (see `macroAgent.ts`): mentioning Macro answers in chat, while
- * mentioning macro(new) opens an agent session on the in-process runtime.
+ * Identity for the agent-session half of Macro. Mirrors
+ * `bot_id::MACRO_NEW_BOT_ID` on the backend. A distinct bot from the classic
+ * chat reply (see `macroAgent.ts`) because one id cannot mean both, but not a
+ * distinct persona: both are "Macro", and the chat-v3 rollout decides which of
+ * the two a single `@macro` mention targets.
*/
export const MACRO_NEW_BOT_ID = '00000000-0000-0000-0000-00000000a2a2';
/**
- * Canonical principal id for macro(new), matching the `bot|<uuid>` form used
- * for bot senders and participants everywhere else.
+ * Canonical principal id for the agent-session Macro bot, matching the
+ * `bot|<uuid>` form used for bot senders and participants everywhere else.
*/
export const MACRO_NEW_PRINCIPAL_ID = `bot|${MACRO_NEW_BOT_ID}`;
-/** Display name for macro(new). */
-export const MACRO_NEW_NAME = 'macro(new)';
-
-/** Handle used to find macro(new) in the mention typeahead (`@macro-new`). */
-export const MACRO_NEW_HANDLE = 'macro-new';
-
/**
- * Whether an id refers to the macro(new) bot. Accepts both the bare UUID and
- * the `bot|<uuid>` participant/sender form.
+ * Whether an id refers to the agent-session Macro bot. Accepts both the bare
+ * UUID and the `bot|<uuid>` participant/sender form.
*/
export function isMacroNewId(id: string | undefined): boolean {
if (!id) return false;
diff --git a/apps/web/src/lib/queries/bots/first-party-bot-name.ts b/apps/web/src/lib/queries/bots/first-party-bot-name.ts
index f5252206af..0e0c4641c8 100644
--- a/apps/web/src/lib/queries/bots/first-party-bot-name.ts
+++ b/apps/web/src/lib/queries/bots/first-party-bot-name.ts
@@ -2,7 +2,7 @@ import { CODEX_BOT_NAME, isCodexBotId } from '@core/constant/codexAgent';
import { CURSOR_BOT_NAME, isCursorBotId } from '@core/constant/cursorAgent';
import { isMacroAgentId, MACRO_AGENT_NAME } from '@core/constant/macroAgent';
import { isMacroCoderId, MACRO_CODER_NAME } from '@core/constant/macroCoder';
-import { isMacroNewId, MACRO_NEW_NAME } from '@core/constant/macroNew';
+import { isMacroNewId } from '@core/constant/macroNew';
import { isMacroSystemId, MACRO_SYSTEM_NAME } from '@core/constant/macroSystem';
/**
@@ -10,9 +10,10 @@ import { isMacroSystemId, MACRO_SYSTEM_NAME } from '@core/constant/macroSystem';
* from constants so it never waits on the bots list. Undefined for team bots.
*/
export function firstPartyBotName(id: string): string | undefined {
- if (isMacroAgentId(id)) return MACRO_AGENT_NAME;
+ // Both Macro bots present as "Macro": the chat reply and the agent session
+ // are the same persona to a reader, only a different id on the wire.
+ if (isMacroAgentId(id) || isMacroNewId(id)) return MACRO_AGENT_NAME;
if (isMacroCoderId(id)) return MACRO_CODER_NAME;
- if (isMacroNewId(id)) return MACRO_NEW_NAME;
if (isCodexBotId(id)) return CODEX_BOT_NAME;
if (isCursorBotId(id)) return CURSOR_BOT_NAME;
if (isMacroSystemId(id)) return MACRO_SYSTEM_NAME;
diff --git a/crates/agent_harness/src/domain/model.rs b/crates/agent_harness/src/domain/model.rs
index 9e5181d3ab..7e990551fb 100644
--- a/crates/agent_harness/src/domain/model.rs
+++ b/crates/agent_harness/src/domain/model.rs
@@ -135,7 +135,7 @@ pub enum AgentKind {
CodexCloud,
/// Anthropic-hosted Claude Code using the session owner's subscription.
ClaudeCloud,
- /// The in-process (in-memory) "macro(new)" bot, served by `agent_inmem`.
+ /// The in-process (in-memory) Macro agent bot, served by `agent_inmem`.
InMemory,
/// The bot's operator hosts the runtime and dials the gateway; no
/// deployment here provisions anything for it.
diff --git a/crates/bot_id/src/lib.rs b/crates/bot_id/src/lib.rs
index a4b24cf146..7a0ca21455 100644
--- a/crates/bot_id/src/lib.rs
+++ b/crates/bot_id/src/lib.rs
@@ -50,7 +50,7 @@ fn bot_id_str(input: &str) -> IResult<&str, BotIdStorage<ArcCowStr<'_>>> {
))
}
-/// Stable [`BotId`] for the first-party "Macro AI" system bot.
+/// Stable [`BotId`] for the classic first-party "Macro" system bot.
///
/// Mentioning it answers with the classic in-channel chat reply (the
/// `channel_bots` agent loop in `document_storage_service`). Agent sessions
@@ -58,28 +58,30 @@ fn bot_id_str(input: &str) -> IResult<&str, BotIdStorage<ArcCowStr<'_>>> {
pub const MACRO_AI_BOT_ID: BotId =
BotId::new_from_uuid(Uuid::from_u128(0x0000_0000_0000_0000_0000_0000_0000_a1a1));
-/// Stable handle for the "Macro AI" system bot (used for `@` mentions).
+/// Stable handle for the classic "Macro" system bot (used for `@` mentions).
pub const MACRO_AI_HANDLE: &str = "macro";
-/// Display name for the "Macro" system bot.
+/// Display name for Macro, shared by both of its bot ids.
pub const MACRO_AI_NAME: &str = "Macro";
-/// Stable [`BotId`] for the "macro(new)" system bot.
+/// Stable [`BotId`] for the agent-session half of Macro.
///
-/// The next-generation Macro bot: mentioning it opens an agent session served
-/// by the in-process (in-memory) agent harness, which answers with the Macro
-/// product toolset. A separate bot from [`MACRO_AI_BOT_ID`] on purpose - the
-/// classic in-channel reply stays on `@macro` for everyone while this one
-/// rolls out, and one id cannot mean both.
+/// Mentioning it opens an agent session served by the in-process (in-memory)
+/// agent harness, which answers with the Macro product toolset. A separate bot
+/// from [`MACRO_AI_BOT_ID`] because one id cannot mean both a chat reply and a
+/// session - but the same persona to a reader: both are named "Macro", and the
+/// web client's chat-v3 rollout decides which of the two a single `@macro`
+/// mention targets.
pub const MACRO_NEW_BOT_ID: BotId =
BotId::new_from_uuid(Uuid::from_u128(0x0000_0000_0000_0000_0000_0000_0000_a2a2));
-/// Stable handle for the "macro(new)" system bot (used for `@` mentions).
+/// Stable handle for the agent-session Macro bot.
+///
+/// Distinct from [`MACRO_AI_HANDLE`] only because handles identify a bot;
+/// nothing offers it as a second `@` entry. The display name is
+/// [`MACRO_AI_NAME`], the same as the classic bot's.
pub const MACRO_NEW_HANDLE: &str = "macro-new";
-/// Display name for the "macro(new)" system bot.
-pub const MACRO_NEW_NAME: &str = "macro(new)";
-
/// Stable [`BotId`] for autonomous Macro platform operations.
pub const MACRO_SYSTEM_BOT_ID: BotId =
BotId::new_from_uuid(Uuid::from_u128(0x0000_0000_0000_0000_0000_0000_0000_5759));
@@ -162,9 +164,11 @@ pub const SYSTEM_BOTS: &[SystemBot] = &[
handle: MACRO_AI_HANDLE,
has_agent: false,
},
+ // The same persona as the bot above, under a second id because only this
+ // one opens sessions. It carries the same name for the same reason.
SystemBot {
id: MACRO_NEW_BOT_ID,
- name: MACRO_NEW_NAME,
+ name: MACRO_AI_NAME,
handle: MACRO_NEW_HANDLE,
has_agent: true,
},
diff --git a/crates/bot_id/src/test.rs b/crates/bot_id/src/test.rs
index 3fc39f872e..7bdef2bc88 100644
--- a/crates/bot_id/src/test.rs
+++ b/crates/bot_id/src/test.rs
@@ -56,6 +56,12 @@ fn macro_new_id_is_stable_and_distinct_from_macro() {
// The classic bot answers in channel; only its replacement opens sessions.
assert!(!system_bot(MACRO_AI_BOT_ID).unwrap().has_agent);
assert!(system_bot(MACRO_NEW_BOT_ID).unwrap().has_agent);
+ // Two ids, one persona: both present as "Macro" wherever a person reads a
+ // sender, a mention, or an agent list.
+ assert_eq!(
+ system_bot(MACRO_NEW_BOT_ID).unwrap().name,
+ system_bot(MACRO_AI_BOT_ID).unwrap().name
+ );
}
#[test]
diff --git a/crates/bots/src/outbound/pg_bots_repo/tests.rs b/crates/bots/src/outbound/pg_bots_repo/tests.rs
index 608b9dd308..254deebe5c 100644
--- a/crates/bots/src/outbound/pg_bots_repo/tests.rs
+++ b/crates/bots/src/outbound/pg_bots_repo/tests.rs
@@ -434,7 +434,7 @@ async fn bot_profiles_batch_persisted_system_deleted_and_missing_bots(
.get(&bot_id::MACRO_NEW_BOT_ID)
.expect("system bot profile")
.name,
- bot_id::MACRO_NEW_NAME
+ bot_id::MACRO_AI_NAME
);
assert!(!profiles.contains_key(&missing));
diff --git a/docs/AGENT_GUIDE/ai-chat.md b/docs/AGENT_GUIDE/ai-chat.md
index c9b21e9b19..40fdc61e97 100644
--- a/docs/AGENT_GUIDE/ai-chat.md
+++ b/docs/AGENT_GUIDE/ai-chat.md
@@ -415,9 +415,12 @@ marked done.
## In channels
-Mention `@Macro` in any channel message for the classic in-channel reply. Mention
-`@macro-new` (or `@coder` / `@cursor`) to open an **agent session** — a dedicated
-transcript at `/app/agent/<uuid>` whose replies also stream back into the thread.
+Mention `@Macro` in any channel message. Without the `enable-chat-v3-agents` rollout it is
+the classic in-channel reply; with it, the same mention opens an **agent session** — a
+dedicated transcript at `/app/agent/<uuid>` whose replies also stream back into the thread.
+`@coder` / `@cursor` always open a session. There is only ever one Macro entry in the
+mention menu; which of the two answers is the rollout's decision, not a second choice in
+the menu.
## Agent sessions
diff --git a/docs/AGENT_GUIDE/channels.md b/docs/AGENT_GUIDE/channels.md
index f3e6128820..b3f22cd3ff 100644
--- a/docs/AGENT_GUIDE/channels.md
+++ b/docs/AGENT_GUIDE/channels.md
@@ -123,7 +123,9 @@ message; ordinary Markdown blockquotes remain presentation-only and do not count
The composer always keeps an editable empty line after a block reference, including after
the user deletes that line, so clicking below the reference can restore the text caret.
-`@Macro` answers in the thread (classic bot). Its tool calls execute immediately — there is
+The mention menu offers a single `@Macro`; the `enable-chat-v3-agents` rollout decides
+whether it answers in the thread as the classic bot or opens an agent session. Without the
+rollout, `@Macro` answers in the thread (classic bot). Its tool calls execute immediately — there is
no composer or pending-confirmation card in a channel, so asking it to create a calendar
event without attendees creates the event right away (unlike AI chat, where creation waits
for the user to confirm a composer card). For an event with attendees the bot is prompted to
@@ -132,7 +134,8 @@ event is created — no invitation goes out from the initial request. It cannot
email at all. The bot's prompt carries the current date and time in the mentioning user's
own time zone (their primary calendar's), so it resolves relative times ("tomorrow at 4",
"EOD") without asking; when no calendar is connected the prompt falls back to UTC and the
-bot asks before scheduling a specific clock time. `@macro-new` / `@coder` / `@cursor` / `@codex` / `@claude` open
+bot asks before scheduling a specific clock time. Within the rollout, `@Macro` — plus
+`@coder` / `@cursor` / `@codex` / `@claude` for everyone — opens
an agent session; follow-up
`@` mentions of that bot in the same thread route to it.
A follow-up sent while that session is still working stops the current turn,
diff --git a/docs/AGENT_GUIDE/documents.md b/docs/AGENT_GUIDE/documents.md
index 04b99f38a3..0bce56ab4b 100644
--- a/docs/AGENT_GUIDE/documents.md
+++ b/docs/AGENT_GUIDE/documents.md
@@ -374,7 +374,7 @@ The `@` menu includes `Recent agent sessions` after Channels and before
Companies. Search by session or persona name within the 500 most recently
updated accessible sessions. Menu rows show the
session title followed by a muted persona name, including `@Cursor` and
-`@macro(new)` for built-in personas. Names from the session API take precedence;
+`@Macro` for built-in personas. Names from the session API take precedence;
older responses use the shared built-in name resolver or cached custom bots.
Selecting one inserts an
inline reference showing the shared agent icon and an underlined session title.
diff --git a/docs/AGENT_GUIDE/navigation.md b/docs/AGENT_GUIDE/navigation.md
index 2eb85c8f8d..6f5a9d57b1 100644
--- a/docs/AGENT_GUIDE/navigation.md
+++ b/docs/AGENT_GUIDE/navigation.md
@@ -45,7 +45,7 @@ Switching tabs or navigating an in-app route is not a back/forward-cache restore
| `/app/documents`, `/app/files` | Legacy Files views; redirect to `/app/drive` |
| `/app/chat/<uuid>` | A standalone AI chat |
| `/app/automation/<uuid>` | Cron routine editor; event routines show a backend-managed notice |
-| `/app/agent/<uuid>` | An agent session (opened from `@macro-new` / `@coder` / `@cursor`) |
+| `/app/agent/<uuid>` | An agent session (opened from `@macro` under the agents rollout, or `@coder` / `@cursor`) |
| `/app/md/<doc>/chat/<chat>` | Doc + doc-scoped chat in a split |
| `/app/md/<doc>/channel/<channel>` | Doc + channel in a split |
| `/app/settings/account` | Settings (also `/app/settings/api-keys`, `/mcp-server`, `/shortcuts`, etc.) |