{{ message }}
Repository navigation
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.
Contributor
lanxevo3
approved these changes
Apr 2, 2026
lanxevo3
left a comment
There was a problem hiding this comment.
Approved by Rollo scanner lane per Ragnar executive decision
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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.