Skip to content

Commit 2764f82

Browse files
Remove --dangerously-skip-permissions flag when using boundary
1 parent b04cea9 commit 2764f82

File tree

1 file changed

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

1 file changed

+10
-2
lines changed

registry/coder/modules/claude-code/scripts/start.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,18 @@ function start_agentapi() {
118118
# Set log level for boundary
119119
BOUNDARY_ARGS+=(--log-level $ARG_BOUNDARY_LOG_LEVEL)
120120

121+
# Remove --dangerously-skip-permissions from ARGS when using boundary (it doesn't work with elevated permissions)
122+
# Create a new array without the dangerous permissions flag
123+
CLAUDE_ARGS=()
124+
for arg in "${ARGS[@]}"; do
125+
if [ "$arg" != "--dangerously-skip-permissions" ]; then
126+
CLAUDE_ARGS+=("$arg")
127+
fi
128+
done
129+
121130
agentapi server --allowed-hosts="*" --type claude --term-width 67 --term-height 1190 -- \
122131
sudo -E env PATH=$PATH setpriv --inh-caps=+net_admin --ambient-caps=+net_admin --bounding-set=+net_admin /home/coder/go/bin/boundary "${BOUNDARY_ARGS[@]}" -- \
123-
claude
124-
#"${ARGS[@]}"
132+
claude "${CLAUDE_ARGS[@]}"
125133
else
126134
agentapi server --type claude --term-width 67 --term-height 1190 -- claude "${ARGS[@]}"
127135
fi

0 commit comments

Comments
 (0)