Skip to content

Commit 9b2465e

Browse files
committed
attempt to send prompt directly
1 parent 901a1a3 commit 9b2465e

File tree

1 file changed

+2
-9
lines changed
  • registry/coder/modules/claude-code

1 file changed

+2
-9
lines changed

registry/coder/modules/claude-code/main.tf

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -167,15 +167,8 @@ resource "coder_script" "claude_code" {
167167
export LC_ALL=en_US.UTF-8
168168
169169
# Create a new tmux session in detached mode
170-
tmux new-session -d -s claude-code -c ${var.folder} "claude --dangerously-skip-permissions"
171-
172-
# Send the prompt to the tmux session if needed
173-
if [ -n "$CODER_MCP_CLAUDE_TASK_PROMPT" ]; then
174-
echo "Sending prompt to tmux session..."
175-
tmux send-keys -t claude-code "$CODER_MCP_CLAUDE_TASK_PROMPT"
176-
sleep 5
177-
tmux send-keys -t claude-code Enter
178-
fi
170+
tmux new-session -d -s claude-code -c ${var.folder} "claude --dangerously-skip-permissions \"${CODER_MCP_CLAUDE_TASK_PROMPT}\""
171+
179172
fi
180173
181174
# Run with screen if enabled

0 commit comments

Comments
 (0)