You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gstack-upgrade only re-registers Claude Code; Codex / OpenCode installs silently drift #1925
/gstack-upgrade (and the ./setup it runs) re-registers skills only for Claude Code. On a machine where gstack was also installed for Codex (and potentially OpenCode), those agents are never refreshed by the upgrade, so they silently drift to older versions. Over time this produces multiple divergent gstack installs across agents.
I run gbrain + gstack across Claude Code, Codex and OpenCode. gbrain handles multi-agent cleanly (single binary + per-agent MCP; one bun install updates all). gstack exposes multi-agent setup flags, but the upgrade path isn't host-aware, so the agents fall out of sync after every upgrade with no warning.
Root cause (from reading setup + the gstack-upgrade skill)
setup defaults to HOST="claude"; multi-agent registration only happens with an explicit --host codex|opencode|auto.
--host auto already auto-detects installed agents (command -v claude|codex|kiro-cli|droid|opencode) and registers all of them.
The /gstack-upgrade skill runs bare ./setup (no --host), so every upgrade re-registers only Claude Code. Codex / OpenCode keep pointing at whatever clone they were first set up from and drift.
Side note: setup already has migrate_direct_codex_install, so the project clearly anticipates multi-clone Codex installs — but the upgrade path doesn't keep them current.
Expected
The upgrade re-registers every host gstack was installed for, not just Claude — and ideally warns when a registered agent's version differs from the primary.
Possible fixes
Quick: have /gstack-upgrade run ./setup --host auto instead of bare ./setup. Safe — auto falls back to claude when no other agent CLI is present. Trade-off: auto-detect can register gstack into an agent the user didn't deliberately choose.
Proper: persist the set of installed hosts at setup time (e.g. in ~/.gstack/config.yaml) and have the upgrade re-run setup for exactly those hosts; warn on per-host version drift.
Happy to send a PR for whichever direction you prefer.
Independent data point that reproduces this, worse:
My setup:
Primary (Claude Code): ~/.claude/skills/gstack — was on v1.58.0.0, 4 commits behind origin/main.
Secondary install: ~/.agents/skills/gstack — a fully independent git clone (own .git, same origin/garrytan/gstack.git remote), frozen at v1.17.0.0 — 75 commits / ~41 versions behind. git merge-base --is-ancestor confirms it's a straight-line ancestor of the primary, not a fork — pure staleness, no divergence.
So the drift is real and can get worse than the 31-versions-behind case in the original report — mine had apparently never been touched since initial install.
One addition to the two fixes proposed above: I read through gstack-upgrade/SKILL.md's Step 2 install-type detection, and there's a structural reason a fix limited to ./setup --host auto won't fully close this for everyone:
Branch 1 ($HOME/.claude/skills/gstack/.git) is checked unconditionally, before cwd is even considered. On any machine where the primary Claude install exists — which is the common case, since Claude is the primary host — branches 3 and 4 are unreachable: there's no cwd you can invoke /gstack-upgrade from that lets it pick anything other than the primary Claude clone. That's fine for fix 1 (teaching ./setup to pass --host auto) if the secondary install is a proper Codex/OpenCode registration symlinked from the primary — re-running the primary's ./setup --host auto would refresh it correctly.
But it doesn't help a case like mine, where the secondary is a fully separate, standalone clone rather than a registration produced by the primary's own ./setup. gstack-upgrade has no way to even discover that clone exists, so no amount of host-awareness inside ./setup reaches it — Step 2 would need to enumerate all known gstack install locations (primary + every registered host's target, e.g. by reading whatever persists installed hosts per fix 2) rather than assuming there's exactly one relevant INSTALL_DIR per invocation.
Fix 2 (persist installed hosts + re-run setup for each, with per-host version-drift warnings) seems like the only one of the two that actually generalizes to this shape of install. Happy to test a PR against this scenario if useful.
Thanks @Oszkar and @time-attack for confirming this — two more data points that the drift is real and that --host auto alone doesn't fully close it.
Agreed with @Oszkar's structural read: Fix 1 (/gstack-upgrade → ./setup --host auto) only refreshes secondaries that are registrations symlinked from the primary — my Codex case (~/.codex/skills/gstack-* → ~/gstack/.agents/skills/). It can't reach a standalone secondary clone with its own .git, because Step 2's install-type detection resolves to the primary ~/.claude/skills/gstack unconditionally and never enumerates other install locations. @time-attack's phrasing nails the missing piece — there's no durable record of which hosts and installation targets must be refreshed, which is exactly Fix 2.
On my side I've adopted ./setup --host auto after every /gstack-upgrade as a stop-gap and it keeps my Codex registration current — but I only trust it because I also enforce "one primary clone, no orphan standalone clones" operationally. That discipline shouldn't be a prerequisite for the upgrade being correct. So I'd back Fix 2 (persist installed hosts + targets at setup time, re-run per host on upgrade, warn on per-host version drift) as the direction that generalizes. Still happy to send a PR for it if you want to lock the shape first.
Fixed in v1.91.16.0 (#3014, ac20ef1): /gstack-upgrade now refreshes every registered install (Claude, Codex, OpenCode and the rest), each in its own process, and ends with one result row per install. ./setup --status lists them. Covered by test/host-conformance.test.ts and test/setup-install-registry.test.ts.
Thanks for the report! If it still happens on v1.91.16.0 or later, reply here and we'll reopen.
Activity
Oszkar commentedon Jul 8, 2026
Independent data point that reproduces this, worse:
My setup:
~/.claude/skills/gstack— was on v1.58.0.0, 4 commits behindorigin/main.~/.agents/skills/gstack— a fully independent git clone (own.git, sameorigin/garrytan/gstack.gitremote), frozen at v1.17.0.0 — 75 commits / ~41 versions behind.git merge-base --is-ancestorconfirms it's a straight-line ancestor of the primary, not a fork — pure staleness, no divergence.So the drift is real and can get worse than the 31-versions-behind case in the original report — mine had apparently never been touched since initial install.
One addition to the two fixes proposed above: I read through
gstack-upgrade/SKILL.md's Step 2 install-type detection, and there's a structural reason a fix limited to./setup --host autowon't fully close this for everyone:Branch 1 (
$HOME/.claude/skills/gstack/.git) is checked unconditionally, before cwd is even considered. On any machine where the primary Claude install exists — which is the common case, since Claude is the primary host — branches 3 and 4 are unreachable: there's no cwd you can invoke/gstack-upgradefrom that lets it pick anything other than the primary Claude clone. That's fine for fix 1 (teaching./setupto pass--host auto) if the secondary install is a proper Codex/OpenCode registration symlinked from the primary — re-running the primary's./setup --host autowould refresh it correctly.But it doesn't help a case like mine, where the secondary is a fully separate, standalone clone rather than a registration produced by the primary's own
./setup.gstack-upgradehas no way to even discover that clone exists, so no amount of host-awareness inside./setupreaches it — Step 2 would need to enumerate all known gstack install locations (primary + every registered host's target, e.g. by reading whatever persists installed hosts per fix 2) rather than assuming there's exactly one relevantINSTALL_DIRper invocation.Fix 2 (persist installed hosts + re-run setup for each, with per-host version-drift warnings) seems like the only one of the two that actually generalizes to this shape of install. Happy to test a PR against this scenario if useful.
time-attack commentedon Jul 15, 2026
@abkrim Secondary host registrations still drift, and upgrades lack a durable record of which hosts and installation targets must be refreshed.
abkrim commentedon Jul 16, 2026
Thanks @Oszkar and @time-attack for confirming this — two more data points that the drift is real and that
--host autoalone doesn't fully close it.Agreed with @Oszkar's structural read: Fix 1 (
/gstack-upgrade→./setup --host auto) only refreshes secondaries that are registrations symlinked from the primary — my Codex case (~/.codex/skills/gstack-* → ~/gstack/.agents/skills/). It can't reach a standalone secondary clone with its own.git, because Step 2's install-type detection resolves to the primary~/.claude/skills/gstackunconditionally and never enumerates other install locations. @time-attack's phrasing nails the missing piece — there's no durable record of which hosts and installation targets must be refreshed, which is exactly Fix 2.On my side I've adopted
./setup --host autoafter every/gstack-upgradeas a stop-gap and it keeps my Codex registration current — but I only trust it because I also enforce "one primary clone, no orphan standalone clones" operationally. That discipline shouldn't be a prerequisite for the upgrade being correct. So I'd back Fix 2 (persist installed hosts + targets at setup time, re-run per host on upgrade, warn on per-host version drift) as the direction that generalizes. Still happy to send a PR for it if you want to lock the shape first.feat(setup): install registry, ./setup --status, staged activation, p…
v1.91.16.0 fix: safe installs and upgrades, skills start everywhere, …
capy-ai commentedon Oct 3, 2026
Fixed in v1.91.16.0 (#3014, ac20ef1):
/gstack-upgradenow refreshes every registered install (Claude, Codex, OpenCode and the rest), each in its own process, and ends with one result row per install../setup --statuslists them. Covered bytest/host-conformance.test.tsandtest/setup-install-registry.test.ts.Thanks for the report! If it still happens on v1.91.16.0 or later, reply here and we'll reopen.
v1.91.16.0 fix: safe installs and upgrades, skills start everywhere, …