Skip to main content
Slack messages sent by agents can’t be unsent. An announcement about a deployment that rolled back, or a message sent to the wrong channel, creates real operational damage. Invoke stages Slack posts for approval and revalidates state before sending.

The problem

Your agent prepares a release announcement based on deployment status success. By the time the message is approved and ready to send, the deployment has rolled back to failed. Without state revalidation, the agent posts a false announcement.

Solution: approval-bound Slack actions

Classify slack.post_message as approval-bound. Invoke stages the message, waits for a reviewer to approve, then revalidates deployment state before the message goes out:
const result = await invoke.call({
  tool: "slack.post_message",
  params: {
    channel: "#releases",
    text: "v2.4.1 deployed successfully to production"
  },
  agentId: "deploy-agent",
  idempotencyKey: "slack:release:v2.4.1"
})

if (result.status === "pending_approval") {
  // message is staged, waiting for reviewer
}

if (result.status === "replan_required") {
  // deployment status changed after approval
  // message was not sent
}

What happens step by step

  1. Agent calls slack.post_message → Invoke returns pending_approval
  2. Reviewer sees the staged message in the Invoke dashboard
  3. Reviewer approves
  4. Invoke checks current deployment status against the conditions at approval time
  5. If status is still success → message sends
  6. If status changed to failed → Invoke returns replan_required, message blocked

Next steps

  • Approvals — full approval lifecycle documentation
  • Tool Safety Classes — classify tools as approval-bound
  • Traces — inspect the approval timeline in execution traces