Question · Vibe coding with Claude Code course · Module 15: Advanced Claude Code

Quiz: ANTHROPIC_API_KEY in -p mode

You have a subscription, and ANTHROPIC_API_KEY is also set in the environment. How will a claude -p run log in?

Answer options

  • It will use the subscription, because the /login sign-in takes precedence
  • It will use the key, so you pay for tokens despite the subscription
  • It will refuse to start until you remove the key
  • It will ask once whether to use the key and remember the answer

You can check the correct answer by solving this task in the CodeWorlds game.