You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: ocx update --help performs the real npm self-update #168
On a global npm installation, ocx update --help performs the real self-update instead of printing help and exiting without side effects.
This is especially disruptive when Codex Desktop is currently routed through the local opencodex proxy: the update restarts the proxy and drops the in-flight Responses stream.
Reproduction
Environment:
Windows 11
PowerShell 7.6.3
global npm installation
starting version: @bitkyc08/opencodex@2.7.23
target/latest version: 2.7.26
proxy running as the Task Scheduler service on 127.0.0.1:10100
Steps:
Keep the opencodex service running.
Route an active Codex Desktop thread through the proxy.
Run:
ocx update --help
Expected behavior
Print the update subcommand help and exit successfully without checking, installing, stopping, or restarting anything.
Actual behavior
The npm self-update runs. In this reproduction it updated 2.7.23 -> 2.7.26, restarted the proxy, and the active Codex turn failed with:
stream disconnected before completion: error sending request for url (http://127.0.0.1:10100/v1/responses)
After reconnecting:
opencodex v2.7.26 (installed via npm, tag latest)
Already on the latest latest version (v2.7.26).
Root cause
The TypeScript CLI correctly handles subcommand help before dispatch:
That condition does not exclude --help, -h, or help.
Suggested fix
Before calling runNpmSelfUpdate(), detect help arguments and forward the command to the normal CLI help path. A regression test should verify that all of these are side-effect free:
ocx update --help
ocx update -h
ocx update help
This is related in spirit to the earlier subcommand-help safety work mentioned in #11/#14, but it is a separate npm-launcher bypass that remains present in v2.7.26.
Activity
fix(update): side-effect-free update --help (#168) + pipe GUI-worker …
lidge-jun commentedon Jul 20, 2026
재현 확인했고
dev에 수정 랜딩했습니다 (a4f06be).원인: 두 진입로 모두
--help를 검사하지 않고 곧바로 self-update를 실행:bin/ocx.mjs)가 Bun CLI보다 먼저update를 가로채 실제 업데이트 실행 — 리포트하신 경로.src/cli/index.ts)의case "update"도 인자 검사 없이runUpdate()호출.수정: 양쪽 모두
ocx update [--help|-h|help]에서 usage만 출력하고 exit 0 (부작용 없음). 회귀 테스트 추가, 로컬 실기 검증 완료(두 진입로 모두 usage 출력 + exit 0).다음 릴리스에 포함됩니다. 제보 감사합니다 — 프록시가 라우팅 중인 스트림을 끊는 심각한 footgun이었습니다.
fix(update): side-effect-free update --help (lidge-jun#168) + pipe GU…