Repository navigation
Description
Summary
On localized Windows, ocx service install can misclassify an absent WinSW service as an unverifiable/present native service. This blocks the Task Scheduler backend install after an update and leaves the proxy stopped.
The SCM correctly reports ERROR_SERVICE_DOES_NOT_EXIST (1060), but Bun exposes the process status as 36 (1060 & 0xff) and localized sc.exe output does not contain the English text FAILED 1060.
Environment
- Windows 11, Korean locale
- PowerShell 7.6.3
@bitkyc08/[email protected]- npm global install
- Task Scheduler backend previously installed
- reproduced with the bundled Bun 1.3.14 update path and Bun
1.4.0-canary.1+10ff02889
Reproduction
- Have the Task Scheduler backend installed.
- Confirm the native service is absent:
sc.exe qc opencodex-proxy-nativeObserved SCM result:
[SC] OpenService ... 1060:
The specified service does not exist as an installed service.
- Run an update or reinstall:
ocx update
# or
ocx service installActual behavior
The package update succeeds, but the service refresh fails:
Removing the native (WinSW) service before installing the Task Scheduler backend...
error: Cannot remove the native service before switching to Task Scheduler:
Cannot verify the native service registration (sc.exe query failed).
Then:
Proxy: not running
Service: installed (CONFLICT: Task Scheduler AND native WinSW both present ...)
There is no opencodex-proxy-native SCM registration. The conflict is a false positive.
A minimized Bun reproduction reports:
{
"status": 36,
"stdout": "[SC] OpenService <localized text> 1060: ...",
"stderr": ""
}Accordingly, the current check does not match:
if (e.status === 1060 || /FAILED 1060/i.test(text)) return false;Expected behavior
An SCM response carrying error number 1060 should be treated as confirmed absence regardless of localized surrounding text or the truncated child-process status.
The Task Scheduler service should then reinstall and start normally.
Verified local workaround
This narrow local change made probeScmRegistration() return false, changed statusWinswRaw() from unknown to nonexistent, and allowed the Task Scheduler backend to install successfully:
if (
e.status === 1060 ||
e.status === (1060 & 0xff) ||
/\b1060\b/.test(text)
) return false;Post-repair verification:
opencodex 2.7.28
Task Scheduler: Running
Task action: wscript.exe /b /nologo opencodex-service-launcher.vbs
health: ok
port: 10100
single listener PID matches /healthz PID
Suggested regression coverage
Please cover both:
- child-process status
36with localized output containing1060; 1060appearing without the English tokenFAILED.
The matcher should remain specific to SCM error number 1060 so unrelated localized failures such as access denied remain fail-closed.
Activity
fix(service): locale-safe sc.exe 1060 detection + tri-state lifecycle…
lidge-jun commentedon Jul 21, 2026
v2.7.31에 수정 반영했습니다. localized sc.exe 출력에서도 독립적인 숫자 코드 1060을 인식하도록 수정했고, 서비스 상태의 tri-state 처리까지 보강했습니다. 반영 커밋: fbd96c1
fix(service): locale-safe sc.exe 1060 detection + tri-state lifecycle…