#18723: fix: use resolveEffectiveUpdateChannel to detect git tags for default channel
channel: imessage
cli
stale
size: XS
trusted-contributor
Cluster:
Gateway and System Fixes
Fixes #18702
openclaw update on a git install now correctly detects release tags and defaults to stable channel instead of always using dev.
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
This PR fixes the update command to correctly detect release tags on git installations and default to the appropriate channel (`stable` or `beta`) instead of always defaulting to `dev`.
**Main changes:**
- Replaced static `DEFAULT_GIT_CHANNEL` / `DEFAULT_PACKAGE_CHANNEL` constants with a call to `resolveEffectiveUpdateChannel()` which intelligently determines the channel based on git tags
- For git installs with a tag, the function now checks if the tag is a beta release (contains "-beta") and sets the channel accordingly (`beta` or `stable`)
- For git installs without a tag, it still defaults to `dev` channel as expected
- Also fixed `contextTokens` in status display to prefer configured value over model catalog default
The fix ensures that users on tagged git releases (e.g., `v2026.2.15`) will correctly use the `stable` channel instead of inappropriately defaulting to `dev`.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk
- The changes are focused, well-tested through existing test coverage, and fix a clear bug. The `resolveEffectiveUpdateChannel` function already has proper logic for detecting beta vs stable tags, and the change simply uses this existing function instead of hardcoded defaults. The secondary change to `contextTokens` is a straightforward preference fix using the nullish coalescing operator.
- No files require special attention
<sub>Last reviewed commit: d74a904</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#10248: fix(update): default dev checkout path to ~/openclaw
by kimgyu · 2026-02-06
77.6%
#17912: fix: configure git to use HTTPS instead of SSH for GitHub URLs
by MisterGuy420 · 2026-02-16
76.1%
#11048: fix: address repository issues (env, author, CI comments, security ...
by cavula · 2026-02-07
73.9%
#13881: fix: Address Greptile feedback - test isolation and channel resolution
by trevorgordon981 · 2026-02-11
73.0%
#15852: fix: pass agentId when resolving IRC session paths
by MisterGuy420 · 2026-02-14
72.3%
#9156: fix(status): refresh version/commit on gateway restart
by gavinbmoore · 2026-02-04
72.3%
#17237: fix(update): guard post-install imports after npm global update
by tdjackey · 2026-02-15
71.8%
#23155: fix: add modelByChannel to allowed channel config keys
by tiagocampo · 2026-02-22
71.8%
#21271: fix(commands): pass channel/capabilities/shell/os to runtime in com...
by evansantos · 2026-02-19
71.7%
#23730: fix(update): correctly compare versions with -N build suffix
by mrx-arafat · 2026-02-22
71.7%