From 97f7352f69d29c78eb77ed6c8cd0bc0d4d53304d Mon Sep 17 00:00:00 2001 From: Atif Ali Date: Fri, 24 Oct 2025 15:41:48 +0500 Subject: [PATCH 1/4] chore(claude-code): only allow `report_task` tool for task reporting We only need the single `report tasks` tool for tasks reporting. Also, you don't need to inject all Coder tools when no task reporting is required. Coder MCP tools are usually useful when used from an external system rather than within Coder Tasks. --- registry/coder/modules/claude-code/scripts/install.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/registry/coder/modules/claude-code/scripts/install.sh b/registry/coder/modules/claude-code/scripts/install.sh index 1285df902..c764acebb 100644 --- a/registry/coder/modules/claude-code/scripts/install.sh +++ b/registry/coder/modules/claude-code/scripts/install.sh @@ -90,11 +90,7 @@ function report_tasks() { echo "Configuring Claude Code to report tasks via Coder MCP..." export CODER_MCP_APP_STATUS_SLUG="$ARG_MCP_APP_STATUS_SLUG" export CODER_MCP_AI_AGENTAPI_URL="http://localhost:3284" - coder exp mcp configure claude-code "$ARG_WORKDIR" - else - export CODER_MCP_APP_STATUS_SLUG="" - export CODER_MCP_AI_AGENTAPI_URL="" - echo "Configuring Claude Code with Coder MCP..." + export CODER_MCP_ALLOWED_TOOLS="report_tasks" coder exp mcp configure claude-code "$ARG_WORKDIR" fi } From c70b584cef484ed8298beb30c28dd10d5a717a97 Mon Sep 17 00:00:00 2001 From: Atif Ali Date: Fri, 24 Oct 2025 15:45:42 +0500 Subject: [PATCH 2/4] Update claude-code module version to 3.3.1 --- registry/coder/modules/claude-code/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/registry/coder/modules/claude-code/README.md b/registry/coder/modules/claude-code/README.md index 1c17fab83..2058e9179 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 = "3.3.0" + version = "3.3.1" agent_id = coder_agent.example.id workdir = "/home/coder/project" claude_api_key = "xxxx-xxxxx-xxxx" @@ -51,7 +51,7 @@ module "claude-code" { boundary_log_level = "WARN" boundary_additional_allowed_urls = ["GET *google.com"] boundary_proxy_port = "8087" - version = "3.3.0" + version = "3.3.1" } ``` @@ -70,7 +70,7 @@ data "coder_parameter" "ai_prompt" { module "claude-code" { source = "registry.coder.com/coder/claude-code/coder" - version = "3.3.0" + version = "3.3.1" 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 = "3.3.0" + version = "3.3.1" 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 = "3.3.0" + version = "3.3.1" 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 = "3.3.0" + version = "3.3.1" 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 = "3.3.0" + version = "3.3.1" agent_id = coder_agent.example.id workdir = "/home/coder/project" model = "claude-sonnet-4@20250514" From 1434b54a07a6cd3417458034648f8ab84e342598 Mon Sep 17 00:00:00 2001 From: Atif Ali Date: Fri, 24 Oct 2025 16:14:42 +0500 Subject: [PATCH 3/4] use correct tool name --- registry/coder/modules/claude-code/scripts/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registry/coder/modules/claude-code/scripts/install.sh b/registry/coder/modules/claude-code/scripts/install.sh index c764acebb..cdceab0b1 100644 --- a/registry/coder/modules/claude-code/scripts/install.sh +++ b/registry/coder/modules/claude-code/scripts/install.sh @@ -90,7 +90,7 @@ function report_tasks() { echo "Configuring Claude Code to report tasks via Coder MCP..." export CODER_MCP_APP_STATUS_SLUG="$ARG_MCP_APP_STATUS_SLUG" export CODER_MCP_AI_AGENTAPI_URL="http://localhost:3284" - export CODER_MCP_ALLOWED_TOOLS="report_tasks" + export CODER_MCP_ALLOWED_TOOLS="coder_report_task" coder exp mcp configure claude-code "$ARG_WORKDIR" fi } From 91bffb97c4600b74066da88b2aac20030a805e2a Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Fri, 24 Oct 2025 17:45:02 +0500 Subject: [PATCH 4/4] Move allowed tools to start.sh Moved the `CODER_MCP_ALLOWED_TOOLS` export to the `start.sh` script for task reporting. This change clarifies tool permissions at startup. --- registry/coder/modules/claude-code/scripts/install.sh | 1 - registry/coder/modules/claude-code/scripts/start.sh | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/registry/coder/modules/claude-code/scripts/install.sh b/registry/coder/modules/claude-code/scripts/install.sh index cdceab0b1..21133384d 100644 --- a/registry/coder/modules/claude-code/scripts/install.sh +++ b/registry/coder/modules/claude-code/scripts/install.sh @@ -90,7 +90,6 @@ function report_tasks() { echo "Configuring Claude Code to report tasks via Coder MCP..." export CODER_MCP_APP_STATUS_SLUG="$ARG_MCP_APP_STATUS_SLUG" export CODER_MCP_AI_AGENTAPI_URL="http://localhost:3284" - export CODER_MCP_ALLOWED_TOOLS="coder_report_task" coder exp mcp configure claude-code "$ARG_WORKDIR" fi } diff --git a/registry/coder/modules/claude-code/scripts/start.sh b/registry/coder/modules/claude-code/scripts/start.sh index 3ac840bd1..525b8733e 100644 --- a/registry/coder/modules/claude-code/scripts/start.sh +++ b/registry/coder/modules/claude-code/scripts/start.sh @@ -79,6 +79,9 @@ task_session_exists() { ARGS=() function start_agentapi() { + # For Task reporting + export CODER_MCP_ALLOWED_TOOLS="coder_report_task" + mkdir -p "$ARG_WORKDIR" cd "$ARG_WORKDIR"