Repository navigation
Description
Client or integration
Claude Code
Area
Service lifecycle
Summary
I run OpenCodex as a service on Windows and use Claude Code with CLI first-party turned on. First-party writes HTTPS_PROXY=http://opencodex:<token>@127.0.0.1:10200 into ~/.claude/settings.json, and every process Claude Code starts inherits it. That includes the shell an agent uses to run ocx service install or restart the service.
resolvedProxyEnv() in src/service/definition.ts copies whatever HTTPS_PROXY the installing shell has into the service definition. So my service got its own intercept listener as its outbound proxy. Requests to Anthropic loop back into OpenCodex, and requests to every other host go through the intercept's blind relay, which connects directly and skips my real proxy. The install's intercept token also ends up in the wrapper script as plain text.
Reproduction
- Turn on CLI first-party (
ocx claude config set --first-party on). - From a Claude Code session, run
ocx service installor restart the service. Any Bash tool call there inherits the settings env. - Open the wrapper. On Windows it is
~/.opencodex/opencodex-service.cmd, and it now hasset "HTTPS_PROXY=http://opencodex:<token>@127.0.0.1:10200". The systemd unit and the launchd plist get their proxy env from the same function.
Version
2.88.0, and still on dev at 8640c2f
Operating system
Windows 11
Provider and model
Not provider specific
Logs or error output
Nothing gets logged for it. I found the line in a backup of my wrapper and had to swap in my real local proxy (http://127.0.0.1:7897) by hand.
Screenshots and supporting files
None
Redacted configuration
// ~/.claude/settings.json, written by first-party
{
"env": {
"HTTPS_PROXY": "http://opencodex:<token>@127.0.0.1:10200",
"NODE_EXTRA_CA_CERTS": "<home>/.opencodex/claude-intercept/ca.pem",
"NO_PROXY": "localhost,127.0.0.1,::1,0.0.0.0"
}
}I have a fix ready. It skips only the opencodex: URL with the token and keeps a plain http://127.0.0.1:<port>, because that is what local proxy clients like Clash and v2rayN look like.
Activity
Ingwannu commentedon Oct 19, 2026
The report identifies the shared baking boundary in
resolvedProxyEnv, and Draft #7327 contains the narrow fix plus a fixture: ignore the generated token-bearing intercept URL while retaining a real tokenless loopback proxy and the lowercase fallback. That covers the unit/plist/wrapper input in source without requiring a live service install to investigate it.I have linked the fix for review; this issue remains open until the fix is verified on dev. Existing installed definitions are separate operator-owned state, so a PR alone does not establish that an already-baked service was repaired. Current-head CI and the relevant service/proxy review are still pending for #7327.
github-actions commentedon Oct 19, 2026
Automated translation bookkeeping — detected language: English.
lidge-jun commentedon Oct 19, 2026
Fixed by #7327 (merged into dev as 1c5e963).