← Back to Kontasks
Claude Account Token Expiry Behavior
Explanation of what happens when Claude Max 5x account token expires
Output
🔑 Claude Account Token Expiry Behavior
⚠️ Current Behavior: NO Auto-Refresh
The account selector does NOT auto-refresh tokens. When the 31-minute countdown reaches zero:
- The account will show as "expired" (red indicator)
- Claude commands will fail with authentication errors
- You'll need to manually re-authenticate that account
How It Works Now
| Token Source | Claude CLI stores OAuth tokens in ~/.claude/.credentials.json |
| Refresh Token | Exists in credentials file but not used by our system |
| Expiry Detection | Konsole reads expiresAt timestamp from credentials |
| Visual Warning | Yellow pulse when < 1 hour remaining |
| After Expiry | Red indicator, account shows "expired" |
✅ What To Do When Token Expires
Option 1: Switch to another account
If you have multiple Claude accounts configured, tap the account selector and choose one with valid tokens.
Option 2: Re-authenticate the expired account
Run claude login in a terminal with the appropriate CLAUDE_CONFIG_DIR set for that account.
💡 Potential Enhancement
We could implement auto-refresh using the stored refreshToken. The Claude OAuth API likely supports token refresh without re-authentication. This would be a good backlog item if token expiry becomes a friction point.
📁 Relevant Code Locations
| konsole/src/account-switcher.ts:237-312 | Credentials reading & expiry calculation |
| konui/src/views/layout.ts:361-380 | Expiry status display in navbar |
| konui/src/views/styles.ts:529-590 | Expired/expiring visual styles |
Quick Actions
Original Request
No layout configured
Details
Type
General
Status
Completed
Scope
vibetools
Tags
authaccountskonsole
Created
8 Jan 2026, 2:49 pm
Updated
8 Jan 2026, 2:49 pm
Timing
⏱️ 80.0s
0 tools
● TTFE 0%
● Thinking 100%
● Tools 0%
Created By
claude
Raw Data
{
"id": "3b8f7616-8c91-423c-9049-6925f6458bbc",
"type": "general",
"status": "completed",
"title": "Claude Account Token Expiry Behavior",
"description": "Explanation of what happens when Claude Max 5x account token expires",
"context": {
"output": "<div style=\"background:#1e1e1e;color:#e0e0e0;padding:20px;border-radius:8px;font-family:sans-serif;\">\n<h2 style=\"color:#fff;margin:0 0 16px 0;\">🔑 Claude Account Token Expiry Behavior</h2>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;border-left:4px solid #f59e0b;\">\n<h3 style=\"margin:0 0 8px 0;color:#fbbf24;\">⚠️ Current Behavior: NO Auto-Refresh</h3>\n<p style=\"margin:0;color:#e0e0e0;\">The account selector does <strong style=\"color:#f87171;\">NOT</strong> auto-refresh tokens. When the 31-minute countdown reaches zero:</p>\n<ul style=\"margin:12px 0 0 0;padding-left:20px;line-height:1.8;\">\n<li>The account will show as <span style=\"color:#f87171;font-weight:bold;\">\"expired\"</span> (red indicator)</li>\n<li>Claude commands will fail with authentication errors</li>\n<li>You'll need to manually re-authenticate that account</li>\n</ul>\n</div>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h3 style=\"margin:0 0 12px 0;color:#61afef;\">How It Works Now</h3>\n<table style=\"width:100%;border-collapse:collapse;\">\n<tr style=\"border-bottom:1px solid #444;\">\n<td style=\"padding:10px;color:#9ca3af;width:140px;\">Token Source</td>\n<td style=\"padding:10px;color:#e0e0e0;\">Claude CLI stores OAuth tokens in <code style=\"background:#1e1e1e;padding:2px 6px;border-radius:3px;\">~/.claude/.credentials.json</code></td>\n</tr>\n<tr style=\"border-bottom:1px solid #444;\">\n<td style=\"padding:10px;color:#9ca3af;\">Refresh Token</td>\n<td style=\"padding:10px;color:#e0e0e0;\">Exists in credentials file but <span style=\"color:#f59e0b;\">not used by our system</span></td>\n</tr>\n<tr style=\"border-bottom:1px solid #444;\">\n<td style=\"padding:10px;color:#9ca3af;\">Expiry Detection</td>\n<td style=\"padding:10px;color:#e0e0e0;\">Konsole reads <code style=\"background:#1e1e1e;padding:2px 6px;border-radius:3px;\">expiresAt</code> timestamp from credentials</td>\n</tr>\n<tr style=\"border-bottom:1px solid #444;\">\n<td style=\"padding:10px;color:#9ca3af;\">Visual Warning</td>\n<td style=\"padding:10px;color:#e0e0e0;\"><span style=\"color:#fbbf24;\">Yellow pulse</span> when < 1 hour remaining</td>\n</tr>\n<tr>\n<td style=\"padding:10px;color:#9ca3af;\">After Expiry</td>\n<td style=\"padding:10px;color:#e0e0e0;\"><span style=\"color:#f87171;\">Red indicator</span>, account shows \"expired\"</td>\n</tr>\n</table>\n</div>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h3 style=\"margin:0 0 12px 0;color:#22c55e;\">✅ What To Do When Token Expires</h3>\n<div style=\"line-height:1.8;\">\n<p style=\"margin:0 0 8px 0;\"><strong style=\"color:#fff;\">Option 1: Switch to another account</strong></p>\n<p style=\"margin:0 0 16px 0;color:#9ca3af;\">If you have multiple Claude accounts configured, tap the account selector and choose one with valid tokens.</p>\n\n<p style=\"margin:0 0 8px 0;\"><strong style=\"color:#fff;\">Option 2: Re-authenticate the expired account</strong></p>\n<p style=\"margin:0;color:#9ca3af;\">Run <code style=\"background:#1e1e1e;padding:2px 6px;border-radius:3px;\">claude login</code> in a terminal with the appropriate <code>CLAUDE_CONFIG_DIR</code> set for that account.</p>\n</div>\n</div>\n\n<div style=\"background:#1e3a5f;padding:16px;border-radius:6px;border-left:4px solid #3b82f6;margin-bottom:16px;\">\n<h3 style=\"margin:0 0 8px 0;color:#3b82f6;\">💡 Potential Enhancement</h3>\n<p style=\"margin:0;color:#e0e0e0;\">We could implement auto-refresh using the stored <code style=\"background:#1e1e1e;padding:2px 6px;border-radius:3px;\">refreshToken</code>. The Claude OAuth API likely supports token refresh without re-authentication. This would be a good backlog item if token expiry becomes a friction point.</p>\n</div>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;\">\n<h3 style=\"margin:0 0 12px 0;color:#c678dd;\">📁 Relevant Code Locations</h3>\n<table style=\"width:100%;border-collapse:collapse;font-family:'Consolas','Monaco',monospace;font-size:0.85rem;\">\n<tr style=\"border-bottom:1px solid #444;\">\n<td style=\"padding:8px;color:#61afef;\">konsole/src/account-switcher.ts:237-312</td>\n<td style=\"padding:8px;color:#9ca3af;\">Credentials reading & expiry calculation</td>\n</tr>\n<tr style=\"border-bottom:1px solid #444;\">\n<td style=\"padding:8px;color:#61afef;\">konui/src/views/layout.ts:361-380</td>\n<td style=\"padding:8px;color:#9ca3af;\">Expiry status display in navbar</td>\n</tr>\n<tr>\n<td style=\"padding:8px;color:#61afef;\">konui/src/views/styles.ts:529-590</td>\n<td style=\"padding:8px;color:#9ca3af;\">Expired/expiring visual styles</td>\n</tr>\n</table>\n</div>\n</div>",
"requestedAt": "2026-01-08T04:30:00.000Z",
"requestId": "09f2bc72-502b-4bca-a756-452d2c4b8d55",
"choices": [
{
"label": "Add auto-refresh to backlog",
"value": "Add an item to the backlog for implementing OAuth token auto-refresh for Claude accounts",
"primary": true
},
{
"label": "Switch account now",
"value": "Show me the current account status and switch to a different account"
},
{
"label": "Re-authenticate",
"value": "How do I re-authenticate the expired Claude account?"
}
],
"turnTiming": {
"totalMs": 80004,
"ttfeMs": 46,
"thinkingMs": 79958,
"toolExecutionMs": 0,
"toolCallCount": 0,
"thinkingPct": 100,
"toolsPct": 0,
"ttfePct": 0
}
},
"createdBy": "claude",
"createdAt": "2026-01-08T04:49:50.939Z",
"updatedAt": "2026-01-08T04:49:54.850Z",
"requestId": "09f2bc72-502b-4bca-a756-452d2c4b8d55",
"scope": "vibetools",
"tags": [
"auth",
"accounts",
"konsole"
],
"targetUser": "claude"
}