Guards and confirmations

Writes are checked at the last step before Telegram, in code. A prompt cannot talk a guard out of a refusal.

A refusal from a guard is a decision, not a failure. Do not retry and do not look for a way around it.

Sending guards#

A message from send_message, and the actions around it, are checked in this order. The first refusal wins.

reasonMeaning
disabledLive writing is switched off.
not_allowedThe chat is not on the list of chats open for writing. Only the owner adds chats.
stoppedThe owner said ai off for this chat or for all chats.
serious_pauseA grave topic appeared in the chat. Writing there pauses for 20 minutes or until the owner says ai on.
owner_activeThe owner wrote in the chat in the last 3 minutes. relic does not double the owner.
rate_limitedA ceiling was reached: no more than 4 messages in 30 seconds (one burst counts as one reply), 6 replies in 10 minutes, 30 replies in an hour.
styleThe text broke the style rules of the persona for that conversation.

Several short messages within 30 seconds count as one reply. Refusals carry retry_after_s where waiting helps.

Reactions, poll votes, bot buttons, marking as read, drafts and edits are not new messages. They pass the same switches, the allowed-chat list, the stop switch and the serious-topic pause, plus a separate ceiling of 20 actions per 10 minutes. owner_active does not stop them. Deleting your own message is allowed even during a serious pause.

edit_message and delete_messages work only on messages the gateway itself sent. Other messages answer not_ours.

The owner's stop switch#

The owner controls writing from the account's own Saved Messages chat:

CommandEffect
ai off / ai off <chat>Stops writing in all chats or in one.
ai onResumes, and clears a serious pause.
ai together / ai apartTurns the owner_active check off or on for the chats.
ai statusReports the current state.

Drafts and dry runs#

  • set_draft is the safe way to suggest a reply. Only the owner sees the draft.
  • send_message, forward_messages, publish_post and join_chat accept dry_run: true. relic checks the guards and permissions and does nothing.
  • Call get_persona before writing: it returns the tone rules and examples for that conversation.

Confirmations#

Some irreversible calls are refused with 409 manage_refused, reason: "confirm_required", unless the call carries confirm: true. Only the boolean true counts. Ask your user explicitly before you pass it.

ToolNeeds confirm: true for
leave_chatevery call
clear_historyevery call. for_everyone: true also deletes the history for the other side.
manage_contactaction of delete or block
manage_folderaction of delete
my_profileany change. Reading needs no confirmation.
privacysetting a rule. Reading needs no confirmation.

delete_messages, delete_post and manage_topic with action: delete have no confirm parameter. Only scope and guards protect them, so ask first.

Publishing guards#

Publishing to X, LinkedIn and Instagram has a rolling 24-hour post ceiling, a minimum gap between posts and a kill switch per platform. A refusal is publish_refused.

publish_post takes an idempotency_key. Always pass one: a repeat with the same key returns the first result (repeated: true) instead of a second post. relic never retries a post on its own. If creation times out, the result is unknown, and a repeat with the same key answers outcome_unknown.