You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tighten error matching, improve login context handling, and tests (#281)
* fix(review): tighten error matching, add safety comments, revert noise
- tool_projects_errors.go: match "status code: 4xx" instead of bare
"401"/"403" to avoid false positives on IDs or timestamps
- tool_login.go: remove `_ = ctx` suppression, add TODO for context
propagation to polling goroutine, document happens-before on
loginState.err via channel close
- root.go: add maintenance comment linking flagNeedsNextArg to init()
- helpers.go: revert unrelated Attempt struct alignment change
https://claude.ai/code/session_01EpXZqTmgybtjgmSALukH8d
* fix(review): ListProjects returns *APIError, add reauth + argv tests
- projects.go: use checkAndPrintError instead of manual status check so
ListProjects errors are structured *APIError — the errors.As path in
shouldSuggestReauthAfterListProjectsFailure now matches directly
- tool_projects_errors_test.go: unit tests for reauth hint logic covering
APIError 401/403, plain error fallback, and false-positive resistance
- root_argv_test.go: document boolean-flag-between-subcommands limitation
https://claude.ai/code/session_01EpXZqTmgybtjgmSALukH8d
* fix(mcp): cancel login polling goroutine on MCP session close
Thread the request context into the login polling goroutine so it
stops promptly when the MCP transport closes, instead of running for
up to ~4 minutes after the client disconnects.
WaitForAPIKey blocks with time.Sleep and doesn't accept a context, so
we run it in an inner goroutine and select on both its result channel
and ctx.Done(). The inner goroutine is bounded by loginMaxAttempts.
https://claude.ai/code/session_01EpXZqTmgybtjgmSALukH8d
---------
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments