feat(telegram): send Claude Code login links to the bot owner

This commit is contained in:
EugeneTes
2026-09-25 17:45:11 +00:00
parent 1aa9197d9c
commit df0a518b97
7 changed files with 192 additions and 3 deletions

View File

@@ -62,9 +62,16 @@ A message sent while the agent works steers the current run. Photos (with or wit
| `/thinking [level]` | Show or set the thinking level (Claude Code `--effort`) |
| `/help` | Short help |
Any other `/command` is passed to the session, so extension commands such as `/claude-code-doctor` work.
Any other `/command` is passed to the session, so extension commands such as `/claude-code-doctor` and
`/claude-code-login` work.
When an extension asks something, the question appears with buttons (or as a reply prompt for free text).
If the Claude subscription session behind the bot expires, the **first id in `AllowedUserIds`** (the bot owner)
gets the re-login link and code prompt in their own private chat, regardless of which chat's request triggered
it. That user must already have started a chat with the bot — Telegram bots cannot message a user first — or
the login goes unanswered and the triggering request fails. See
[claude-code-provider.md](claude-code-provider.md#session-expiry-and-re-login).
## Security
The agent has the built-in tools, including `bash`, and runs them as the bot's OS user. Only allow-listed user ids