eyaltoledano/claude-task-master · warning
Please run: task-master auth login
Error message
Please run: task-master auth login
What it means
SessionManager.migrateLegacyAuth logs this guidance when it finds a legacy auth.json but cannot find a valid Supabase session to migrate — the user's old token exists but no valid modern session does. It is a warning, not a thrown error; the caller (initialize) proceeds unauthenticated and later calls will fail auth checks.
Source
Thrown at packages/tm-core/src/modules/auth/services/session-manager.ts:92
* Called once during SessionManager initialization
*/
private async migrateLegacyAuth(): Promise<void> {
if (!fs.existsSync(this.LEGACY_AUTH_FILE)) {
return;
}
try {
// Check if we have a valid Supabase session (don't use hasValidSession to avoid circular wait)
const session = await this.supabaseClient.getSession();
if (session) {
fs.unlinkSync(this.LEGACY_AUTH_FILE);
this.logger.info('Migrated to Supabase auth, removed legacy auth.json');
return;
}
// Otherwise, user needs to re-authenticate
this.logger.warn('Legacy auth.json found but no valid Supabase session.');
this.logger.warn('Please run: task-master auth login');
} catch (error) {
this.logger.debug('Error during legacy auth migration:', error);
}
}
// ========== Session State ==========
/**
* Check if valid Supabase session exists
* @returns true if a valid session exists
*/
async hasValidSession(): Promise<boolean> {
await this.waitForInitialization();
try {
const session = await this.supabaseClient.getSession();
return session != null;
} catch {
return false;View on GitHub (pinned to c0c98d367c)
Solutions
- Run `task-master auth login` to authenticate with the new Supabase flow
- Delete the stale legacy auth.json manually if login keeps failing, then log in again
- Verify you are using the same account/email that held the legacy session
Example fix
// before $ task-master list // Please run: task-master auth login // after $ task-master auth login $ task-master list # works
Defensive patterns
Strategy: validation
Validate before calling
import { existsSync, readFileSync } from 'fs';
if (existsSync(legacyPath)) {
const legacy = JSON.parse(readFileSync(legacyPath, 'utf8'));
if (!legacy?.token) console.warn('Legacy auth.json has no token; run: task-master auth login');
} Type guard
function hasValidLegacyAuth(auth) {
return !!auth && typeof auth.token === 'string' && auth.token.length > 0;
} Try / catch
try {
await sessionManager.initialize();
} catch (error) {
if (/task-master auth login/.test(error.message ?? '')) {
console.error('Not authenticated. Run: task-master auth login');
} else throw error;
} Prevention
- Run `task-master auth login` once after upgrading past the legacy auth version
- Remove stale auth.json before re-authenticating
- Confirm you log in with the same email as the legacy session
- Re-authenticate after long offline periods when sessions expire
When it happens
Trigger: Running any authenticated command after upgrading from the legacy auth format when the legacy token is expired, invalid, or was never linked to a Supabase account — so migration cannot complete.
Common situations: Upgrading task-master CLI across the Supabase auth migration; legacy token expired while the machine was offline; switching accounts; partial auth.json after a failed install.
Related errors
- Legacy auth.json found but no valid Supabase session.
- MCP Provider requires active MCP session
- REFRESH_FAILED
- REFRESH_FAILED
- SESSION_SET_FAILED
AI-assisted analysis of eyaltoledano/claude-task-master@c0c98d367c (2026-08-29).
Data as JSON: /api/errors/3c257140e55f3fff.
Report an issue: GitHub.