Skip to content

fix(cli): the near-expiry login refusal says to sign in from your own terminal, outside the agent - #3416

Merged
lilyshen0722 merged 1 commit into
mainfrom
cto/f96-login-hint
Nov 4, 2026
Merged

lilyshen0722 merged 1 commit into
mainfrom
cto/f96-login-hint

Conversation

@lilyshen0722

Copy link
Copy Markdown
Contributor

What

A Claude seat on Linux under public or workspace trust gets an access-only copy of the person's login, because a refresh inside the jail could sign them out (#3395). So a turn that would outlive the login is refused. The refusal said "Sign in again on this machine (claude, then /login)", which reads as if the agent could do it. It now says where:

the Claude login on this machine expires in 3 min, before this turn could end. Sign in again in your own terminal on this machine, outside the agent: run claude, then /login.

The API-key advice, where it applies, follows as its own sentence.

Proof

adapters.claude.environment "a workspace seat whose login would expire mid-turn…" now pins the new wording. It passes, and it fails against main's text (reverse check).

🤖 Generated with Claude Code

https://claude.ai/code/session_01MDs9DPFVAooJnqCSwrdxVw

… terminal, outside the agent

A public or workspace Claude seat on Linux gets an access-only copy of the
login, so a turn that would outlive it is refused (F96, #3395). The message
said "sign in again on this machine", which reads as if the agent could do
it. It now says where: your own terminal on this machine, outside the agent,
`claude` then /login.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MDs9DPFVAooJnqCSwrdxVw

@lilyshen0722 lilyshen0722 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HEAD: 6aa0188 — GATE: PASS

One quick subagent review (Tier 1, a copy-only CLI change). Both apiKeyHint branches build well-formed sentences. No other test or doc pins the old wording, and cli/package.json is untouched. The pinned test fails against main's text.

GATE: PASS

@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Claude login-expiry message now directs users to sign in from their own terminal. When apiKeyHint is true, it presents the ANTHROPIC_API_KEY suggestion in a separate sentence. The workspace-seat expiry test checks for the updated instructions.

Changes: Claude login-expiry guidance

Layer / File(s) Summary
Update expiry message and test
cli/src/lib/adapters/claude.js, cli/__tests__/adapters.claude.environment.test.mjs
The message instructs users to run claude and /login in their own terminal, outside the agent. When apiKeyHint is true, the API-key suggestion appears in a separate sentence. The test checks for the sign-in instructions and existing expiry text.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Merge Risk: Minimal · up to 6aa01

The wording and corresponding test update are aligned, with no actionable merge-blocking risk found.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title clearly identifies the main change: clarifying that near-expiry Claude login recovery must occur in the user's own terminal outside the agent.
Description check Passed The description directly explains the login-expiry behavior, the wording change, the API-key guidance, and the test coverage.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Usage-based review receipt

  • Mode: Continue automatically
  • Reviewed files: 2
  • Waived: $0.50 (charged $0.00)
  • View usage details

Note

This review exceeded your plan’s limits and used usage-based reviews—free during trial, billed after paid activation unless disabled. Manage usage-based reviews.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 349032f and 6aa0188.

Files selected for processing: 2
  • cli/__tests__/adapters.claude.environment.test.mjs
  • cli/src/lib/adapters/claude.js

Limit details: You’ve used all 10 included reviews currently available.

@lilyshen0722
lilyshen0722 added this pull request to the merge queue Nov 4, 2026
Merged via the queue into main with commit 00166e0 Nov 4, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant