Skip to content

Commit 0f9d0bf

Browse files
claude-code integration with strict jail
1 parent 7ba975a commit 0f9d0bf

File tree

1 file changed

+11
-6
lines changed
  • registry/coder/modules/claude-code/scripts

1 file changed

+11
-6
lines changed

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

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,6 @@ function start_agentapi() {
8989

9090
# Build boundary args with conditional --unprivileged flag
9191
BOUNDARY_ARGS=(--log-dir "$ARG_BOUNDARY_LOG_DIR")
92-
if [ "${ARG_BOUNDARY_UNPRIVILEGED:-true}" = "true" ]; then
93-
BOUNDARY_ARGS+=(--unprivileged)
94-
fi
9592
# Add default allowed URLs
9693
BOUNDARY_ARGS+=(--allow "*.anthropic.com" --allow "registry.npmjs.org" --allow "*.sentry.io" --allow "claude.ai" --allow "$ARG_CODER_HOST")
9794

@@ -103,9 +100,17 @@ function start_agentapi() {
103100
done
104101
fi
105102

106-
agentapi server --type claude --term-width 67 --term-height 1190 -- \
107-
coder exp boundary "${BOUNDARY_ARGS[@]}" -- \
108-
claude "${ARGS[@]}"
103+
git clone https://github.com/coder/boundary
104+
cd boundary
105+
git checkout yevhenii/proxy-v3
106+
go install ./cmd/...
107+
108+
BOUNDARY_ARGS+=(--proxy-port=8087)
109+
110+
agentapi server --allowed-hosts="*" --type claude --term-width 67 --term-height 1190 -- \
111+
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[@]}" -- \
112+
claude
113+
#"${ARGS[@]}"
109114
else
110115
agentapi server --type claude --term-width 67 --term-height 1190 -- claude "${ARGS[@]}"
111116
fi

0 commit comments

Comments
 (0)