Skip to content

Commit f085c37

Browse files
authored
fix(dogfood/coder): fix env var for exp mcp configure claude-code (#19404)
`coder exp mcp configure claude-code` will read the API key for claude-code from the environment variable `CLAUDE_API_KEY`. Claude will also happily read `ANTHROPIC_API_KEY` but will ask you to confirm first, which is problematic in an automated setup. Also bumps claude-code module.
1 parent 5e4aa79 commit f085c37

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

dogfood/coder/main.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ module "devcontainers-cli" {
399399
module "claude-code" {
400400
count = local.has_ai_prompt ? data.coder_workspace.me.start_count : 0
401401
source = "dev.registry.coder.com/coder/claude-code/coder"
402-
version = "~>2.0"
402+
version = "2.0.7"
403403
agent_id = coder_agent.dev.id
404404
folder = local.repo_dir
405405
install_claude_code = true
@@ -810,10 +810,11 @@ resource "coder_env" "claude_task_prompt" {
810810
value = data.coder_parameter.ai_prompt.value
811811
}
812812

813-
resource "coder_env" "anthropic_api_key" {
813+
# coder exp mcp configure claude-code reads from CLAUDE_API_KEY
814+
resource "coder_env" "claude_api_key" {
814815
count = local.has_ai_prompt ? data.coder_workspace.me.start_count : 0
815816
agent_id = coder_agent.dev.id
816-
name = "ANTHROPIC_API_KEY"
817+
name = "CLAUDE_API_KEY"
817818
value = var.anthropic_api_key
818819
}
819820

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy