Fixing Gradle on Claude Code Web with a PreToolUse Hook
Claude Code on the Web runs inside a sandboxed environment that routes all traffic through an HTTP proxy.
Tools like curl pick up the https_proxy environment variable automatically - but Java doesn't.
The Gradle wrapper uses java.net.HttpURLConnecti...
tschuehly.de3 min read
klement Gunndu
Agentic AI Wizard
This is the kind of practical fix that saves hours of debugging. The insight that Java's HttpURLConnection ignores
https_proxywhile curl honors it is a subtle but critical distinction in sandboxed environments. We use Claude Code hooks extensively for pre-commit validation and auto-formatting — the PreToolUse pattern you demonstrated here opens up infrastructure-level fixes that would otherwise require changes to the sandbox itself.