File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
registry/coder/modules/claude-code Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,11 @@ resource "coder_script" "claude_code" {
131131 npm install -g @anthropic-ai/claude-code@${ var . claude_code_version }
132132 fi
133133
134+ if [ "${ var . experiment_report_tasks } " = "true" ]; then
135+ echo "Configuring Claude Code to report tasks via Coder MCP..."
136+ coder exp mcp configure claude-code ${ var . folder }
137+ fi
138+
134139 # Run post-install script if provided
135140 if [ -n "${ local . encoded_post_install_script } " ]; then
136141 echo "Running post-install script..."
@@ -139,11 +144,6 @@ resource "coder_script" "claude_code" {
139144 /tmp/post_install.sh
140145 fi
141146
142- if [ "${ var . experiment_report_tasks } " = "true" ]; then
143- echo "Configuring Claude Code to report tasks via Coder MCP..."
144- coder exp mcp configure claude-code ${ var . folder }
145- fi
146-
147147 # Handle terminal multiplexer selection (tmux or screen)
148148 if [ "${ var . experiment_use_tmux } " = "true" ] && [ "${ var . experiment_use_screen } " = "true" ]; then
149149 echo "Error: Both experiment_use_tmux and experiment_use_screen cannot be true simultaneously."
@@ -171,6 +171,7 @@ resource "coder_script" "claude_code" {
171171
172172 # Send the prompt to the tmux session if needed
173173 if [ -n "$CODER_MCP_CLAUDE_TASK_PROMPT" ]; then
174+ echo "Sending prompt to tmux session..."
174175 tmux send-keys -t claude-code "$CODER_MCP_CLAUDE_TASK_PROMPT"
175176 sleep 5
176177 tmux send-keys -t claude-code Enter
You can’t perform that action at this time.
0 commit comments