Repository navigation
Description
Client or integration
Codex App
Area
Service lifecycle
Summary
Windows 11: OpenCodex 2.100.2 fails to start when an unbound IPv4 loopback port times out instead of refusing TCP connections. The Task Scheduler service exits with code 1 and repeats startup attempts. It cannot establish the identity/absence of a purported proxy owner, even though no process is listening.
Two independent startup checks are affected:
src/server/proxy-liveness.ts:observeProxyLiveness(START_OWNERSHIP_LIVENESS)gives{"kind":"unknown","live":null};recoverStartJournalAfterOwnerRecheckrefuses startup.src/cli/cross-home-owner.ts:findCrossHomeOwnerDetailed()gives{"kind":"indeterminate","port":10100,...};markCrossHomeSiblingrefuses startup.
Expected: when the exact host/port can be successfully bound, this can safely establish that there is no listener on that address, even if TCP SYN probes to closed local ports time out. A busy or unprovable port must remain fail-closed.
An equivalent failure occurs on one Windows machine with a Mihomo TUN adapter, but the cause of the TCP timeout is not proven. This issue concerns OpenCodex recovery behavior, not a confirmed defect in Mihomo.
The new v2.100.3 release does not appear to address either relevant code path: the cross-home discovery in src/cli/cross-home-owner.ts remains identical (same blob SHA on v2.100.3), and the loopback recovery path in proxy-liveness.ts remains without the tested fallback. The local fixes described below were tested on 2.100.2; 2.100.3 has not been installed on the affected machine.
Reproduction
- Windows 11 x64 (observed on Windows 11 25H2 / 26200),
@bitkyc08/[email protected], Bun 1.4.4; OpenCodex configured to listen on127.0.0.1:10100. - When no local listener is present, connecting to
127.0.0.1:9,127.0.0.1:505,127.0.0.1:63890, or127.0.0.1:10100returns a timeout, not an immediate refusal. A temporaryTcpListenerbound on127.0.0.1accepts connections (PASS); unbound::1:10100refuses immediately. Get-NetTCPConnection -State Listen -LocalPort 10100returns no listener.ocx service startregisters the Windows Task Scheduler service, but the runtime exits and gets restarted repeatedly;ocx statusreportsProxy: not running.- Local diagnostic functions in the installed package return
unknown/indeterminateas above.
Local-only mitigation that restored service on the affected machine:
canBindAddress("127.0.0.1", 10100, 1000) => trueandcanBindAddress("::1", 10100, 1000) => truewhen stopped.- For both discovery paths, after an identity/health probe returns
unknown, try a boundedcanBindAddresson the same literal address and port. - Only if bind succeeds, classify that endpoint as
dead/unowned. If bind fails, deadline expires, or there is any live owner evidence, preserve the conservativeunknown/refusal.
With these local modifications:
observeProxyLiveness(START_OWNERSHIP_LIVENESS) => {"kind":"absent","live":null}
findCrossHomeOwnerDetailed() => {"kind":"none"}
bun build src/cli/index.ts --target=bun => PASS (2685 modules)
ocx service start => serving on 127.0.0.1:10100
GET /healthz => HTTP 200, version 2.100.2
This confirms a narrow local recovery; it is not an upstream test suite run or verified end-to-end model request. It would be valuable to add regression tests for IPv4 timeout+successful bind, failed bind/live listener, IPv6 refusal, and both ownership-fence paths.
Version
2.100.2 (local workaround tested); 2.100.3 source checked, same cross-home fallback gap.
Operating system
Windows 11 x64, 25H2, build 26200.
Provider and model
n/a — proxy cannot start, before provider traffic.
Logs or error output
Proxy ownership is unverified; startup refused. PID record and recovery journal were preserved. Retry when the owner can be verified.
at recoverStartJournalAfterOwnerRecheck (src/cli/start-owner-fence.ts)
Shared-client owner could not be verified (a managed client port answered but its listener could not be classified); refusing startup before any shared-client write. Retry startup after discovery recovers.
at markCrossHomeSibling (src/cli/cross-home-owner.ts)
Screenshots and supporting files
The issue documents direct local probes, in-process results before/after the workaround, and real startup/HTTP health evidence. Related reports: #7258 (IPv6-disabled Linux loopback), #8045 (Windows Tailscale IP), and #8552 (container recovery fence). This report differs in using literal 127.0.0.1 and covering both startup fences.
Redacted configuration
{"port":10100,"hostname":"127.0.0.1"}Checks
- I searched existing issues and documentation.
- I removed secrets, tokens, account details, request credentials, and personal data.
Activity
github-actions commentedon Nov 13, 2026
Issue reopened
The report now contains the information required by the automated check. Thanks for updating it.
Ingwannu commentedon Nov 16, 2026
The report identifies two separate conservative ownership gates, and the source still has the corresponding unknown/indeterminate refusal paths. A listener-list snapshot or a successful bind on a different address cannot establish absence at the exact endpoint; the proposed fallback needs a bounded exclusive bind on that same literal address/port and must not override positive owner evidence. Releasing the probe bind also creates a race before startup, so the existing final ownership/generation checks must remain authoritative.
A focused PR should cover timeout + successful exclusive bind, occupied/refused/unprovable bind, a listener appearing after the probe, sibling-home owner evidence, cancellation and IPv6 behavior in both paths. Do not turn all probe timeouts into dead/unowned, erase the journal/PID record, or bypass the shared-client write fence. Your local mitigation and /healthz check are useful scoped evidence, but are distinct from native Windows regression coverage or an end-to-end provider turn. I made no Windows service, tunnel, firewall or runtime change here.
docs(upstream): triage lidge-jun#8697 (loopback timeout blocks servic…
fix(windows): treat a denied loopback connect like a connect timeout …