#issues getting Clawdbot to work with my Claude Max subscription.

1 messages ยท Page 1 of 1 (latest)

noble dune
#

Hey everyone, I'm having issues getting Clawdbot to work with my Claude Max subscription.
I've tried:

claude setup-token โ†’ pasted into clawdbot models auth paste-token --provider anthropic
Multiple fresh tokens
Full uninstall/reinstall of Clawdbot
clawdbot models auth login --provider anthropic
clawdbot models auth add

Every time I get: HTTP 401 authentication_error: Invalid bearer token
The token saves correctly (shows in auth-profiles.json) but the gateway keeps returning 401.
When I use a regular API key from console.anthropic.com it works fine - but I don't want to pay for API credits when I already have Max.
Anyone else having this issue or know a fix?
Running:

Clawdbot 2026.1.24-3
Node 22.22.0
macOS

clear quarryBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> โœ… Mark Solution

buoyant carbonBOT
# noble dune Hey everyone, I'm having issues getting Clawdbot to work with my Claude Max subs...

Based on my research, this is a known macOS issue with Claude Code OAuth tokens, not specific to Clawdbot. The problem is that Claude Code stores tokens in the macOS Keychain, but they sometimes can't be retrieved properly, causing 401 errors.

Key findings from GitHub issues:

  • The error security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain indicates the token exists in auth-profiles.json but can't be read from Keychain
  • This affects multiple users across recent Claude Code versions (2.0.28, 1.0.53)
  • Reinstalling doesn't fix it because the corrupted Keychain entry persists

Workarounds to try:

  1. Delete the corrupted Keychain entry and re-authenticate:

    security delete-generic-password -s "Claude Code"
    claude logout
    claude login  # or claude setup-token
    
  2. Use an Anthropic API key instead (which you confirmed works):

#
  • This bypasses the OAuth/Keychain issue entirely
  1. If on macOS, check Keychain Access:
    • Open Keychain Access โ†’ Look for "Claude Code" entries
    • Delete any stale entries, then re-run claude setup-token

For Clawdbot specifically, once you have a working token:

# If the setup-token works on another machine, paste it here:
clawdbot models auth paste-token --provider anthropic

# Or add an API key directly:
clawdbot models auth add --provider anthropic --api-key

The token saving to auth-profiles.json is separate from Keychain storage โ€” Claude Code CLI uses both, and Clawdbot reads the JSON file. But if Claude Code can't retrieve its own token from Keychain, the underlying OAuth session is invalid.

#

TL;DR: This is an Anthropic/Claude Code bug on macOS. Either delete the Keychain entry and re-auth, or stick with the API key method which works for you.

humble oyster
#

@noble dune did you ever get this working?