You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!-- acp:session_id=session-abe4e0df-bc2e-4258-be06-fb50d90d7d63
source=#1238 last_action=2026-04-10T14:58:30Z retry_count=0 -->
## Summary
Improve Slack notification formatting across the Amber issue handler
workflow:
- Use `jq -nc` for JSON-safe payload construction in all Slack
notification templates (prevents JSON injection from issue/PR titles
containing quotes or newlines)
- Include issue/PR title in all notification messages for better context
- Add title resolution via `gh issue/pr view` before sending
notifications
- Use heredoc/delimiter syntax for GITHUB_OUTPUT to safely handle
multiline or special-character titles
## Test plan
- [ ] Verify YAML syntax is valid (`check-yaml` pre-commit hook)
- [ ] Confirm all Slack notification templates use the `jq -nc` pattern
consistently
- [ ] Confirm PR title is included in all notification payloads
- [ ] Test that titles with special characters (quotes, newlines) don't
break notifications
- [ ] Verify GITHUB_OUTPUT handles multiline titles correctly
---
🤖 [Ambient
Session](https://ambient-code.apps.rosa.vteam-uat.0ksl.p3.openshiftapps.com/projects/ambient-platform-and-workflow-feedback-loop-running/sessions/session-abe4e0df-bc2e-4258-be06-fb50d90d7d63)
---------
Co-authored-by: Ambient Code Bot <bot@ambient-code.local>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
unclear requirements, multiple valid approaches, missing context — you
104
108
MUST ask for clarification. IMPORTANT: Before calling AskUserQuestion,
105
109
ALWAYS send a Slack notification first (the session stops streaming when
106
-
AskUserQuestion is called, so the notification must go out before):
110
+
AskUserQuestion is called, so the notification must go out before).
111
+
Use Slack mrkdwn link format: <URL|display text>. Example:
107
112
```bash
108
-
curl -X POST -H 'Content-type: application/json' \
109
-
--data '{"text":"I have a question about #${{ steps.issue.outputs.number }}\n*Issue*: https://github.com/${{ github.repository }}/issues/${{ steps.issue.outputs.number }}\n*Session*: '"$PLATFORM_HOST/projects/$AGENTIC_SESSION_NAMESPACE/sessions/$AGENTIC_SESSION_NAME"'\n*Question*: <brief summary of what you need>"}' \
curl -X POST -H 'Content-type: application/json' --data "$PAYLOAD" "$SLACK_WEBHOOK_URL"
315
353
```
316
354
317
355
The environment variables SLACK_WEBHOOK_URL, PLATFORM_HOST, AGENTIC_SESSION_NAMESPACE,
@@ -344,11 +382,15 @@ jobs:
344
382
unclear requirements, multiple valid approaches, missing context — you
345
383
MUST ask for clarification. IMPORTANT: Before calling AskUserQuestion,
346
384
ALWAYS send a Slack notification first (the session stops streaming when
347
-
AskUserQuestion is called, so the notification must go out before):
385
+
AskUserQuestion is called, so the notification must go out before).
386
+
Use Slack mrkdwn link format: <URL|display text>. Example:
348
387
```bash
349
-
curl -X POST -H 'Content-type: application/json' \
350
-
--data '{"text":"I have a question about #${{ steps.context.outputs.number }}\n*Issue*: ${{ steps.context.outputs.url }}\n*Session*: '"$PLATFORM_HOST/projects/$AGENTIC_SESSION_NAMESPACE/sessions/$AGENTIC_SESSION_NAME"'\n*Question*: <brief summary of what you need>"}' \
When you need human attention — circuit breaker, stuck, or using AskUserQuestion — send:
891
+
When you need human attention — circuit breaker, stuck, or before calling
892
+
AskUserQuestion — send a Slack notification. IMPORTANT: Always send BEFORE
893
+
calling AskUserQuestion. Use Slack mrkdwn link format: <URL|display text>.
894
+
895
+
TITLE=$(gh pr view {number} --repo {REPO} --json title --jq '.title')
896
+
PAYLOAD=$(jq -nc --arg text "🚨 *Need help with <https://github.com/{REPO}/pull/{number}|PR #{number} — $TITLE>*
897
+
<reason — what you tried and why you are stuck>
839
898
840
-
curl -X POST -H 'Content-type: application/json' \\
841
-
--data '{{"text":"I need human attention\\n*PR*: https://github.com/{REPO}/pull/{number}\\n*Session*: '"$PLATFORM_HOST/projects/$AGENTIC_SESSION_NAMESPACE/sessions/$AGENTIC_SESSION_NAME"'\\n*Reason*: <brief reason>"}}' \\
0 commit comments