From 776c7966881b8d65deb79a89fe9eba35f2eaeec9 Mon Sep 17 00:00:00 2001 From: YEVHENII SHCHERBINA Date: Wed, 12 Nov 2025 23:56:15 +0000 Subject: [PATCH 1/7] fix: remove allowed host --- registry/coder/modules/claude-code/scripts/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registry/coder/modules/claude-code/scripts/start.sh b/registry/coder/modules/claude-code/scripts/start.sh index fb5bafcc7..66c4653fd 100644 --- a/registry/coder/modules/claude-code/scripts/start.sh +++ b/registry/coder/modules/claude-code/scripts/start.sh @@ -209,7 +209,7 @@ function start_agentapi() { BOUNDARY_ARGS+=(--pprof-port ${ARG_BOUNDARY_PPROF_PORT}) fi - agentapi server --allowed-hosts="*" --type claude --term-width 67 --term-height 1190 -- \ + agentapi server --type claude --term-width 67 --term-height 1190 -- \ sudo -E env PATH=$PATH setpriv --reuid=$(id -u) --regid=$(id -g) --clear-groups \ --inh-caps=+net_admin --ambient-caps=+net_admin --bounding-set=+net_admin boundary "${BOUNDARY_ARGS[@]}" -- \ claude "${ARGS[@]}" From 0a7007365d82a8157caf3c13d5e360d2d7f61e36 Mon Sep 17 00:00:00 2001 From: YEVHENII SHCHERBINA Date: Thu, 13 Nov 2025 19:36:35 +0000 Subject: [PATCH 2/7] fix: remove bounding caps --- registry/coder/modules/claude-code/scripts/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registry/coder/modules/claude-code/scripts/start.sh b/registry/coder/modules/claude-code/scripts/start.sh index 66c4653fd..3dc57b53b 100644 --- a/registry/coder/modules/claude-code/scripts/start.sh +++ b/registry/coder/modules/claude-code/scripts/start.sh @@ -211,7 +211,7 @@ function start_agentapi() { agentapi server --type claude --term-width 67 --term-height 1190 -- \ sudo -E env PATH=$PATH setpriv --reuid=$(id -u) --regid=$(id -g) --clear-groups \ - --inh-caps=+net_admin --ambient-caps=+net_admin --bounding-set=+net_admin boundary "${BOUNDARY_ARGS[@]}" -- \ + --inh-caps=+net_admin --ambient-caps=+net_admin boundary "${BOUNDARY_ARGS[@]}" -- \ claude "${ARGS[@]}" else agentapi server --type claude --term-width 67 --term-height 1190 -- claude "${ARGS[@]}" From c7fc02f81120edda026273634e4a0009ad98267a Mon Sep 17 00:00:00 2001 From: YEVHENII SHCHERBINA Date: Fri, 14 Nov 2025 21:56:15 +0000 Subject: [PATCH 3/7] feat: use official installation script for boundary --- registry/coder/modules/claude-code/main.tf | 7 +++++++ .../modules/claude-code/scripts/start.sh | 19 ++++++++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/registry/coder/modules/claude-code/main.tf b/registry/coder/modules/claude-code/main.tf index 9c1816ad1..45eda951b 100644 --- a/registry/coder/modules/claude-code/main.tf +++ b/registry/coder/modules/claude-code/main.tf @@ -240,6 +240,12 @@ variable "boundary_pprof_port" { default = "6067" } +variable "compile_boundary_from_source" { + type = bool + description = "Whether to compile boundary from source instead of using the official install script" + default = false +} + resource "coder_env" "claude_code_md_path" { count = var.claude_md_path == "" ? 0 : 1 @@ -357,6 +363,7 @@ module "agentapi" { ARG_BOUNDARY_PROXY_PORT='${var.boundary_proxy_port}' \ ARG_ENABLE_BOUNDARY_PPROF='${var.enable_boundary_pprof}' \ ARG_BOUNDARY_PPROF_PORT='${var.boundary_pprof_port}' \ + ARG_COMPILE_FROM_SOURCE='${var.compile_boundary_from_source}' \ ARG_CODER_HOST='${local.coder_host}' \ /tmp/start.sh EOT diff --git a/registry/coder/modules/claude-code/scripts/start.sh b/registry/coder/modules/claude-code/scripts/start.sh index 3dc57b53b..eb6f6e8c2 100644 --- a/registry/coder/modules/claude-code/scripts/start.sh +++ b/registry/coder/modules/claude-code/scripts/start.sh @@ -28,6 +28,7 @@ ARG_BOUNDARY_LOG_LEVEL=${ARG_BOUNDARY_LOG_LEVEL:-"WARN"} ARG_BOUNDARY_PROXY_PORT=${ARG_BOUNDARY_PROXY_PORT:-"8087"} ARG_ENABLE_BOUNDARY_PPROF=${ARG_ENABLE_BOUNDARY_PPROF:-false} ARG_BOUNDARY_PPROF_PORT=${ARG_BOUNDARY_PPROF_PORT:-"6067"} +ARG_COMPILE_FROM_SOURCE=${ARG_COMPILE_FROM_SOURCE:-false} ARG_CODER_HOST=${ARG_CODER_HOST:-} echo "--------------------------------" @@ -45,6 +46,7 @@ printf "ARG_BOUNDARY_VERSION: %s\n" "$ARG_BOUNDARY_VERSION" printf "ARG_BOUNDARY_LOG_DIR: %s\n" "$ARG_BOUNDARY_LOG_DIR" printf "ARG_BOUNDARY_LOG_LEVEL: %s\n" "$ARG_BOUNDARY_LOG_LEVEL" printf "ARG_BOUNDARY_PROXY_PORT: %s\n" "$ARG_BOUNDARY_PROXY_PORT" +printf "ARG_COMPILE_FROM_SOURCE: %s\n" "$ARG_COMPILE_FROM_SOURCE" printf "ARG_CODER_HOST: %s\n" "$ARG_CODER_HOST" echo "--------------------------------" @@ -63,11 +65,18 @@ case $session_cleanup_exit_code in esac function install_boundary() { - # Install boundary from public github repo - git clone https://github.com/coder/boundary - cd boundary - git checkout $ARG_BOUNDARY_VERSION - go install ./cmd/... + if [ "${ARG_COMPILE_FROM_SOURCE:-false}" = "true" ]; then + # Install boundary by compiling from source + echo "Compiling boundary from source (version: $ARG_BOUNDARY_VERSION)" + git clone https://github.com/coder/boundary + cd boundary + git checkout $ARG_BOUNDARY_VERSION + go install ./cmd/... + else + # Install boundary using official install script + echo "Installing boundary using official install script (version: $ARG_BOUNDARY_VERSION)" + curl -fsSL https://raw.githubusercontent.com/coder/boundary/main/install.sh | bash -s -- --version "$ARG_BOUNDARY_VERSION" + fi } function validate_claude_installation() { From d334b6f13d259bc203c321cddc2fed4fcd10b17b Mon Sep 17 00:00:00 2001 From: YEVHENII SHCHERBINA Date: Fri, 14 Nov 2025 23:30:10 +0000 Subject: [PATCH 4/7] fix: update compilation from source --- registry/coder/modules/claude-code/scripts/start.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/registry/coder/modules/claude-code/scripts/start.sh b/registry/coder/modules/claude-code/scripts/start.sh index eb6f6e8c2..0fd00fc44 100644 --- a/registry/coder/modules/claude-code/scripts/start.sh +++ b/registry/coder/modules/claude-code/scripts/start.sh @@ -68,10 +68,17 @@ function install_boundary() { if [ "${ARG_COMPILE_FROM_SOURCE:-false}" = "true" ]; then # Install boundary by compiling from source echo "Compiling boundary from source (version: $ARG_BOUNDARY_VERSION)" - git clone https://github.com/coder/boundary + git clone https://github.com/coder/boundary.git cd boundary - git checkout $ARG_BOUNDARY_VERSION - go install ./cmd/... + git checkout "$ARG_BOUNDARY_VERSION" + + # Build the binary + make build + + # Install binary and wrapper script (optional) + sudo cp boundary /usr/local/bin/ + sudo cp scripts/boundary-wrapper.sh /usr/local/bin/boundary-run + sudo chmod +x /usr/local/bin/boundary-run else # Install boundary using official install script echo "Installing boundary using official install script (version: $ARG_BOUNDARY_VERSION)" From 7173876fc84d712e4b10e236734515f713231be0 Mon Sep 17 00:00:00 2001 From: YEVHENII SHCHERBINA Date: Sat, 15 Nov 2025 01:08:26 +0000 Subject: [PATCH 5/7] refactor: use boundary-run helper --- registry/coder/modules/claude-code/scripts/start.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/registry/coder/modules/claude-code/scripts/start.sh b/registry/coder/modules/claude-code/scripts/start.sh index 0fd00fc44..fdeedb9b9 100644 --- a/registry/coder/modules/claude-code/scripts/start.sh +++ b/registry/coder/modules/claude-code/scripts/start.sh @@ -226,9 +226,8 @@ function start_agentapi() { fi agentapi server --type claude --term-width 67 --term-height 1190 -- \ - sudo -E env PATH=$PATH setpriv --reuid=$(id -u) --regid=$(id -g) --clear-groups \ - --inh-caps=+net_admin --ambient-caps=+net_admin boundary "${BOUNDARY_ARGS[@]}" -- \ - claude "${ARGS[@]}" + boundary-run "${BOUNDARY_ARGS[@]}" -- \ + claude "${ARGS[@]}" else agentapi server --type claude --term-width 67 --term-height 1190 -- claude "${ARGS[@]}" fi From a2c636570a990cd9f444c9a4b091dfca93e3429a Mon Sep 17 00:00:00 2001 From: YEVHENII SHCHERBINA Date: Sat, 15 Nov 2025 01:23:01 +0000 Subject: [PATCH 6/7] ci: fix formatting --- registry/coder/modules/claude-code/scripts/start.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/registry/coder/modules/claude-code/scripts/start.sh b/registry/coder/modules/claude-code/scripts/start.sh index fdeedb9b9..4529bb139 100644 --- a/registry/coder/modules/claude-code/scripts/start.sh +++ b/registry/coder/modules/claude-code/scripts/start.sh @@ -71,10 +71,10 @@ function install_boundary() { git clone https://github.com/coder/boundary.git cd boundary git checkout "$ARG_BOUNDARY_VERSION" - + # Build the binary make build - + # Install binary and wrapper script (optional) sudo cp boundary /usr/local/bin/ sudo cp scripts/boundary-wrapper.sh /usr/local/bin/boundary-run @@ -227,7 +227,7 @@ function start_agentapi() { agentapi server --type claude --term-width 67 --term-height 1190 -- \ boundary-run "${BOUNDARY_ARGS[@]}" -- \ - claude "${ARGS[@]}" + claude "${ARGS[@]}" else agentapi server --type claude --term-width 67 --term-height 1190 -- claude "${ARGS[@]}" fi From dfd3a16401a1f723b8615f5fce953c51814598a5 Mon Sep 17 00:00:00 2001 From: YEVHENII SHCHERBINA Date: Sat, 15 Nov 2025 01:29:04 +0000 Subject: [PATCH 7/7] bump claude-code module version --- registry/coder/modules/claude-code/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/registry/coder/modules/claude-code/README.md b/registry/coder/modules/claude-code/README.md index d2a92aff0..306b8bc92 100644 --- a/registry/coder/modules/claude-code/README.md +++ b/registry/coder/modules/claude-code/README.md @@ -13,7 +13,7 @@ Run the [Claude Code](https://docs.anthropic.com/en/docs/agents-and-tools/claude ```tf module "claude-code" { source = "registry.coder.com/coder/claude-code/coder" - version = "4.0.1" + version = "4.1.0" agent_id = coder_agent.example.id workdir = "/home/coder/project" claude_api_key = "xxxx-xxxxx-xxxx" @@ -70,7 +70,7 @@ data "coder_parameter" "ai_prompt" { module "claude-code" { source = "registry.coder.com/coder/claude-code/coder" - version = "4.0.1" + version = "4.1.0" agent_id = coder_agent.example.id workdir = "/home/coder/project" @@ -106,7 +106,7 @@ Run and configure Claude Code as a standalone CLI in your workspace. ```tf module "claude-code" { source = "registry.coder.com/coder/claude-code/coder" - version = "4.0.1" + version = "4.1.0" agent_id = coder_agent.example.id workdir = "/home/coder" install_claude_code = true @@ -129,7 +129,7 @@ variable "claude_code_oauth_token" { module "claude-code" { source = "registry.coder.com/coder/claude-code/coder" - version = "4.0.1" + version = "4.1.0" agent_id = coder_agent.example.id workdir = "/home/coder/project" claude_code_oauth_token = var.claude_code_oauth_token @@ -202,7 +202,7 @@ resource "coder_env" "bedrock_api_key" { module "claude-code" { source = "registry.coder.com/coder/claude-code/coder" - version = "4.0.1" + version = "4.1.0" agent_id = coder_agent.example.id workdir = "/home/coder/project" model = "global.anthropic.claude-sonnet-4-5-20250929-v1:0" @@ -259,7 +259,7 @@ resource "coder_env" "google_application_credentials" { module "claude-code" { source = "registry.coder.com/coder/claude-code/coder" - version = "4.0.1" + version = "4.1.0" agent_id = coder_agent.example.id workdir = "/home/coder/project" model = "claude-sonnet-4@20250514"