You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: registry/coder/modules/claude-code/README.md
+25Lines changed: 25 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,11 @@ module "claude-code" {
26
26
> [!NOTE]
27
27
> By default, this module is configured to run the embedded chat interface as a path-based application. In production, we recommend that you configure a [wildcard access URL](https://coder.com/docs/admin/setup#wildcard-access-url) and set `subdomain = true`. See [here](https://coder.com/docs/tutorials/best-practices/security-best-practices#disable-path-based-apps) for more details.
28
28
29
+
<!-- TODO(major): remove this note and update the prompt configuration example in the next major release -->
30
+
> [!NOTE]
31
+
> By default, `include_coder_system_prompt` is false. For proper integration with Coder (tool selection & task reporting),
32
+
it is recommended to set `include_coder_system_prompt` to true. In the next major release, this will become the default.
33
+
29
34
## Prerequisites
30
35
31
36
- An **Anthropic API key** or a _Claude Session Token_ is required for tasks.
@@ -34,6 +39,26 @@ module "claude-code" {
34
39
35
40
## Examples
36
41
42
+
### Prompt configuration (recommended)
43
+
44
+
Include Coder’s prompt sections and optionally add your own system prompt.
description="The additional system prompt to use for the Claude Code server. The module includes mandatory sections inside a <system> block. Leave empty to include only the mandatory sections."
186
-
default=""
185
+
description="The system prompt to use for the Claude Code server."
186
+
default="Send a task status update to notify the user that you are ready for input, and then wait for user input."
187
+
}
188
+
189
+
variable"include_coder_system_prompt" {
190
+
type=bool
191
+
description="Include Coder system prompts for proper integration with tool selection and task reporting."
192
+
# TODO(major): default to true in the next major release
condition=length(regexall("Send a task status update to notify the user that you are ready for input, and then wait for user input.", coder_env.claude_code_system_prompt.value)) >0
208
+
error_message="System prompt should have default value"
208
209
}
209
210
211
+
# Ensure Coder sections are not injected when include=false
error_message="System prompt should have Task Reporting section"
284
+
}
285
+
286
+
assert {
287
+
condition=length(regexall("Send a task status update to notify the user that you are ready for input, and then wait for user input.", coder_env.claude_code_system_prompt.value)) >0
288
+
error_message="System prompt should have system_prompt variable default value"
0 commit comments