docs: the owner's pending login prompt, one-message link, joined logins and stale expiries

This commit is contained in:
EugeneTes
2026-09-25 17:57:58 +00:00
parent f2027c9fde
commit d20385153b
2 changed files with 14 additions and 7 deletions

View File

@@ -63,11 +63,13 @@ back in without failing the request outright:
1. The failing request pauses instead of erroring, as long as nothing has reached the caller yet (no partial
reply, no tool call).
2. If a `ClaudeCodeProviderOptions.LoginUi` is configured, its `IUserInterface` gets a notification with the
`claude auth login --claudeai` link, then an input prompt ("Paste the Claude login code") for the code shown
on the page.
2. If a `ClaudeCodeProviderOptions.LoginUi` is configured, its `IUserInterface` gets one input prompt whose
title carries the steps and the `claude auth login --claudeai` link and asks for the code shown on the page
("Paste the Claude login code"). Link and prompt are one message, so they can't arrive out of order.
3. `ClaudeLoginCoordinator` keeps this to one flow at a time: concurrent expired requests all wait on the same
login instead of racing the CLI.
login instead of racing the CLI. A request whose `claude` run started before a login completed, but whose
expiry is only reported afterwards, replays straight away instead of starting a second login (the coordinator
counts successful logins in `Generation`).
4. A wrong code gets a fresh link, up to 3 attempts; the owner has 10 minutes to answer each prompt
(`ClaudeLoginOptions.CodeTimeout`), and resolving where the owner is has 30 seconds
(`ClaudeLoginOptions.OwnerTimeout`) before they count as unreachable.
@@ -78,8 +80,9 @@ back in without failing the request outright:
UI)`.
Run `/claude-code-login` in any session with a UI to sign in (or switch accounts) through that session's own
dialog, with no owner redirect — useful even before the session has expired. Without a UI it explains that it
needs one instead of failing silently.
dialog, with no owner redirect — useful even before the session has expired. If a login is already running
elsewhere (another chat's expired request), the command waits for it and reports its outcome. Without a UI it
explains that it needs one instead of failing silently.
`ClaudeCodeProviderOptions` carries the pieces a host wires up: `LoginUi` (where the link goes),
`Coordinator` (defaults to the process-wide `ClaudeLoginCoordinator.Shared`), and `LoginOptions` (the timeouts

View File

@@ -69,7 +69,11 @@ When an extension asks something, the question appears with buttons (or as a rep
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
the login goes unanswered and the triggering request fails ("no code was entered"). The link, the steps and the
code prompt arrive as one message. While that prompt is pending, the owner's next plain text message in that chat
is taken as the code and is not sent to the agent; photos and `/commands` still behave normally. Don't ask the bot
something else in the owner chat until the code is in: a second free-text question in that chat (for example from
an extension) replaces the pending prompt and cancels the login. See
[claude-code-provider.md](claude-code-provider.md#session-expiry-and-re-login).
## Security