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.
reason | Meaning |
|---|---|
disabled | Live writing is switched off. |
not_allowed | The chat is not on the list of chats open for writing. Only the owner adds chats. |
stopped | The owner said ai off for this chat or for all chats. |
serious_pause | A grave topic appeared in the chat. Writing there pauses for 20 minutes or until the owner says ai on. |
owner_active | The owner wrote in the chat in the last 3 minutes. relic does not double the owner. |
rate_limited | A 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. |
style | The 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:
| Command | Effect |
|---|---|
ai off / ai off <chat> | Stops writing in all chats or in one. |
ai on | Resumes, and clears a serious pause. |
ai together / ai apart | Turns the owner_active check off or on for the chats. |
ai status | Reports the current state. |
Drafts and dry runs#
set_draftis the safe way to suggest a reply. Only the owner sees the draft.send_message,forward_messages,publish_postandjoin_chatacceptdry_run: true. relic checks the guards and permissions and does nothing.- Call
get_personabefore 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.
| Tool | Needs confirm: true for |
|---|---|
leave_chat | every call |
clear_history | every call. for_everyone: true also deletes the history for the other side. |
manage_contact | action of delete or block |
manage_folder | action of delete |
my_profile | any change. Reading needs no confirmation. |
privacy | setting 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.