Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
fix(agents): move PR registration rule into shared system instructions (#6410)
Wolf Mermelstein4a0479118e65
diff --git a/crates/agent_harness/src/outbound/agent_prompt_composer.rs b/crates/agent_harness/src/outbound/agent_prompt_composer.rsindex 9c8f310a14..0ae72dfea9 100644--- a/crates/agent_harness/src/outbound/agent_prompt_composer.rs+++ b/crates/agent_harness/src/outbound/agent_prompt_composer.rs@@ -1,4 +1,4 @@-//! Compose shared agent instructions and channel context for every harness.+//! Compose channel context for every harness.use lexical_client::LexicalClient;use lexical_client::parse_markdown::AgentContextMessage;@@ -35,14 +35,9 @@ impl AgentPromptComposer for LexicalAgentPromptComposer {.collect::<Vec<_>>()});- let context = self- .lexical+ self.lexical.compose_agent_context(prompt_markdown, messages.as_deref()).await- .map_err(|error| HarnessError::PromptComposition(rootcause::report!(error).into()))?;-- Ok(format!(- "When you create or start working on a pull request, register its URL with Macro using macro_internal.set_pull_request.\n\n{context}"- ))+ .map_err(|error| HarnessError::PromptComposition(rootcause::report!(error).into()))}}diff --git a/crates/prompt/src/about_macro.rs b/crates/prompt/src/about_macro.rsindex 67eb4c614c..7e4bab9eb6 100644--- a/crates/prompt/src/about_macro.rs+++ b/crates/prompt/src/about_macro.rs@@ -23,6 +23,9 @@ just tell them to attach something — ask which they meant, e.g. "Did you meanattach something, or would you like to learn about Macro?" If they want to learnabout Macro, use SelfKnowledge.+When you create or start working on a pull request, register its URL with Macro+using `macro_internal.set_pull_request` if that tool is available.+## Terms- Channel - a slack-like messaging channeldiff --git a/docs/AGENT_GUIDE/channels.md b/docs/AGENT_GUIDE/channels.mdindex dc107a62f8..606e9611f9 100644--- a/docs/AGENT_GUIDE/channels.md+++ b/docs/AGENT_GUIDE/channels.md@@ -100,7 +100,9 @@ new GitHub PR with their session. Macro Internal MCP is hosted by the harnessservice at `/mcp/internal` on its egress listener, separately from workspace MCP.Cursor, sandbox, and macrod sessions receive session-scoped credentials; themodel supplies only the URL. The tool records the link, not the GitHub PR itself.-Every harness receives a shared prompt instruction to register PRs. Cursor+The shared Macro system instructions ask agents to register PRs when+`macro_internal.set_pull_request` is available. The instruction is not prepended+to individual user messages. Cursorenables automatic PR creation when a repository is selected. Its returned URLis also recorded becauseautomatic creation can finish after the agent stops. Repeated registration is