New: watch your coding agents work, step by step, on a live board. Try the demo, no account

Discord alerts for blocked and finished tasks

By Jake Marsh, who builds Taskhold. Updated 2026-10-26. Facts about other tools checked 2026-10-26. 3 min read.

If your team talks in Discord, this script posts there when an agent needs a decision or finishes a task, so whoever is around can open the live board and answer. It uses a channel webhook, no bot.

For Slack, see Slack alerts; for a team running several agents, see one list for several agents.

What you get

One Discord message when an agent blocks a task with a question, and one when it finishes a whole task (not each step). Each says which agent, the task title, the question or the summary, and links to the live board, where you reply. Your own changes never trigger a message.

Before you begin

  • A Discord webhook URL: Server Settings > Integrations > Webhooks > New Webhook, pick the channel, Copy Webhook URL.
  • A Taskhold API key from Settings > API keys, named after this script so you can revoke it on its own.
  • bash, curl and jq on the machine that runs the script.

The script

Save this as taskhold-discord.sh and make it executable (chmod +x). The top half is the Discord part; the loop below it is the same for every notifier.

#!/bin/bash
# taskhold-discord.sh: post to a Discord channel when an agent blocks or finishes a Taskhold task.
# Needs curl and jq. Run: TASKHOLD_API_KEY=atd_sk_... ./taskhold-discord.sh
key=${TASKHOLD_API_KEY:?set TASKHOLD_API_KEY}
board=https://taskhold.com/dashboard/live
last=""

hook=${DISCORD_WEBHOOK_URL:?set DISCORD_WEBHOOK_URL}
notify() { # kind, title, detail, agent
  if [ "$1" = blocked ]; then h="**$4 needs you**"; else h="**$4 finished a task**"; fi
  text=$(printf '%s\n%s\n%s\n%s' "$h" "$2" "${3:+> $3}" "$board")
  jq -n --arg c "$text" '{username: "Taskhold", content: $c[0:2000], allowed_mentions: {parse: []}}' \
    | curl -s -o /dev/null -H "Content-Type: application/json" -d @- "$hook"
}

while :; do
  while IFS= read -r line; do
    case "$line" in
      "id: "*) last=${line#id: } ;;
      "data: "*)
        e=${line#data: }
        # Agents only: a task (not a step) finished, or any task or step blocked.
        jq -e '.type == "task.status" and .actor == "agent" and (.data.to == "blocked" or (.data.to == "done" and .task_id == .root_task_id))' <<<"$e" >/dev/null || continue
        kind=$(jq -r .data.to <<<"$e")
        title=$(jq -r '.task_title // "a task"' <<<"$e")
        agent=$(jq -r '.actor_name // "An agent"' <<<"$e")
        detail=$(jq -r 'if .data.to == "blocked" then .data.blocked_reason else .data.completed_summary end // ""' <<<"$e")
        notify "$kind" "$title" "$detail" "$agent" ;;
    esac
  done < <(curl -sN https://taskhold.com/api/events/stream -H "Authorization: Bearer $key" ${last:+-H "Last-Event-ID: $last"})
  sleep 3
done

Run it anywhere a process can stay up, such as a spare terminal, a tmux window or a small server:

DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/... TASKHOLD_API_KEY=atd_sk_... ./taskhold-discord.sh

The server ends each stream after 10 minutes and the script reconnects with the last event id, so events that happen in between arrive once, in order. Details on the stream: events and the live stream.

One limit to know

The webhook URL is the only credential: anyone who has it can post to that channel. Keep it out of shell history and repositories, and delete and recreate the webhook in Discord if it leaks. allowed_mentions is empty so a task title can't ping @everyone.

Share this page:XLinkedInBlueskyHacker News

See how far along your coding agents are.

$12/month or $120/year after the trial. Card up front. Cancel before day 7 and you pay nothing. Every agent you run is included.

Sources

Related

Updated 2026-10-26. Something wrong or out of date? Email hello@greatwork.company.