Building U-King: configuration, processes and real-machine failures
U-King started with a practical problem: people wanting AI coding tools often get stuck configuring them. Endpoints, authentication, environment variables, configuration files and post-installation checks all require attention.
This article preserves lessons from my original post. Systems, model routes, licensing and packages change. Use the U-King website for current details rather than treating historical settings as permanent rules.
Installation and configuration need separate checks
A program existing on disk does not establish that it can call a model. Claude Code, Codex, ClawX and Hermes use different locations. Anthropic, OpenAI and Responses formats are not interchangeable.
Check whether the tool exists, configuration reaches the right file, the running program reads it, and a call succeeds. An installation-complete screen answers only part of that.
Detect actual state in the backend
The frontend reporting that Codex is installed does not prove it exists on disk. Our backend checks actual installation before choosing which tools to configure, reducing errors from stale UI state, manual removal and changed paths.
State should come from observable system facts rather than assuming the previous button action succeeded.
Close ClawX before writing configuration
ClawX once wrote its in-memory configuration back to disk on exit. A new configuration written externally while it ran could be overwritten by the old memory copy.
The historical sequence was to detect the instance, request graceful shutdown, wait for exit, handle timeouts if needed, write configuration and restart. Any termination must target the intended instance and preserve the previous configuration.
A successful file write is insufficient: check which settings the restarted program uses. Recurring failures may involve competing memory and disk write-back.
Identify processes by installation path
Using taskkill /IM Claude.exe to close the desktop application once also affected same-name Claude Code CLI sessions. Equal executable names do not establish ownership.
We moved to identifying individual PIDs by full installation path. Confirm intended instances and children instead of ending every same-name program on a user's machine.
Preserve existing user state
Bundled drivers can be removed without silently returning. Existing keys, logins and model choices must not be displaced by defaults. Preserve configuration, test the actual call and provide recovery after failure.
Document customer-machine failures
The original post introduced u-rescue, then described as 19 cases involving Chinese paths, GBK/UTF-8, antivirus quarantine and direct-network SNI blocking. That count is historical; see the current repository.
A development machine with a proxy, warm cache and fast network does not substitute for a customer environment. Record system, paths, network, logs and recovery rather than rely on a success screenshot.
See deployment and training, or Task Passport for continuity across tools.
By Hequbing (He Fangsheng / Dosen). English edition prepared on 2 October 2026, based on my WeChat article (Chinese). Original illustrations and publication records are available there.
Contact: WeChat hecare888; hefangsheng@gmail.com. Services and pricing.