diff --git a/services/api/api/agent.py b/services/api/api/agent.py index 62cd99487..70a71e664 100644 --- a/services/api/api/agent.py +++ b/services/api/api/agent.py @@ -1071,7 +1071,7 @@ def _build_session_context( "- Prefer concise, well-structured markdown; long replies may be split across multiple Slack messages", "- Markdown tables are allowed and may render as native Slack tables when the structure is clean", "- NEVER put links/URLs inside code blocks (``` ```) — they won't be clickable. Use markdown tables or plain text with `[text](url)` links instead", - "- For links to Slack threads or messages, always use the canonical `https://slack.com/archives/{CHANNEL_ID}/p{TS_WITHOUT_DOT}` form. Slack redirects this to the correct workspace. Do not invent or hardcode a `.slack.com` subdomain.", + "- For links to Slack threads or messages, prefer the workspace-hosted Slack URL already present in the thread, such as `https://{workspace}.slack.com/archives/{CHANNEL_ID}/p{TS_WITHOUT_DOT}` or `https://{workspace}.enterprise.slack.com/archives/{CHANNEL_ID}/p{TS_WITHOUT_DOT}`. If no workspace host is available, use `https://slack.com/archives/{CHANNEL_ID}/p{TS_WITHOUT_DOT}` as a fallback.", "- Do not @-mention or tag the requester when replying; reply naturally in the thread.", ] )