claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Task tool subagents fail with "OAuth authentication is currently not supported" when logged in via OAuth

Open rusackas opened this issue 1 week ago • 2 comments

Description

When authenticated via claude login (OAuth), the main Claude Code session works correctly. However, spawning subagents using the Task tool fails with an authentication error.

Error message

API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth authentication is currently not supported."},"request_id":"..."}

Steps to reproduce

  1. Login via OAuth: claude login (not --api-key)
  2. Start a Claude Code session
  3. Try to use the Task tool to spawn a subagent (e.g., a custom agent defined in ~/.claude/agents/)

Expected behavior

Subagents should inherit the OAuth authentication from the parent session.

Actual behavior

Subagents fail with 401 authentication error saying OAuth is not supported.

Workaround

Use API key authentication instead: claude login --api-key

Environment

  • Claude Code version: 2.0.65
  • OS: macOS (Darwin 24.6.0)

rusackas avatar Dec 11 '25 22:12 rusackas

^ written and submitted by claude code... hope it helps! :D

rusackas avatar Dec 11 '25 22:12 rusackas

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/5999
  2. https://github.com/anthropics/claude-code/issues/9887

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

github-actions[bot] avatar Dec 11 '25 22:12 github-actions[bot]

This issue has been automatically closed as a duplicate of #5999.

If this is incorrect, please re-open this issue or create a new one.

🤖 Generated with Claude Code

github-actions[bot] avatar Dec 15 '25 09:12 github-actions[bot]