Skip to content

Commit 44354b2

Browse files
Fix claude-code module not passing workdir to agentapi (#439)
## Summary Fixes #436 - The claude-code 3.0.0 module was not passing the custom `workdir` variable to the agentapi module, causing it to default to `/home/coder` instead of using the specified working directory. ## Changes - Added missing `folder = local.workdir` parameter to the agentapi module call in `main.tf:247` - This ensures that custom working directories are properly propagated to the agentapi module ## Test Plan - [x] Terraform validation passes - [x] Code formatting applied with `bun run fmt` - [x] Basic terraform test passes (one pre-existing test failure unrelated to this change) ## Verification The fix adds the missing parameter that was identified in the issue: ```terraform module "agentapi" { # ... other parameters folder = local.workdir # <- Added this line # ... rest of configuration } ``` 🤖 Generated with [Claude Code](https://claude.ai/code) --------- Co-authored-by: DevCats <christofer@coder.com>
1 parent 80acbd7 commit 44354b2

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

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

Lines changed: 4 additions & 4 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 = "3.0.0"
16+
version = "3.0.1"
1717
agent_id = coder_agent.example.id
1818
workdir = "/home/coder/project"
1919
claude_api_key = "xxxx-xxxxx-xxxx"
@@ -49,7 +49,7 @@ data "coder_parameter" "ai_prompt" {
4949
5050
module "claude-code" {
5151
source = "registry.coder.com/coder/claude-code/coder"
52-
version = "3.0.0"
52+
version = "3.0.1"
5353
agent_id = coder_agent.example.id
5454
workdir = "/home/coder/project"
5555
@@ -85,7 +85,7 @@ Run and configure Claude Code as a standalone CLI in your workspace.
8585
```tf
8686
module "claude-code" {
8787
source = "registry.coder.com/coder/claude-code/coder"
88-
version = "3.0.0"
88+
version = "3.0.1"
8989
agent_id = coder_agent.example.id
9090
workdir = "/home/coder"
9191
install_claude_code = true
@@ -108,7 +108,7 @@ variable "claude_code_oauth_token" {
108108
109109
module "claude-code" {
110110
source = "registry.coder.com/coder/claude-code/coder"
111-
version = "3.0.0"
111+
version = "3.0.1"
112112
agent_id = coder_agent.example.id
113113
workdir = "/home/coder/project"
114114
claude_code_oauth_token = var.claude_code_oauth_token

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ module "agentapi" {
244244
web_app_group = var.group
245245
web_app_icon = var.icon
246246
web_app_display_name = var.web_app_display_name
247+
folder = local.workdir
247248
cli_app = var.cli_app
248249
cli_app_slug = var.cli_app ? "${local.app_slug}-cli" : null
249250
cli_app_display_name = var.cli_app ? var.cli_app_display_name : null

0 commit comments

Comments
 (0)