Use the coms CLI to send Telegram updates and wait for replies, including continuous listen mode until the user sends stop.
Use this skill only when the user explicitly asks for Telegram notifications or away-from-keyboard communication, such as:
Do not use this skill for normal in-terminal collaboration.
COMS_TELEGRAM_BOT_TOKEN is set.coms init-chat has been run at least once to store chat_id.Use one of these two modes based on the user's request.
coms send --message "<question or status>"
while true; do
coms wait --timeout-sec "${COMS_WAIT_TIMEOUT_SEC:-60}"
rc=$?
if [ "$rc" -eq 0 ]; then
break
fi
if [ "$rc" -ne 2 ]; then
exit "$rc"
fi
done
coms poll
wait and poll use the pending message automatically.
Mandatory rule: every coms send must be followed by coms wait before continuing.
Do not continue execution after sending a Telegram message until wait returns status: ok, unless the user explicitly asks for fire-and-forget notifications.
Use this when the user explicitly asks to "listen", "enter listen mode", "keep waiting", or "stay in loop until stop".
coms send --message "Listening mode enabled. Send instructions anytime. Reply 'stop' to exit."
while true; do
coms wait --timeout-sec "${COMS_WAIT_TIMEOUT_SEC:-60}"
rc=$?
if [ "$rc" -eq 0 ]; then
break
fi
if [ "$rc" -ne 2 ]; then
exit "$rc"
fi
done
wait result:status: ok, treat message_text as the next instruction.stop or /stop (case-insensitive, surrounding whitespace ignored), send confirmation and exit listen mode:coms send --message "Listening mode stopped. Returning to normal workflow."
coms send --message "Done: <result>. Waiting for next instruction. Reply 'stop' to exit."
wait exits with code 2 (status: timeout), stay in listen mode and run wait again immediately. Do not exit listen mode on timeout.wait.wait -> execute -> send result -> wait until stop.send -> wait, send -> wait.2 from wait means timeout.
3 means config/auth/input problem; report clear setup steps.4 means Telegram API problem; include retry context.wait.wait.poll as a replacement for wait unless user explicitly requested non-blocking behavior.--timeout-sec as a total session timeout.