Skip to content

Commit 3b135ad

Browse files
authored
fix(claude-code): revert workaround (#298)
The workaround introduced in #283 sometimes causes Coder to associate the Coder agent with the `terraform_data` resource instead of a compute resource. Additionally, it creates a new agent once a workspace is stopped. See https://codercom.slack.com/archives/C08PHACTZRB/p1754391012982629 for more details. <img width="2480" height="1312" alt="image (6)" src="https://github.com/user-attachments/assets/6ccf2b40-92e7-4c67-b61f-b26888753e72" /> Related to coder/coder#18776.
1 parent 2585918 commit 3b135ad

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

registry/coder/modules/claude-code/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Run the [Claude Code](https://docs.anthropic.com/en/docs/agents-and-tools/claude
1313
```tf
1414
module "claude-code" {
1515
source = "registry.coder.com/coder/claude-code/coder"
16-
version = "2.0.5"
16+
version = "2.0.6"
1717
agent_id = coder_agent.example.id
1818
folder = "/home/coder"
1919
install_claude_code = true
@@ -84,7 +84,7 @@ resource "coder_agent" "main" {
8484
module "claude-code" {
8585
count = data.coder_workspace.me.start_count
8686
source = "registry.coder.com/coder/claude-code/coder"
87-
version = "2.0.5"
87+
version = "2.0.6"
8888
agent_id = coder_agent.example.id
8989
folder = "/home/coder"
9090
install_claude_code = true
@@ -102,7 +102,7 @@ Run Claude Code as a standalone app in your workspace. This will install Claude
102102
```tf
103103
module "claude-code" {
104104
source = "registry.coder.com/coder/claude-code/coder"
105-
version = "2.0.5"
105+
version = "2.0.6"
106106
agent_id = coder_agent.example.id
107107
folder = "/home/coder"
108108
install_claude_code = true

registry/coder/modules/claude-code/main.tf

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,3 @@ resource "coder_ai_task" "claude_code" {
289289
id = coder_app.claude_code_web.id
290290
}
291291
}
292-
293-
# As of https://github.com/coder/coder/commit/6ba4b5bbc95e2e528d7f5b1e31fffa200ae1a6db,
294-
# there's a bug in Coder's Terraform statefile parsing which prevents it from seeing coder_apps
295-
# in certain scenarios. This is a workaround to bypass this bug until we have a proper fix.
296-
# For more details see https://github.com/coder/coder/issues/18776
297-
resource "terraform_data" "claude_code_app_id" {
298-
input = coder_app.claude_code_web.id
299-
}

0 commit comments

Comments
 (0)