Roo Code: "This credential is only authorized for use with Claude Code" error with Claude Code provider
On Roo Code 3.39.1 in VS Code on macOS, with API Provider set to Claude Code and Claude Opus 4.5, I started getting repeated "Unknown API Error" with the detail "This credential is only authorized for use with Claude Code and cannot be used for other API requests." I'm on a Max plan, and signing out/in and restarting VS Code didn't help. What causes this and what are the current workarounds?
Originally asked on GitHub: https://github.com/RooCodeInc/Roo-Code/issues/10566
5 answers
This is still open as of the report (2026-01-09). A commenter who reviewed the Roo Code OAuth and streaming client code concluded that the rejection comes from Anthropic's API, not from a bug in Roo Code: the OAuth credential obtained through the Claude Code flow is being restricted to Anthropic's official Claude Code CLI, so Roo Code cannot fix it on its own.
Workarounds from the thread:
-
Use the Anthropic API provider instead of Claude Code. In Roo Code settings, switch API Provider from "Claude Code" to "Anthropic" and enter a standard API key from console.anthropic.com. Note that one commenter reported an API key does not work with a Pro subscription, so this only applies if you have a separate pay-as-you-go API key.
-
Disable the Read Files tool and use the MCP filesystem server. Comment 10 found that disabling read tools under available tools for the mode stops the error, but the model can no longer read files. Comment 12 builds on this: disable "Read Files" and use the MCP "filesystem" server from the marketplace, with a mode-specific instruction such as "For read files use always MCP."
-
Orchestrator mode may still work. Comments 5 and 8 report Orchestrator mode works while Ask mode fails, with or without MCP servers enabled, so switching modes can be a stopgap.
A proposed pull request (#10570) claims to integrate a fix, but it was not merged in the thread, so treat it as unverified.
Did this work for you?-
What @Vivek-Yarra tried on GitHub (Worked)
Disabled the Read Files tool under available tools for the mode. The error stopped, but the model could no longer read files.
Source: https://github.com/RooCodeInc/Roo-Code/issues/10566#issuecomment-3728443085 (opens external site)
Did this work for you?What @DaiDarko tried on GitHub (Didn't work)
Reporter signed out of Claude Code in Roo Code settings, signed back in, quit VS Code, retried the task, and created a new task. The same error appeared every time.
Source: https://github.com/RooCodeInc/Roo-Code/issues/10566 (opens external site)
Did this work for you?What a GitHub user tried on GitHub (Outcome unclear)
Suggested switching API Provider to "Anthropic" and using a standard API key from console.anthropic.com instead of the Claude Code OAuth flow. No one in the thread confirmed testing it.
Source: https://github.com/RooCodeInc/Roo-Code/issues/10566#issuecomment-3726851352 (opens external site)
Did this work for you?What @brunobola tried on GitHub (Outcome unclear)
Recommended disabling the Read Files tool and using the MCP filesystem server for all reads, with mode-specific custom instructions such as "For read files use always MCP."
Source: https://github.com/RooCodeInc/Roo-Code/issues/10566#issuecomment-3728605083 (opens external site)
Did this work for you?