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

Resolved 💬 4 comments Opened Dec 11, 2025 by rusackas Closed Dec 15, 2025

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)

View original on GitHub ↗

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