[Bug] Claude Code Extension v2.1.45 sends invalid beta header "afk-mode-2026-01-31"

Resolved 💬 3 comments Opened Mar 13, 2026 by TP96 Closed Mar 13, 2026

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"Unexpected value(s) afk-mode-2026-01-31 for the anthropic-beta header. Please consult our documentation at docs.claude.com or try again without the header."},"request_id":"req_011CZ1HgEMBDKmKvHDDuj8KD"}

Bug Description
You're right - this is a Claude Code extension issue, not something in your code. The extension is automatically sending the invalid "afk-mode-2026-01-31" header internally.
Since you mentioned the extension was just updated to version 2.1.45, this might be a bug in that version. The valid beta headers don't include "afk-mode" - they include things like "fast-mode-2026-02-01", "computer-use-2024-10-22", etc.
You can try:
Restarting VS Code completely
Disabling and re-enabling the Claude Code extension
Checking if there's a newer extension update available
If the issue persists, this would need to be reported to the Claude Code extension developers since it's an internal extension bug, not an API configuration issue on your end.

Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 2.1.45
  • Feedback ID: 13329d0b-e6ac-46ea-9aa2-d8be481e4104

Errors

[]

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗