fix(claude-code): add audit socket for boundary logs reporting

Pass --audit-socket to boundary so it reports network events to the
Coder agent, which forwards them to coderd for display in the UI.
This commit is contained in:
Zach Kipp 2025-12-05 13:41:53 -07:00
parent d425df477c
commit b60ea7c583

View File

@ -215,6 +215,16 @@ function start_agentapi() {
# Build boundary args - using --simple mode (no sudo/capabilities required)
BOUNDARY_ARGS=(--simple --log-dir "$ARG_BOUNDARY_LOG_DIR")
# Add audit socket for reporting to Coder agent
AUDIT_SOCKET="${TMPDIR:-/tmp}/coder-boundary-audit.sock"
if [ -S "$AUDIT_SOCKET" ]; then
BOUNDARY_ARGS+=(--audit-socket "$AUDIT_SOCKET")
printf "Using audit socket: %s\n" "$AUDIT_SOCKET"
else
printf "Warning: Audit socket not found at %s - boundary logs won't be reported to Coder\n" "$AUDIT_SOCKET"
fi
# Add default allowed URLs
BOUNDARY_ARGS+=(--allow "domain=anthropic.com" --allow "domain=registry.npmjs.org" --allow "domain=sentry.io" --allow "domain=claude.ai" --allow "domain=${ARG_CODER_HOST%%:*}")