diff --git a/lib/turns.ts b/lib/turns.ts index 2a719e7..6fa101a 100644 --- a/lib/turns.ts +++ b/lib/turns.ts @@ -65,7 +65,8 @@ export function buildTelegramTurnPrompt(options: { files: DownloadedTelegramTurnFileLike[]; historyTurns?: Pick[]; }): string { - let prompt = options.telegramPrefix; + // Let pi handle `!` shell commands natively - don't prepend [telegram] prefix + let prompt = options.rawText.trimStart().startsWith("!") ? "" : options.telegramPrefix; if ((options.historyTurns?.length ?? 0) > 0) { prompt += "\n\nEarlier Telegram messages arrived after an aborted turn. Treat them as prior user messages, in order:";