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.
:~# 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?
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.
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.
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.