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
<#1416506087724679309>
Category
Help needed
Product
Coder (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
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
Will it retain the Session Token across multiple workspaces ? Or do i need to call Claude setup-token in every workspace again?
I think it should
I believe that you need to pass your anthropic token. This is how I do it for my sessions.
Is there now an anthropic token for subscription based pricing too?
it does, i'm using with session token for a while by now
i have a older module version but setting this var instead of the token one should work

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

not sure if they resolved this yet, but i had this problem between 1.0.101 to 1.0.108
just for ref, https://github.com/anthropics/claude-code/issues/6955
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...
btw, good to hear about the new version, i'll update my templates later today
You guys here at Coder rocks!
@ztlod ツ where do you get the OAUTH_Token from? Thanks
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 againah nice
hm doesn't seem to work for me.
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
nice this works. awesome
The token generation part worked, but claude still wants to login again. Not sure why it is not working
Hi try using the new v3.0.0 module and you should be able to pass a session token
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. 🚀