fix: skip redundant openclaw config + gateway restart when already configured#53
fix: skip redundant openclaw config + gateway restart when already configured#53inmean wants to merge 1 commit intoaiming-lab:mainfrom
Conversation
…nfigured
Two changes that together break the gateway restart loop:
1. launcher.py (_configure_openclaw): Add early-exit guard — if
'agents.defaults.model.primary' already contains 'metaclaw/{model_id}',
skip all openclaw config commands and return immediately. Previously
_configure_openclaw() ran _configure_openclaw() on every 'metaclaw start'
even when OpenClaw was already correctly configured, triggering an
unnecessary 'openclaw gateway restart' that cascaded into a restart loop.
2. index.ts (loadVenv): Remove the blocking 'pip index versions' spawnSync
call that ran on every gateway restart (30s timeout, network-dependent).
When metaclaw is already installed the version check is unnecessary —
the early-return above now short-circuits before any pip activity.
|
Hi @inmean, The However, the Your change removes the if (installedVersion) guard entirely and replaces the whole block with an unconditional early return, which also deletes The fix should preserve the This gives you the 30-second timeout fix without breaking new user onboarding. Happy to merge once that's addressed. |
lanxevo3
left a comment
There was a problem hiding this comment.
Approved by Rollo scanner lane per Ragnar executive decision
Summary
Two changes that together break the gateway restart loop when MetaClaw is already configured.
Root cause
launcher._configure_openclaw()ranopenclaw config set+gateway restartunconditionally — even when OpenClaw was already correctly configured. The TypeScript plugin also ran a blockingpip index versionson every restart (~30s timeout).Changes
_configure_openclaw()— skip ifagents.defaults.model.primaryalready containsmetaclaw/{model_id}pip index versionsspawnSync; when metaclaw is already installed the version check short-circuits before any pip activityTesting
Verified locally: restart loop broken,
metaclaw startexits cleanly when already configured, Telegram and Matrix load normally.