New sprite flow broken (Claude console auth issues)

i just read the new blog post about paperclip and wanted to test it. so i create a new sprite, and install paperclip. so far so good. then i wanted to get claude going, and something changed since the last sprite i created. claude generates an auth link but won’t proceed to request the auth code.

authenticating claude code as been quite painful for at leas a week. before today it would open the browser but refuse to proceed after being authorised. the auth flow on claude.ai would redirect to localhost. this is still the case, but before today, claude code would at least leave an input prompt for me to come back and paste the auth code, while today it won’t even do that.

btw, gh auth is working fine.

1 Like

this is likely the reason for the latest issue, i just wanted to bring up that it’s been bumpy for awhile now.

currently stuck with existing sprites as new ones cannot auth claude.

  • can create new sprites
  • can auth gh
  • cannot auth claude

Is there a --verbose flag for this binary? Your last post doesn’t give much to go on; I wonder if logs are most going to shed some light.

it does not seem very useful

:~# claude --verbose auth login
Opening browser to sign in…
If the browser didn't open, visit: https://claude.com/cai/oauth/authorize?code=true&client_id=…

after this the local browser does pop a new tab for authentication with anthropic but when i authorize it redirects to localhost. i should also note that this is not how claude used to work. it used to be that claude would display a prompt, after opening the browser, where we could drop the auth code, they likely changed this recently. what is problematic now is that claude cannot be authenticated on remote systems like sprites.

I’ve not used Claude, or Sprites, but I would expect this workflow only to be necessary if you are not already signed in. I’d say also that this error is a clear indicator of the problem: your console cannot open a browser (though you might be able to get it to work if you paste that URL, plus the client ID, into your desktop browser).

Are you able to generate an auth token from inside the Claude dashboard, and paste it in a claude.config.json or similar, inside your shell?

My AI chat tool suggests this: export ANTHROPIC_API_KEY="sk-…". Is that worth a try?

perhaps ti will allow me to get claude going but the point of paying the subscription is to avoid paying for the api.

i’ll give a try though, thanks @halfer

I was able to workaround this with some trial and error.

After the auth pop-up open, go back to the Claude window and press ‘enter’ (I think the Claude window will say something like ‘paste code’). When it fails, Claude will reprompt you with another auth URL, that this time will provide you with an actual code you can paste back into Claude.

thanks for the reply.

i tried this already, it won’t even do that on my laptop. what you’re referring to might be the behavior of an older version of claude.

~# claude --version
2.1.92 (Claude Code)

Weird, I’ve got the same version and was able to get it to work just now with a new Sprite:

sprite@foo:~# claude
Welcome to Claude Code v2.1.92
  1. Select login method: “Claude account with subscription · Pro, Max, Team, or Enterprise”
  2. Ignore the first auth pop up. Go back to the terminal
  3. On “Paste code here if prompted”, press enter
  4. You’ll get an error: “OAuth error: Invalid code. Please make sure the full code was copied”
  5. Press enter again to get Claude to generate a new auth URL
  6. Paste URL into browser
  7. Complete auth on the browser, and this time you’ll get a code you can paste back into Claude Code.

this has got to be an issue on my side then.

Hope Anthropic fixes it soon. Not a great experience

:waving_hand: there’s two issues going on here, which doesn’t help! One is that there is an Anthropic-side issue around the Claude auth, which I think might be causing some issues. The other is just a bug with the sprite CLI. The CLI is meant to proxy the localhost redirect back through to the Sprite, but was hitting an error doing so. The next sprite CLI release includes a fix for this and restores the automatic login flow.

I’ll drop a note here when that release goes out if I remember.

1 Like

hey @bglw since i have your attention here, i want to report another issue i have observed.

sometimes i lose the connection to the sprite, think network drops or whatever. this causes sprites console connection to close. when i log into the sprite, whatever i might have been running at the time is still live. think zsh, claude, whatever. i have to pkill -9 that, causing my current connection to drop when i want to cleanup a bunch of zsh processes.

You can use sprite sessions list to view previously open sessions and sprite sessions attach to resume. We don’t kill processes in sessions by default for this exact reason – you may re-attach to them any time regardless of client-side network changes.

1 Like