garrytan / garrytan/gstack

gstack-upgrade only re-registers Claude Code; Codex / OpenCode installs silently drift

Open
#1,925 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
133k
Forks
19.9k
Avg merge
18h 46m
Merged PRs (30d)
26

Description

## Summary

`/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.

## Environment

- macOS (Apple Silicon)
- gstack primary (Claude Code): `~/.claude/skills/gstack` — **v1.57.0.0**
- gstack clone backing Codex: `~/gstack` (Codex symlinks `~/.codex/skills/gstack-* → ~/gstack/.agents/skills/`) — **v1.26.3.0** (31 versions behind)
- OpenCode: no gstack skills registered

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

1. **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.
2. **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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.