Claude Code Max auth

How do you retain the authentications for one User across multiple workspaces for a Claude code max plan that does not use api keys?
20 Replies
Codercord
Codercord4w ago
Codercord
Codercord4w ago
<#1416506087724679309>
Category
Help needed
Product
Coder (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
matifali
matifali4w ago
Hi @Sebo we are making it easy in our Claude Code module. The new version should be availble later today, cc: @35C4n0r https://github.com/coder/registry/pull/402/files#diff-3f433388cb775dcc77c38911e23acbd2eb64e26e26c25d46b045724dfe5136bbR30
Sebo
SeboOP4w ago
Will it retain the Session Token across multiple workspaces ? Or do i need to call Claude setup-token in every workspace again?
matifali
matifali4w ago
I think it should
noel
noel3w ago
I believe that you need to pass your anthropic token. This is how I do it for my sessions.
Sebo
SeboOP3w ago
Is there now an anthropic token for subscription based pricing too?
ztlod ツ
ztlod ツ3w ago
it does, i'm using with session token for a while by now
ztlod ツ
ztlod ツ3w ago
i have a older module version but setting this var instead of the token one should work
No description
ztlod ツ
ztlod ツ3w ago
Also i've pinned CC version to 1.0.100, as it has a bug that configure your instance as PRO plan instead of Max
No description
ztlod ツ
ztlod ツ3w ago
not sure if they resolved this yet, but i had this problem between 1.0.101 to 1.0.108
ztlod ツ
ztlod ツ3w ago
GitHub
[Bug] Claude Code fails to recognize MAX subscription tier - defaul...
Environment Platform (select one): Anthropic API AWS Bedrock Google Vertex AI Other: Claude Code CLI Claude CLI version: 1.0.43 (Claude Code) (also tested with v1.0.98) Operating System: macOS 15.6...
ztlod ツ
ztlod ツ3w ago
btw, good to hear about the new version, i'll update my templates later today You guys here at Coder rocks!
Sebo
SeboOP3w ago
@ztlod ツ where do you get the OAUTH_Token from? Thanks
ztlod ツ
ztlod ツ3w ago
Hey, @Sebo first run claude and authenticate (/login) then kill the process and run claude auth-token and it will give a long-living token btw, forget the first step, if i`m not mistaken the command will ask you to login again
Sebo
SeboOP3w ago
ah nice hm doesn't seem to work for me.
ztlod ツ
ztlod ツ3w ago
wait, let me double check the command, i've did this step days ago the command don't run? sry claude setup-token is the right command
Sebo
SeboOP2w ago
nice this works. awesome The token generation part worked, but claude still wants to login again. Not sure why it is not working
matifali
matifali2w ago
Hi try using the new v3.0.0 module and you should be able to pass a session token
Sebo
SeboOP2w ago
Thanks. I actually wanted to use claude code in tmux in a workspace. It works by retaining the claude.json config file and setting the env var that you mentioned. Thanks everyone for helping out. Your messages helped me figuring it out. 🚀

Did you find this page helpful?