Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbf2cfdd

Browse files
authored
docs: update Claude Code version in docs (#20049)
1 parentf009ebd commitbf2cfdd

File tree

2 files changed

+65
-41
lines changed

2 files changed

+65
-41
lines changed

‎docs/ai-coder/tasks-core-principles.md‎

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -73,42 +73,54 @@ data "coder_parameter" "setup_script" {
7373
}
7474
7575
# The Claude Code module does the automatic task reporting
76-
# Other agent modules: https://registry.coder.com/modules?search=tag%3Atasks
76+
# Other agent modules: https://registry.coder.com/modules?search=agent
7777
# Or use a custom agent:
7878
module "claude-code" {
79-
count = data.coder_workspace.me.start_count
80-
source = "registry.coder.com/coder/claude-code/coder"
81-
version = "2.2.0"
82-
agent_id = coder_agent.main.id
83-
folder = "/home/coder/projects"
84-
install_claude_code = true
85-
claude_code_version = "latest"
86-
order = 999
87-
88-
# experiment_post_install_script = data.coder_parameter.setup_script.value
89-
90-
# This enables Coder Tasks
91-
experiment_report_tasks = true
79+
source = "registry.coder.com/coder/claude-code/coder"
80+
version = "3.0.1"
81+
agent_id = coder_agent.example.id
82+
workdir = "/home/coder/project"
83+
84+
claude_api_key = var.anthropic_api_key
85+
# OR
86+
# claude_code_oauth_token = var.anthropic_oauth_token
87+
88+
claude_code_version = "1.0.82" # Pin to a specific version
89+
agentapi_version = "v0.6.1"
90+
91+
ai_prompt = data.coder_parameter.ai_prompt.value
92+
model = "sonnet"
93+
94+
# Optional: run your pre-flight script
95+
# pre_install_script = data.coder_parameter.setup_script.value
96+
97+
permission_mode = "plan"
98+
99+
mcp = <<-EOF
100+
{
101+
"mcpServers": {
102+
"my-custom-tool": {
103+
"command": "my-tool-server",
104+
"args": ["--port", "8080"]
105+
}
106+
}
107+
}
108+
EOF
92109
}
93110
111+
# Rename to `anthropic_oauth_token` if using the Oauth Token
94112
variable "anthropic_api_key" {
95113
type = string
96114
description = "Generate one at: https://console.anthropic.com/settings/keys"
97115
sensitive = true
98116
}
99-
100-
resource "coder_env" "anthropic_api_key" {
101-
agent_id = coder_agent.main.id
102-
name = "CODER_MCP_CLAUDE_API_KEY"
103-
value = var.anthropic_api_key
104-
}
105117
```
106118

107119
Let's break down this snippet:
108120

109121
- The`module "claude-code"` sets up the Task template to use Claude Code, but Coder's Registry supports many other agent modules like[OpenAI's Codex](https://registry.coder.com/modules/coder-labs/codex) or[Gemini CLI](https://registry.coder.com/modules/coder-labs/gemini)
110-
- Each module defines its own specific inputs. Claude Code expects the`CODER_MCP_CLAUDE_API_KEY` environment variable to exist, but OpenAI based agents expect`OPENAI_API_KEY` for example. You'll want to check the specific module's defined variables to know what exactly needs to be defined
111-
- You can define specific scripts to runat startup of the Task. For example, you could define a setup script that calls to AWS S3 and pulls specific files you want your agent to have access to
122+
- Each module defines its own specific inputs. Claude Code expects the`claude_api_key` input, but OpenAI based agents expect`OPENAI_API_KEY` for example. You'll want to check the specific module's defined variables to know what exactly needs to be defined
123+
- You can define specific scripts to runbefore the module is installed,`pre_install_script`, or after install,`pre_install_script`. For example, you could define a setup script that calls to AWS S3 and pulls specific files you want your agent to have access to
112124

113125
####Using a Custom Agent
114126

‎docs/ai-coder/tasks.md‎

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -65,32 +65,44 @@ data "coder_parameter" "setup_script" {
6565
# Other agent modules: https://registry.coder.com/modules?search=agent
6666
# Or use a custom agent:
6767
module "claude-code" {
68-
count = data.coder_workspace.me.start_count
69-
source = "registry.coder.com/coder/claude-code/coder"
70-
version = "2.2.0"
71-
agent_id = coder_agent.main.id
72-
folder = "/home/coder/projects"
73-
install_claude_code = true
74-
claude_code_version = "latest"
75-
order = 999
76-
77-
# experiment_post_install_script = data.coder_parameter.setup_script.value
78-
79-
# This enables Coder Tasks
80-
experiment_report_tasks = true
68+
source = "registry.coder.com/coder/claude-code/coder"
69+
version = "3.0.1"
70+
agent_id = coder_agent.example.id
71+
workdir = "/home/coder/project"
72+
73+
claude_api_key = var.anthropic_api_key
74+
# OR
75+
# claude_code_oauth_token = var.anthropic_oauth_token
76+
77+
claude_code_version = "1.0.82" # Pin to a specific version
78+
agentapi_version = "v0.6.1"
79+
80+
ai_prompt = data.coder_parameter.ai_prompt.value
81+
model = "sonnet"
82+
83+
# Optional: run your pre-flight script
84+
# pre_install_script = data.coder_parameter.setup_script.value
85+
86+
permission_mode = "plan"
87+
88+
mcp = <<-EOF
89+
{
90+
"mcpServers": {
91+
"my-custom-tool": {
92+
"command": "my-tool-server",
93+
"args": ["--port", "8080"]
94+
}
95+
}
96+
}
97+
EOF
8198
}
8299
100+
# Rename to `anthropic_oauth_token` if using the Oauth Token
83101
variable "anthropic_api_key" {
84102
type = string
85103
description = "Generate one at: https://console.anthropic.com/settings/keys"
86104
sensitive = true
87105
}
88-
89-
resource "coder_env" "anthropic_api_key" {
90-
agent_id = coder_agent.main.id
91-
name = "CODER_MCP_CLAUDE_API_KEY"
92-
value = var.anthropic_api_key
93-
}
94106
```
95107

96108
>[!NOTE]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp