diff --git a/registry/coder/modules/claude-code/README.md b/registry/coder/modules/claude-code/README.md index d75b26fe..ed97c1b5 100644 --- a/registry/coder/modules/claude-code/README.md +++ b/registry/coder/modules/claude-code/README.md @@ -233,7 +233,7 @@ module "claude-code" { workdir = "/home/coder/project" claude_code_oauth_token = var.claude_code_oauth_token enable_remote_control = true - remote_control_name = "My Project" # Optional: custom session name + # remote_control_name = "Custom Name" # Optional: defaults to workspace name } ``` diff --git a/registry/coder/modules/claude-code/main.tf b/registry/coder/modules/claude-code/main.tf index 6a9f2496..628505e2 100644 --- a/registry/coder/modules/claude-code/main.tf +++ b/registry/coder/modules/claude-code/main.tf @@ -275,7 +275,7 @@ variable "enable_remote_control" { variable "remote_control_name" { type = string - description = "Custom session name for Remote Control, visible in the session list at claude.ai/code. Only used when enable_remote_control is true." + description = "Custom session name for Remote Control, visible in the session list at claude.ai/code. Only used when enable_remote_control is true. Defaults to the workspace name." default = "" } @@ -414,7 +414,7 @@ module "agentapi" { ARG_CODER_HOST='${local.coder_host}' \ ARG_CLAUDE_BINARY_PATH='${var.claude_binary_path}' \ ARG_ENABLE_REMOTE_CONTROL='${var.enable_remote_control}' \ - ARG_REMOTE_CONTROL_NAME='${var.remote_control_name}' \ + ARG_REMOTE_CONTROL_NAME='${var.remote_control_name != "" ? var.remote_control_name : data.coder_workspace.me.name}' \ /tmp/start.sh EOT