Repository navigation
Show agent sign-in notices before the first chat message - #37191
Conversation
|
No actionable comments were generated in the recent review.
|
…plies arrive late Grok goes back to one listing process with no Grok-specific sign-out guess; an agent-authored auth-required reply still reports notSignedIn. Pi reports notSignedIn only when it has no provider and nothing listable. Once Claude's required replies are in, the listing deadline returns them instead of failing. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
a472fcce-5897-4121-a488-f9f432c96cf6
Files selected for processing: 13-
src/main/acp/__fixtures__/session-new-auth-required.jsonsrc/main/acp/acp-model-catalog-probe.test.tssrc/main/acp/acp-model-catalog-probe.tssrc/main/claude/__fixtures__/catalog-signin.jsonsrc/main/claude/claude-command-catalog-probe.tssrc/main/claude/claude-control-responses.tssrc/main/claude/claude-model-catalog-probe.test.tssrc/main/claude/claude-model-catalog-probe.tssrc/main/native-chat/agent-model-catalog/agent-model-catalog-probe-runner.test.tssrc/main/native-chat/agent-model-catalog/agent-model-catalog-probe-runner.tssrc/main/native-chat/agent-model-catalog/agent-model-catalog-scaling.test.tssrc/main/pi/rpc-model-catalog-probe.test.tssrc/main/pi/rpc-model-catalog-probe.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
-
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
N and 10N distinct chats (distinct read claims, one account-scoped Claude fingerprint) read with waitForListing against the real probe and store on an injected clock: one listing before the held-reason TTL, exactly one more once it is due (held until every read has decided), none within the next TTL, each result carrying notSignedIn and models. Checked locally that it bites: making heldReasonDue ignore the TTL fails it (2 listings inside the TTL). Removing the in-flight dedup (the probeDue isListing guard plus the lister's early return) does not: store refresh then runs once per chat, but a newer flight replaces each queued one behind the two admission slots, so still one process per TTL. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The shared reader required type 'control_response' and prefiltered on that text, dropping success frames main's model and slash-command parsers accepted (the released-phone wire test's fake listing). It now prefilters on request_id and keeps the structure limit and success-only reading. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Review loop statusProblem. A signed-out Claude user opening a new chat saw models and no sign-in notice; they only learned they weren't signed in when the first message failed. Codex already warned before Send because its model check reads the account; Claude's never asked, and Pi's explicit "no provider" state was treated as a generic listing failure. What changes for users. When Claude or Pi itself reports it is signed out, the existing sign-in notice now shows before Send. Models stay listed, Send stays available, and the actual start result still decides. API keys, bearer tokens, key helpers, Bedrock/Vertex/Foundry and custom endpoints (including settings-file endpoints) stay quiet. Grok is unchanged from main: its status command can say "not authenticated" for a signed-in user mid token refresh, so it isn't used. Fixed during review. Removed a Grok status check that could show a false notice and slowed every Grok listing; Pi now reports signed out only when it also has no models; models already received survive the listing deadline; the shared Claude reply reader accepts exactly what main accepted (a released-phone compatibility test caught the stricter version); the repeated-read contract now drives the real trigger (10 and 100 chats on one signed-out account: one re-check per 30 s); test fidelity and CI typing fixes. Deferred / not in this PR.
Verified. CI green on For Brennan's review
Send while signed out (branch): Where judgment matters:
|
… sign-in probe and onboarding trust prompt - setup-script-import: imported setups are saved from the Review setup script dialog since #37937. - github-url-smart-input-transition: the GitLab source lists through gitlab:listWorkItems since #32005, so stub that channel. - structured-chat-tabs-open-close: the Claude catalog probe also sends an initialize request for sign-in discovery since #37191. - golden-core-flows: onboarding launches the chosen agent in the fresh ~ workspace (#37898), whose first launch asks the per-repo agent folder trust question (#38946); answer it before adding a project.
… sign-in probe and onboarding trust prompt (#39983) - setup-script-import: imported setups are saved from the Review setup script dialog since #37937. - github-url-smart-input-transition: the GitLab source lists through gitlab:listWorkItems since #32005, so stub that channel. - structured-chat-tabs-open-close: the Claude catalog probe also sends an initialize request for sign-in discovery since #37191. - golden-core-flows: onboarding launches the chosen agent in the fresh ~ workspace (#37898), whose first launch asks the per-repo agent folder trust question (#38946); answer it before adding a project. Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>





Problem. A signed-out Claude user opening a new chat saw a normal model list and no sign-in notice, so they only found out they weren't signed in when their first message failed. Codex already warned before Send because its model check reads the account; Claude's model check never asked whether the CLI was signed in, and Pi's explicit "no provider" state was treated as a generic listing failure.
What changes for users. When Claude or Pi itself reports that it is signed out, the chat now shows the existing sign-in notice before Send (for Claude: "Claude isn't signed in. Run
claude auth login, or choose an account in Claude Accounts settings."). Models stay listed, Send stays available, and the real start result is still what decides whether a message goes through; this check never holds or refuses a message. An agent-reported "authentication required" error during model discovery now shows the same per-agent sign-in notice instead of a generic failure.How it works. Claude's existing model-discovery process now also asks the CLI for its startup account information, in the same process as the model and settings requests. It reports "not signed in" only when the CLI says there is no token, no API key, no account, a first-party provider, and no custom endpoint (including one set in Claude's settings files). API keys, bearer tokens, key helpers, Bedrock/Vertex/Foundry and custom endpoints stay quiet. If the account reply is slow, the models already received are kept and the process is closed after a short grace period. Pi is treated as signed out only when it reports its "unknown" provider and has no available models. Results reuse the existing per-account, per-folder, per-host catalog cache, so no extra background polling is added.
Intended differences.
Verification. Recorded real CLI output tests (Claude 2.1.310, Pi), a repeated-read contract with 10 and 100 chats on one signed-out account proving at most one re-check per 30 s, and CI. A real-app run on a test machine with real CLIs: signed-out Claude showed the notice before Send in a git project and a folder workspace and failed at Send as before; signed-in Claude and Codex each completed two real replies with no notice; the listing process exited within about 2 seconds; main showed no notice before Send.
Tracked in STA-13193.