Auto mode unavailable despite Max plan — API rejects afk-mode beta header
Resolved 💬 3 comments Opened Mar 28, 2026 by rollingjin Closed Mar 28, 2026
Bug Description
Auto mode shows "Auto mode is unavailable for your plan" in the status line despite being on the Max plan.
Environment
- Claude Code version: 2.1.86
- OS: macOS (Darwin 25.3.0)
- Plan: Max (
subscriptionType: "max"confirmed viaclaude auth status) - Setting:
"defaultMode": "auto"in~/.claude/settings.json
Root Cause (from source)
In cli.js, when auto mode is active, Claude Code sends the anthropic-beta: afk-mode-2026-01-31 header. The API returns a 400 error whose message includes "afk-mode-2026-01-31" and "anthropic-beta", triggering this code path:
if (cW6 && q.status === 400 && q.message.includes(cW6) && q.message.includes("anthropic-beta"))
return G_({ content: "Auto mode is unavailable for your plan", error: "invalid_request" });
Where cW6 = "afk-mode-2026-01-31".
Steps to Reproduce
- Be on the Max plan
- Set
"defaultMode": "auto"in settings.json - Start a Claude Code session
- Observe "auto mode is unavailable for your plan" in terminal status
Expected Behavior
Auto mode should work for Max plan subscribers.
Auth Status
{
"loggedIn": true,
"authMethod": "claude.ai",
"apiProvider": "firstParty",
"subscriptionType": "max"
}
Workaround
Switching to "defaultMode": "bypassPermissions" avoids the issue but loses the AI classifier behavior that auto mode provides.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗